From 488c0c248f03085ef4804b06f5d7b547ff7391e8 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Sat, 6 Jan 2024 20:09:45 +0900 Subject: [PATCH] fix --- packages/frontend/src/components/MkMediaAudio.vue | 3 ++- packages/frontend/src/components/MkMediaVideo.vue | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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;