diff --git a/packages/frontend/src/components/MkMediaAudio.vue b/packages/frontend/src/components/MkMediaAudio.vue index 964a6ff1fa..bfeb60cc1b 100644 --- a/packages/frontend/src/components/MkMediaAudio.vue +++ b/packages/frontend/src/components/MkMediaAudio.vue @@ -207,7 +207,8 @@ function init() { isActuallyPlaying.value = false; isPlaying.value = false; }); - + + durationMs.value = audioEl.value.duration * 1000; audioEl.value.addEventListener('durationchange', () => { if (audioEl.value) { durationMs.value = audioEl.value.duration * 1000; diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue index 0f5fdfedc7..f08114fdd3 100644 --- a/packages/frontend/src/components/MkMediaVideo.vue +++ b/packages/frontend/src/components/MkMediaVideo.vue @@ -283,6 +283,7 @@ function init() { isPlaying.value = false; }); + durationMs.value = videoEl.value.duration * 1000; videoEl.value.addEventListener('durationchange', () => { if (videoEl.value) { durationMs.value = videoEl.value.duration * 1000;