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

@ -208,6 +208,7 @@ function init() {
isPlaying.value = false; isPlaying.value = false;
}); });
durationMs.value = audioEl.value.duration * 1000;
audioEl.value.addEventListener('durationchange', () => { audioEl.value.addEventListener('durationchange', () => {
if (audioEl.value) { if (audioEl.value) {
durationMs.value = audioEl.value.duration * 1000; durationMs.value = audioEl.value.duration * 1000;

View File

@ -283,6 +283,7 @@ function init() {
isPlaying.value = false; isPlaying.value = false;
}); });
durationMs.value = videoEl.value.duration * 1000;
videoEl.value.addEventListener('durationchange', () => { videoEl.value.addEventListener('durationchange', () => {
if (videoEl.value) { if (videoEl.value) {
durationMs.value = videoEl.value.duration * 1000; durationMs.value = videoEl.value.duration * 1000;