javascript - Firefox createMediaStreamDestination bug using rtc? -
i stream audio on rtc , want mute , unmute audio.
this works... no gain control:
function(stream) { /* getusermedia stream */ console.log("access granted audio/video"); peer_connection.addstream(stream); }
this works on chrome not on firefox (with gain control)
function(stream) { /* getusermedia stream */ console.log("access granted audio/video"); var microphone = context.createmediastreamsource(stream); gainnode = context.creategain(); var dest = context.createmediastreamdestination(); microphone.connect(gainnode); gainnode.connect(dest); local_media_stream = dest.stream; peer_connection.addstream(local_media_stream); }
i no error , hear no voice. when send gainnode context.destination can hear myself.
i think "context.createmediastreamsource(stream)" broken in way. can tell me why ? , how fix this.
edit: checked streams and:
stream //type: localmediastream dest.steam //type: mediastream
in firefox! in chrome both mediastreams
to mute audio can enable/disable track doing:
stream.getaudiotracks()[0].enabled = false; // mutes
this won't solve problem gain node, bug/limitation in firefox @ moment (in case can wait fix). if purpose (un)mute should work (it works video tracks).