Reputation: 409
I am using the twilio video chat api to make a video calling app. I want to allow users to manually enable and disable video from other participants in the room without disabling the audio during low bandwidth scenarios, using a toggle button. To do this I think I need to get hold of the track playing in a particular div and then use track.detach. How can I get the twilio track from its container div?
After I remove it, how can I add it back when(if) the bandwidth improves?
Upvotes: 1
Views: 2327
Reputation: 73065
Twilio developer evangelist here.
Currently with the Video SDK you can't unsubscribe from tracks, all tracks are sent to each member in the conversation. So, while you can detach a track from the DOM and stop showing it, the media will still be sent to the browser.
You could get the sending client to use smaller constraints to send the videos and we do have bandwidth controls in the SDK on the roadmap, so more control is coming.
Upvotes: 2