Created
August 29, 2017 13:18
-
-
Save derrell/1ed76577215accc8f547beb176c204a2 to your computer and use it in GitHub Desktop.
Attempting to stop mic audio from flowing to SIP server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onlocalstream : function(stream) | |
{ | |
console.log("SIP: attaching local stream"); | |
// Initially mute the microphone | |
var tracks = stream.getAudioTracks(); | |
tracks.forEach( | |
function(track) | |
{ | |
console.warn("SIP: before enabled=false: track=", track); | |
track.enabled = false; | |
console.warn("SIP: after enabled=false: track=", track); | |
}); | |
setTimeout( | |
function() | |
{ | |
console.warn("SIP: stopping audio track"); | |
tracks[0].stop(); | |
}, 5000); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment