-
-
Save zontan/2af64ea346d02ebe034f4c588b12e74d 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
var audioEnabled = true | |
@IBAction func toggleMic(sender: AnyObject) { | |
agoraKit.muteLocalAudioStream(audioEnabled) | |
audioEnabled = !audioEnabled | |
// Update the button title | |
if (audioEnabled) { | |
self.micButton.setTitle("Mute", for: .normal) | |
} else { | |
self.micButton.setTitle("Unmute", for: .normal) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment