Skip to content

Instantly share code, notes, and snippets.

@yaizudamashii
Created August 11, 2021 17:28
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 yaizudamashii/53aa03f853b2b347097f072ed3800de9 to your computer and use it in GitHub Desktop.
Save yaizudamashii/53aa03f853b2b347097f072ed3800de9 to your computer and use it in GitHub Desktop.
joinRoom() async {
await [Permission.microphone, Permission.camera].request();
agora.joinChannel(
channelId: room.identifier,
onJoinChannelComplete: () {
database.addSpeaker(room: room, speaker: currentUser);
},
onLeaveChannelComplete: () {
database.removeSpeaker(room: room, speaker: currentUser);
},
onMuteStatusChanged: (bool isMuted) {
database.setMuteStatus(
speaker: currentUser,
isMuted: isMuted
);
},
setActiveSpeaker: (bool isSpeaking) {
database.setActiveSpeaker(
speaker: currentUser,
isSpeaking: isSpeaking
);
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment