Host audio controls
The controls in this topic have an effect only when the local user is the session host.
A session host can manage the audio of everyone in the session through the ZMVideoSDKAudioHelper. To mute or unmute a single user, see Mute audio.
Mute everyone
To mute every user in the session, call muteAllAudio. The boolean parameter controls whether muted users are allowed to unmute themselves afterward.
if let audioHelper = ZMVideoSDK.shared()?.getAudioHelper() {
// Mute all users; pass true to let them unmute themselves.
audioHelper.muteAllAudio(true)
}
ZMVideoSDKAudioHelper *audioHelper = [[ZMVideoSDK sharedVideoSDK] getAudioHelper];
// Mute all users; pass YES to let them unmute themselves.
[audioHelper muteAllAudio:YES];
Unmute everyone
To unmute every user in the session, call unmuteAllAudio.
ZMVideoSDK.shared()?.getAudioHelper()?.unmuteAllAudio()
[[[ZMVideoSDK sharedVideoSDK] getAudioHelper] unmuteAllAudio];
Allow users to unmute themselves
Use allowAudioUnmutedBySelf to control whether users are permitted to unmute their own audio.
ZMVideoSDK.shared()?.getAudioHelper()?.allowAudioUnmutedBySelf(true)
[[[ZMVideoSDK sharedVideoSDK] getAudioHelper] allowAudioUnmutedBySelf:YES];