I'm attempting to join multiple channels on a shared AgoraRtcEngineKit instance. After joining the channel with role audience and then switching the client role to broadcaster and then back to audience, the camera seems to remain on as indicated by the green dot on the iphone. I was wondering if there is a different way to release the camera in the multi-channel setup, or if this could be a bug in the SDK
Code for joining channel:
let option = AgoraRtcChannelMediaOptions()
option.channelProfile = .liveBroadcasting
option.clientRoleType = .audience
option.autoSubscribeVideo = true
option.autoSubscribeAudio = true
option.publishCameraTrack = true
option.publishMicrophoneTrack = true
option.publishSecondaryCameraTrack = true
let token = token
let channel = channel
var result = agoraKit.joinChannelEx(
byToken: token,
connection: AgoraRtcConnection(channelId: channel, localUid: id),
delegate: delegate,
mediaOptions: option
)
I'm attempting to join multiple channels on a shared
AgoraRtcEngineKit
instance. After joining the channel with roleaudience
and then switching the client role tobroadcaster
and then back toaudience
, the camera seems to remain on as indicated by the green dot on the iphone. I was wondering if there is a different way to release the camera in the multi-channel setup, or if this could be a bug in the SDKCode for joining channel:
Code for switching roles:
I also tried using
muteLocalVideoStreamEx
but that didn't work