WebRTC/getUserMedia: How to properly mute local video?

后端 未结 3 817
面向向阳花
面向向阳花 2021-02-08 23:09

I\'m trying to implement the functionality for muting the local video MediaStreamTrack in my WebRTC application. Here\'s how I\'m approaching this:

         


        
3条回答
  •  逝去的感伤
    2021-02-08 23:37

    We solved this by tearing down the local media stream and creating it anew without the video track. Doing it mid-call requires either re-establishing the peer connection or performing renegotiation (triggered by sending a new offer).

提交回复
热议问题