Skip to content

Instantly share code, notes, and snippets.

@rebelchris
Created January 23, 2021 15:01
Show Gist options
  • Save rebelchris/93abe0629535aadc61aa686ff026048f to your computer and use it in GitHub Desktop.
Save rebelchris/93abe0629535aadc61aa686ff026048f to your computer and use it in GitHub Desktop.
Start video function
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