kopia lustrzana https://github.com/backface/turtlestitch
actually stop the webcam, i.e. all tracks of the media stream when stopping video
rodzic
e63c5e6eb0
commit
33e1b858da
|
@ -79,6 +79,7 @@
|
|||
|
||||
### 2019-05-07
|
||||
* Blocks, Objects, Threads, Video: optimized video motion detection
|
||||
* Objects: actually stop the webcam, i.e. all tracks of the media stream when stopping video
|
||||
|
||||
### 2019-05-06
|
||||
* Blocks, Objects, Threads, Video: New video motion detection feature by Josep Ferràndiz i Farré, under construction
|
||||
|
|
|
@ -7324,6 +7324,9 @@ StageMorph.prototype.startVideo = function(isFlipped) {
|
|||
|
||||
StageMorph.prototype.stopVideo = function() {
|
||||
if (this.videoElement) {
|
||||
this.videoElement.stream.getTracks().forEach(
|
||||
function (track) {track.stop(); }
|
||||
);
|
||||
this.videoElement.remove();
|
||||
this.videoElement = null;
|
||||
this.videoMotion = null;
|
||||
|
|
Ładowanie…
Reference in New Issue