From: Ken Rice Date: Tue, 29 Sep 2015 16:46:15 +0000 (-0500) Subject: FS-8219 #resolve Correctly stop the tracks. X-Git-Tag: v1.6.3~1^2~98^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dab81d4c4c744a6cd59dd1d6791e37633a334f3e;p=thirdparty%2Ffreeswitch.git FS-8219 #resolve Correctly stop the tracks. getusermedia.stop() has been deprecated. we now need to call stop on each individual track. --- diff --git a/html5/verto/js/src/jquery.FSRTC.js b/html5/verto/js/src/jquery.FSRTC.js index ddd376562d..1ed2a54e9b 100644 --- a/html5/verto/js/src/jquery.FSRTC.js +++ b/html5/verto/js/src/jquery.FSRTC.js @@ -316,7 +316,14 @@ if(typeof self.localStream.stop == 'function') { self.localStream.stop(); } else { - self.localStream.active = false; + if (self.localStream.active){ + var tracks = self.localStream.getTracks(); + console.error(tracks); + tracks.forEach(function(track, index){ + console.log(track); + track.stop(); + }) + } } self.localStream = null; } @@ -334,7 +341,14 @@ if(typeof self.options.localVideoStream.stop == 'function') { self.options.localVideoStream.stop(); } else { - self.options.localVideoStream.active = false; + if (self.localVideoStream.active){ + var tracks = self.localVideoStream.getTracks(); + console.error(tracks); + tracks.forEach(function(track, index){ + console.log(track); + track.stop(); + }) + } } }