changeTrackState

fun changeTrackState(forRemoteTrack: HMSTrack, mute: Boolean, hmsActionResultListener: HMSActionResultListener)

To change the mute status of a single remote HMSTrack.

Parameters

forRemoteTrack

the HMSTrack whose mute status needs to be changed.

mute

true if the track needs to be muted, false otherwise.

hmsActionResultListener

the callback that would be called by SDK in case of a success or failure.


fun changeTrackState(mute: Boolean, type: HMSTrackType?, source: String?, roles: List<HMSRole>?, hmsActionResultListener: HMSActionResultListener)

To change the mute status of one or many remote HMSTrack for all peers of a particular role, or all tracks of a particular source, type or source AND type.

Parameters

mute

true if the track needs to be muted, false otherwise

type

optional, the HMSTrackType which should be affected. If this and source are specified, it is considered an AND operation. If not specified, all track sources are affected.

source

optional, the HMSTrackSource which should be affected. If this and type are specified, it is considered an AND operation. If not specified, all track types are affected.

roles

optional, a list of roles, may have a single item in a list, whose tracks should be affected. If not specified, all roles are affected.

hmsActionResultListener

the callback that would be called by SDK in case of a success or failure.