Skip to content

Commit fe18385

Browse files
author
xianing
committed
fix issue for join multiple channel
setClientROle need to be call from rtcChannel object
1 parent 27db857 commit fe18385

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

iOS/APIExample/Examples/Advanced/JoinMultiChannel/JoinMultiChannel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ class JoinMultiChannelMain: BaseViewController {
8080

8181
// set live broadcaster to send stream
8282
agoraKit.setChannelProfile(.liveBroadcasting)
83-
agoraKit.setClientRole(.broadcaster)
8483

8584
// set up local video to render your local camera preview
8685
let videoCanvas = AgoraRtcVideoCanvas()
@@ -106,6 +105,7 @@ class JoinMultiChannelMain: BaseViewController {
106105
// when joining channel. The channel name and uid used to calculate
107106
// the token has to match the ones used for channel join
108107
channel1 = agoraKit.createRtcChannel(channelName1)
108+
channel1?.setClientRole(.broadcaster)
109109
label1.text = channelName1
110110
channel1?.setRtcChannelDelegate(self)
111111
// a channel will only upstream video if you call publish

0 commit comments

Comments
 (0)