Reputation: 11282
When a video and audio stream from a webcam is acquired by getUserMedia
and assigned to a <video>
element, I can see and hear myself. The audio track however turns into a feedback noise.
The HTMLMediaElement.muted
or HTMLMediaElement.defaultMuted
however doesn't seem to apply to a live camera feed.
The feedback also occurs even if the <video>
element is not connected to the DOM (created by JS).
How can I mute the audio feedback without disabling the stream's audio (getUserMedia
with audio:false
) alltogether? The audio should be usable with an AudioContext
for example.
Upvotes: 3
Views: 321
Reputation: 3219
Add muted
attribute to video
element (<video id="video" muted />
).
Upvotes: 1