Turn a participant's media off as host or authorised co-host.
This is one-directional by design: MediaSFU lets a moderator stop someone's
camera, microphone or screen share, but cannot start it on their behalf — the
participant must re-enable it themselves.
The SDK's own controlMedia consumer only emits for type: 'audio' and
type: 'video'; 'all' and 'screenshare' fall through its guard and do
nothing. This helper emits the controlMedia event directly with the same
permission and self-protection checks applied uniformly, so every kind works.
Hosts (islevel === '2') cannot be muted by anyone, including other hosts.
Turn a participant's media off as host or authorised co-host.
This is one-directional by design: MediaSFU lets a moderator stop someone's camera, microphone or screen share, but cannot start it on their behalf — the participant must re-enable it themselves.
The SDK's own
controlMediaconsumer only emits fortype: 'audio'andtype: 'video';'all'and'screenshare'fall through its guard and do nothing. This helper emits thecontrolMediaevent directly with the same permission and self-protection checks applied uniformly, so every kind works. Hosts (islevel === '2') cannot be muted by anyone, including other hosts.