Mute / Unmute

Mute is something that applies to both audio and video. When you mute audio, you can't be heard by other people. When you mute video, you will not be broadcasting your video to other people.

It can be called on local (you) or remote (other people) peers' audio or video tracks.

You get a reference to your own local peer from getLocalPeer on HMSSDK.

You can do the same for remote peers and HMSRemoteVideoTrack and HMSRemoteAudioTrack. Get other people's peers by calling hmsSDK.getRemotePeers()

💡 You may get null for any track if they were not allowed to publish that track according to their HMSRole.

val myPeer = hmsSDK.getLocalPeer() myPeer?.videoTrack?.setMute(true) myPeer?.audioTrack?.setMute(true)

Have a suggestion? Recommend changes ->

Was this helpful?

1234