This repository includes HTML with embedded JavaScript examples that demonstrates how to do the following:
- Create an SFU connection to stream video and audio
- Mute media
- Share screen
- Text chat
- Send and receive files
- Change devices
- Broadcast
Before you can run the app, you must add an Application in the LiveSwitch Console.
- Log into the LiveSwitch Console. If you don't have an account, contact us about trying out LiveSwitch.
- Click Applications > New.
- Enter a name for your Application.
- Click the Application you just created to open the Application Settings page. You can find your Application ID and Shared Secret there. This information is needed for generating your authorization token.
-
Check out this repository and update
/MediaStreamingLogic.js
with your own Application ID and Shared Secret. -
Install all the dependencies:
npm install
-
Install a lightweight HTTP server:
npm install -g http-server
-
Start a web server:
http-server
-
Navigate to
http://127.0.0.1:8080/
and select an example page.
For a more detailed set up, visit LiveSwitch's documentation.