Skip to content

Instantly share code, notes, and snippets.

@zontan
Last active June 24, 2020 20:20
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 zontan/86d13ffe872cd5998aef5f2a456e2dba to your computer and use it in GitHub Desktop.
Save zontan/86d13ffe872cd5998aef5f2a456e2dba to your computer and use it in GitHub Desktop.
var muted = false {
didSet {
if muted {
muteButton.setTitle("Unmute", for: .normal)
} else {
muteButton.setTitle("Mute", for: .normal)
}
}
}
@IBAction func didToggleMute(_ sender: Any) {
if muted {
getAgoraEngine().muteLocalAudioStream(false)
} else {
getAgoraEngine().muteLocalAudioStream(true)
}
muted = !muted
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment