Set Playback Allowed

Mute/Unmute is something that applies to both audio and video and it's possible to mute remote peers only for yourself. When you mute audio or video for a user using this API, you won't be able to hear or see the remote person but it will be audible and visible to others

Set isPlaybackAllowed

You can set playback for a certain remote peer's audio or video. If you set it to false it will turn off the audio or video only for you. You can revert it by setting it to true.

//remoteAudioTrack is the remote peer's audio track remoteAudioTrack.setPlaybackAllowed(false);//setting playback to false //remoteVideoTrack is the remote peer's video track remoteVideoTrack.setPlaybackAllowed(true);//setting playback to true

For muting/unmuting entire room(all peers) for yourself check out the docs here

Fetch isPlaybackAllowed

You can check if playback is allowed or not for a certain remote peer's audio or video.

//remoteAudioTrack is the remote peer's audio track bool isPlaybackAllowedForAudioTrack = remoteAudioTrack.isPlaybackAllowed //remoteVideoTrack is the remote peer's video track bool isPlaybackAllowedForVideoTrack = remoteVideoTrack.isPlaybackAllowed

Have a suggestion? Recommend changes ->

Was this helpful?

1234