Add a cache breaker argument to the jpg request. On some systems the image was not updating as the sequence progressed. Need to optimize the thumbnailing code for bigger video files

This commit is contained in:
Matt McWilliams 2024-08-29 19:44:42 -04:00
parent 3c68496f5e
commit 7a18edcf6e
3 changed files with 3 additions and 3 deletions

View File

@ -107,7 +107,7 @@ class Display {
img.onload = function () { img.onload = function () {
this.ctx.drawImage(img, this.displayOffsetX, this.displayOffsetY, this.displayWidth, this.displayHeight); this.ctx.drawImage(img, this.displayOffsetX, this.displayOffsetY, this.displayWidth, this.displayHeight);
}.bind(this); }.bind(this);
img.src = `/${this.displayWidth}/${this.displayHeight}/image.jpg`; img.src = `/${this.displayWidth}/${this.displayHeight}/image.jpg?cacheBreaker=${+new Date()}`;
} }
public update (msg : Message) { public update (msg : Message) {

View File

@ -92,7 +92,7 @@ class Display {
img.onload = function () { img.onload = function () {
this.ctx.drawImage(img, this.displayOffsetX, this.displayOffsetY, this.displayWidth, this.displayHeight); this.ctx.drawImage(img, this.displayOffsetX, this.displayOffsetY, this.displayWidth, this.displayHeight);
}.bind(this); }.bind(this);
img.src = `/${this.displayWidth}/${this.displayHeight}/image.jpg`; img.src = `/${this.displayWidth}/${this.displayHeight}/image.jpg?cacheBreaker=${+new Date()}`;
} }
update(msg) { update(msg) {
} }

File diff suppressed because one or more lines are too long