Fix AudioPlayer console errors.

This commit is contained in:
Buster Neece 2023-01-09 17:15:28 -06:00
parent ff2402c556
commit abd8c964fc
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
2 changed files with 5 additions and 3 deletions

View File

@ -92,8 +92,10 @@ const play = () => {
};
$audio.value.ontimeupdate = () => {
duration.value = ($audio.value.duration !== Infinity && !isNaN($audio.value.duration)) ? $audio.value.duration : 0;
currentTime.value = $audio.value.currentTime;
const audioDuration = $audio.value?.duration ?? 0;
duration.value = (audioDuration !== Infinity && !isNaN(audioDuration)) ? audioDuration : 0;
currentTime.value = $audio.value?.currentTime ?? null;
};
$audio.value.volume = getLogarithmicVolume(props.volume);

View File

@ -130,7 +130,7 @@ const toggleMute = () => {
}
.inline-volume-controls {
width: 175px;
width: 125px;
}
input.player-volume-range,