Search code examples
audiovideotwiliotwilio-api

Muting audio and video channels in a Room


Is it possible via the Twilio SDK for web to stop certain audio and video channels?

Let's say I have a room with members A, B, and C. I have a situation where I want "A" to be able to turn off sending audio/video to "B", but continue sending audio/video to "C"

Also, from the perspective of "A", I need "A" to be able to silence the audio and stop video coming from "B", but continue receiving from "C".


Solution

  • I think what you need here is Subscribe Rules. Subscribe rules allow your application to control the tracks that a participant is subscribed to.

    I know Stack Overflow likes that a full answer is shared, not just a link, but subscribe rules can be complicated and I recommend you read through the documentation available here: https://www.twilio.com/docs/video/api/track-subscriptions#sl-resource