I am going to integrate twilio api in my project.
Here I want to give some options like listen only to audio instead of watching the video. How can I implement this option, i.e. how can I make the video to be invisible?
Any suggestion? Thank you.
I am going to integrate twilio api in my project.
Here I want to give some options like listen only to audio instead of watching the video. How can I implement this option, i.e. how can I make the video to be invisible?
Any suggestion? Thank you.
Twilio developer evangelist here.
When a participant joins a room the easiest way to show both their Video and Audio is to use
attach()to slot them into the DOM as a<video>element.However, if you want independent control of the audio and video then you probably want to inspect and attach the participant's
media.audioTracksandmedia.videoTracksseparately. Each property is a map of aTrack.IDand anAudioTrackorVideoTrack. You can thenattachanddetachthe individual tracks as you like over the course of the call.Let me know if that helps at all.