This highlights how to release the camera when muting video in an Agora integrated web application.
- A web browser
In index.html, pay particular attention to the streamCamera and muteCamera button click events, as well as the following Agora callbacks:
- rtc.client.on("stream-subscribed", function (evt) {})
- rtc.client.on("stream-updated", function (evt) {})
- rtc.client.on("mute-video", function (evt) {})
This section shows you how to prepare, and run the sample application.
To build and run the sample application, get an App ID:
- Create a developer account at agora.io. Once you finish the signup process, you will be redirected to the Dashboard.
- Navigate in the Dashboard tree on the left to Projects > Project List.
- Save the App ID from the Dashboard for later use.
- Generate a temp Access Token (valid for 24 hours) from dashboard page with given channel name, save for later use.
Currently, version 2.9.0 of the Agora Web SDK is being used from Agora's hosted cdn. Alternatively, you may download the SDK, place it into assets directory, and rename file name as AgoraRTCSDK-2.9.0.js (make corresponding change in index.html).
- Install live-server globally via npm
npm i live-server -g
- Launch server via following commands in working folder,
live-server .
- Enter Valid APPID, Token, Channel, UID and click Join Room
- You can find full API document at Document Center
- You can file bugs about this demo at issue
The MIT License (MIT)