Skip to content

Instantly share code, notes, and snippets.

@zontan
Created October 30, 2020 21:43
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/0e17f041aacd4749ce8e0aaf6b56257f to your computer and use it in GitHub Desktop.
Save zontan/0e17f041aacd4749ce8e0aaf6b56257f to your computer and use it in GitHub Desktop.
let channelName = self.roomTextField.text ?? "default"
// Connect to the channel using the channel name provided.
agoraKit.setDefaultAudioRouteToSpeakerphone(true)
agoraKit.joinChannel(byToken: nil, channelId: channelName, info:nil, uid:0) {(sid, uid, elapsed) -> Void in
print("successfully joined channel")
}
UIApplication.shared.isIdleTimerDisabled = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment