mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 09:17:34 +00:00
Merge pull request #515 in FS/freeswitch from bugfix/FS-8219-camera-is-not-deactivated-after-init to master
* commit 'dab81d4c4c744a6cd59dd1d6791e37633a334f3e': FS-8219 #resolve Correctly stop the tracks.
This commit is contained in:
commit
a3a76cd02d
@ -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 @@
|
|||||||
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();
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user