Fix autodetection getting stuck in 21:9

This commit is contained in:
Tamius Han 2022-08-06 01:31:18 +02:00
parent 7df62ba530
commit d2733cf486

View File

@ -480,11 +480,11 @@ class ArDetector {
}
}
// if (this && !this._halted && !this._paused) {
if (this && !this._halted && !this._paused) {
this.animationFrameHandle = window.requestAnimationFrame( (ts) => this.animationFrameBootstrap(ts));
// } else {
// this.logger.log('info', 'debug', `[ArDetect::animationFrameBootstrap] <@${this.arid}> Not renewing animation frame for some reason. Paused? ${this._paused}; Halted?: ${this._halted}, Exited?: ${this._exited}`);
// }
} else {
this.logger.log('info', 'debug', `[ArDetect::animationFrameBootstrap] <@${this.arid}> Not renewing animation frame for some reason. Paused? ${this._paused}; Halted?: ${this._halted}, Exited?: ${this._exited}`);
}
}
calculateArFromEdges(edges) {
@ -570,14 +570,8 @@ class ArDetector {
return;
}
if (!this.blackframeContext) {
this.init();
}
let sampleCols = this.sampleCols.slice(0);
await new Promise<void>(
resolve => {
this.context.drawImage(this.video, 0, 0, this.canvas.width, this.canvas.height);