Skip to content

Instantly share code, notes, and snippets.

@rebelchris
Created January 23, 2021 15:02
Show Gist options
  • Save rebelchris/9641fdd150da32e25b65ed5a6b4a16f7 to your computer and use it in GitHub Desktop.
Save rebelchris/9641fdd150da32e25b65ed5a6b4a16f7 to your computer and use it in GitHub Desktop.
Start audio function
const startAudio = async () => {
rtc.localAudioTrack = await AgoraRTC.createMicrophoneAudioTrack();
rtc.client.publish(rtc.localAudioTrack);
btnMic.classList.add("active");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment