Remove And Add Microphone At Beta5 Version
I use new beta5 version of Twilio to create video chat: https://media.twiliocdn.com/sdk/js/video/releases/1.0.0-beta5/docs/#toc5__anchor When user clicks first time on the button,
Solution 1:
Twilio developer evangelist here.
First up, Video is released as v1 now, so I would change from beta5 to the v1 code.
Then, to mute your local audio, you can do so in the context of a room. You need to gather the media tracks for your local participant and you can then disable a track. The removeMicrophone
method was a shortcut to this, however I believe it has been removed as there could be multiple microphones in use and dealing with tracks themselves is more flexible.
This is how you would get all local tracks and disable them. You might have to do a bit more work to only disable audio tracks.
var localMedia = room.localParticipant.media;
localMedia.tracks.forEach(function (track) {
track.disable();
}).
There's more detail in the documentation.
Post a Comment for "Remove And Add Microphone At Beta5 Version"