Web SDK
JavaScript API for video streams and calls in a browser
Connect to server Flashphoner.createSession(); |
Publish a stream stream.publish(); |
Play a stream stream.play(); |
Unpublish or stop stream.stop(); |
Give it a try
1. Install WCS-server using this instruction or launch a server instance on Amazon AWS or DigitalOcean.
2. Make sure default sample Two Way Streaming works as expected.
3. Log in to the server over SSH and open the file for editing
$WCS_HOME/client2/examples/demo/streaming/two_way_streaming/two_way_streaming.js
4. Find lines
onPublishing(stream);
5. Replace with
onPublishing(stream); console.log("I'm publishing a stream!");
6. Press “Connect” then “Publish”. Do you see the message in browser console? That’s all. Now you know how to use the Web SDK! You can learn more any time from our docs or tech forums.
Download Web SDK builds
Web SDK and demo samples
Web SDK sources
Source code of Web SDK and samples
Web SDK API docs
Learn API documentation
Web SDK Developer Guide
Here we describe code of Web SDK samples
Web SDK code samples
Set of demo samples based on the Web SDK
The streamer can be used to publish a live stream from a webcam to the server.
The player is used for the live stream playback in desktop and mobile browsers
This example is helpful if you need to place two or more live players on the same web page.
You can select particular webcam or microphone and apply available settings such as FPS, frame size, etc.
This example allows to record a live stream in a browser and then download or play the recorded stream.
This is two way streaming example when we publish a stream and play another stream simultaneously. It can be used as a base for video chat.
Screen sharing using a web browser.
Video conference for three participants.
Video chat for two participants.
Click to Call button for SIP calls from a web page.
Web phone working over the SIP protocol.
Web phone with video support working over the SIP protocol.
All demo samples are described in the docs