Force reel videos to remount on movie change

This commit is contained in:
2026-05-30 22:33:23 +00:00
parent df9025760d
commit 01f424dbfb
+6
View File
@@ -30,6 +30,7 @@
<div class="collage-fallback-tile" :class="`collage-fallback-${slot.index + 1}`"></div> <div class="collage-fallback-tile" :class="`collage-fallback-${slot.index + 1}`"></div>
<video <video
v-if="slot.sourcePaths.length > 0" v-if="slot.sourcePaths.length > 0"
:key="`${item.id}-${slot.index}-${slot.sourcePaths.join('|')}`"
:ref="(el) => setVideoRef(el as HTMLVideoElement, slot.index)" :ref="(el) => setVideoRef(el as HTMLVideoElement, slot.index)"
:class="{ 'is-ready': isVideoReady(slot.index) }" :class="{ 'is-ready': isVideoReady(slot.index) }"
:autoplay="safariAutoplay" :autoplay="safariAutoplay"
@@ -555,6 +556,11 @@ watch(
) )
videoStates.value = slots.map((slot) => (slot.sourcePaths.length > 0 ? "loading" : "missing")) videoStates.value = slots.map((slot) => (slot.sourcePaths.length > 0 ? "loading" : "missing"))
await nextTick() await nextTick()
for (let i = 0; i < videoRefs.value.length; i++) {
if (slots[i]?.sourcePaths.length > 0) {
videoRefs.value[i]?.load()
}
}
setTimeout(() => { setTimeout(() => {
startStaggeredPlayback() startStaggeredPlayback()
}, 100) }, 100)