Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Mute Microphone of the Media Stream in Webrtc?

Tags:

node.js

webrtc

I have tried the stream.getAudioTracks()[0].enabled = false, But it does not work, Moreover, The getAudioTracks() is not currently supported in firefox..

Moreover stream.getVideoTracks()[0].enabled = false only works in chrome, But not in firefox. I need a solution which is compatable with both.

like image 544
Hardeep Mehta Avatar asked Aug 09 '14 19:08

Hardeep Mehta


1 Answers

you should set enabled attribute

stream.getAudioTracks()[0].enabled = false/true 
like image 167
George Garchagudashvili Avatar answered Oct 05 '22 22:10

George Garchagudashvili