How to implement camera toggle like Google Meet

Viewed 89

I am trying to implement something like the camera on/off toggle that Google Meet has. I have tried getting the tracks from getUserMedia and setting enabled = true/false, it works but the camera indicator light is still on all the time. How are they able to toggle the camera and the indicator light?

1 Answers

To lose the camera indicator you will have to remove any reference to the stream (no just set enabled to false). So you have to remove the track from the peer. Thanks to Transceiver APi you can easily switch/remove track from the peer without renegotiate the ice.

Related