Created
January 23, 2021 15:01
-
-
Save rebelchris/93abe0629535aadc61aa686ff026048f to your computer and use it in GitHub Desktop.
Start video function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const startVideo = async () => { | |
| me.classList.add("connecting"); | |
| rtc.localVideoTrack = await AgoraRTC.createCameraVideoTrack(); | |
| rtc.client.publish(rtc.localVideoTrack); | |
| me.classList.remove("connecting"); | |
| rtc.localVideoTrack.play("me"); | |
| btnCam.classList.add("active"); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment