Skip to content

Commit

Permalink
[player] improve tile preloading
Browse files Browse the repository at this point in the history
It was not preloading on first init of previewId
  • Loading branch information
NicoPennec committed Oct 17, 2023
1 parent d44c3cb commit ec82918
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/components/previews/VideoProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}
Expand Down

0 comments on commit ec82918

Please sign in to comment.