Skip to content

Instantly share code, notes, and snippets.

@EkaanshArora
Created August 27, 2019 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EkaanshArora/87d0cb3b4c185cf3ba9a3e517ba009d1 to your computer and use it in GitHub Desktop.
Save EkaanshArora/87d0cb3b4c185cf3ba9a3e517ba009d1 to your computer and use it in GitHub Desktop.
...
toggleAudio = () => {
let mute = this.state.audMute;
console.log('Audio toggle', mute);
RtcEngine.muteLocalAudioStream(!mute);
this.setState({
audMute: !mute,
});
}
toggleVideo = () => {
let mute = this.state.vidMute;
console.log('Video toggle', mute);
this.setState({
vidMute: !mute,
});
RtcEngine.muteLocalVideoStream(!this.state.vidMute);
}
endCall() {
RtcEngine.destroy();
Actions.home();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment