-
-
Save zontan/f0e15bb76443134cfb68af4c29421d14 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
func initializeAgoraEngine() { | |
agoraKit = AgoraRtcEngineKit.sharedEngine(withAppId: "YOUR_AGORA_APP_ID", delegate: self) | |
agoraKit?.enableVideo() // - enable video | |
agoraKit?.setVideoSource(self.videoSource) // - set the video source to the custom source | |
agoraKit?.enableWebSdkInteroperability(true) | |
agoraKit?.setChannelProfile(.liveBroadcasting) | |
if let channel = roomName { | |
agoraKit?.joinChannel(byToken: nil, channelId: channel, info: nil, uid: 0, joinSuccess: { (channel, uid, elapsed) in | |
print("Join channel success") | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment