-
-
Save yaizudamashii/53aa03f853b2b347097f072ed3800de9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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