Twilio Video JS: Muting RemoteParticipant's audio

1.2k views Asked by At

I have a scenario wherein I would need to mute some of the remote participants in the video call in my local machine. Example of this use case is when I want to be able to just hear a remote participant that is presenting and no else.

Solution I found online is to muted as stated here: https://github.com/twilio/twilio-video.js/issues/363.

Muting the html element appears to work but I'm just curious if there is a Twilio method that can achieve the same result?

1

There are 1 answers

0
Bilal Mehrban On BEST ANSWER

At this time, the SDK does not provide a native ability to mute remote tracks. Only the local participant can disable their own tracks.

A solution to this problem is the track subscription API. This API allows you to make a request to update a certain participant's subscribe rules so you can programmatically unsubscribe users from tracks. For your use case, you can could hit this API to unsubscribe participants from specific users in the room, or unsubscribe all participants from all tracks except the presenter.

More info on this can be found here: https://www.twilio.com/docs/video/api/track-subscriptions

Let me know what you think!