Hardeep Mehta
Hardeep Mehta

Reputation: 489

How to Mute Microphone of the Media Stream in 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.

Upvotes: 5

Views: 4592

Answers (1)

George G
George G

Reputation: 7705

you should set enabled attribute

stream.getAudioTracks()[0].enabled = false/true 

Upvotes: 7

Related Questions