Skip to content

Instantly share code, notes, and snippets.

@digitallysavvy
Last active November 27, 2019 18:02
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 digitallysavvy/2479e57c53f166c71b35ca09bca186b6 to your computer and use it in GitHub Desktop.
Save digitallysavvy/2479e57c53f166c71b35ca09bca186b6 to your computer and use it in GitHub Desktop.
Snippet to leave the channel within the ARSupportBroadcasterViewController and ARSupportAudienceViewController
func leaveChannel() {
self.agoraKit.leaveChannel(nil) // leave channel and end chat
self.sessionIsActive = false // session is no longer active
UIApplication.shared.isIdleTimerDisabled = false // Enable idle timer
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment