Skip to content

Instantly share code, notes, and snippets.

@sunny7899
Created February 23, 2022 13:45
Show Gist options
  • Save sunny7899/be4c1ff5034591b4866de516c49ebe14 to your computer and use it in GitHub Desktop.
Save sunny7899/be4c1ff5034591b4866de516c49ebe14 to your computer and use it in GitHub Desktop.
hideBtns = true;
async startCall() {
const uid = this.stream.generateUid();
const rtcDetails = await this.stream.generateTokenAndUid(uid);
this.stream.createRTCClient();
this.stream.agoraServerEvents(this.stream.rtc);
await this.stream.localUser(rtcDetails.token, uid);
this.hideBtns = false;
}
async logout() {
await this.stream.leaveCall();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment