add timeout value to debug, only send scale command if it is > 0

pull/3725/head
Isaac Connor 2023-06-08 10:30:01 -04:00
parent 8485f19f86
commit 14eb38a00b
1 changed files with 5 additions and 3 deletions

View File

@ -51,7 +51,7 @@ function MonitorStream(monitorData) {
};
this.img_onload = function() {
if (!this.streamCmdTimer) {
console.log('Image stream has loaded! starting streamCmd for '+this.connKey);
console.log('Image stream has loaded! starting streamCmd for '+this.connKey+' in '+statusRefreshTimeout + 'ms');
this.streamCmdTimer = setTimeout(this.streamCmdQuery.bind(this), statusRefreshTimeout);
}
};
@ -472,9 +472,11 @@ function MonitorStream(monitorData) {
if (this.onplay) this.onplay();
} // end if paused or delayed
if ((this.status.scale !== undefined) && (this.status.scale !== undefined) && (this.status.scale != this.scale)) {
if (this.status.scale != 0) {
console.log("Stream not scaled, re-applying", this.scale, this.status.scale);
this.streamCommand({command: CMD_SCALE, scale: this.scale});
}
}
$j('#zoomValue'+this.id).text(this.status.zoom);
if (this.status.zoom == '1.0') {