From ec829184cd42e446b93243f292ec5e9711eab392 Mon Sep 17 00:00:00 2001 From: Nicolas Pennec Date: Fri, 13 Oct 2023 12:06:29 +0200 Subject: [PATCH] [player] improve tile preloading It was not preloading on first init of previewId --- src/components/previews/VideoProgress.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/previews/VideoProgress.vue b/src/components/previews/VideoProgress.vue index 67b33e4f53..8a1817a293 100644 --- a/src/components/previews/VideoProgress.vue +++ b/src/components/previews/VideoProgress.vue @@ -384,13 +384,16 @@ export default { this.updateProgressBar(0) }, - previewId() { - if (this.movieDimensions.width && this.previewId) { - this.isTileLoading = true - const img = new Image() - img.src = this.tilePath - img.onload = () => { - this.isTileLoading = false + previewId: { + immediate: true, + handler() { + if (this.previewId) { + this.isTileLoading = true + const img = new Image() + img.src = this.tilePath + img.onload = () => { + this.isTileLoading = false + } } } }