Commit 82827453 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Use clearInterval instead of clearTimer.

parent 2eb61d87
...@@ -880,7 +880,7 @@ Filter.prototype.draw = function() { ...@@ -880,7 +880,7 @@ Filter.prototype.draw = function() {
} }
}); });
if(frameRate && frameRate != this.frameRate) { if(frameRate && frameRate != this.frameRate) {
clearTimeout(this.timer); clearInterval(this.timer);
this.timer = setInterval(() => this.draw(), 1000 / this.frameRate); this.timer = setInterval(() => this.draw(), 1000 / this.frameRate);
} }
} }
...@@ -906,7 +906,7 @@ Filter.prototype.stop = function() { ...@@ -906,7 +906,7 @@ Filter.prototype.stop = function() {
if(!this.timer) if(!this.timer)
return; return;
this.captureStream.getTracks()[0].stop(); this.captureStream.getTracks()[0].stop();
clearTimeout(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
if(this.definition.cleanup) if(this.definition.cleanup)
this.definition.cleanup.call(this); this.definition.cleanup.call(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment