提交 dab81d4c authored 作者: Ken Rice's avatar Ken Rice

FS-8219 #resolve Correctly stop the tracks.

getusermedia.stop() has been deprecated. we now need to call stop on
each individual track.
上级 dc74c69e
...@@ -316,7 +316,14 @@ ...@@ -316,7 +316,14 @@
if(typeof self.localStream.stop == 'function') { if(typeof self.localStream.stop == 'function') {
self.localStream.stop(); self.localStream.stop();
} else { } 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; self.localStream = null;
} }
...@@ -334,7 +341,14 @@ ...@@ -334,7 +341,14 @@
if(typeof self.options.localVideoStream.stop == 'function') { if(typeof self.options.localVideoStream.stop == 'function') {
self.options.localVideoStream.stop(); self.options.localVideoStream.stop();
} else { } 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();
})
}
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论