This commit is contained in:
kakkokari-gtyih 2024-01-06 20:09:45 +09:00
parent 006aaf3613
commit 488c0c248f
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -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;