- 未加载媒体元数据时默认显示零时长 - 使用音频文件真实媒体时长更新播放器 - 避免使用不准确的接口时长覆盖播放器显示 - 补充音频时长回归测试 Made-with: Proma
This commit is contained in:
@@ -374,14 +374,9 @@ const formatDetailAudioTime = (seconds?: number) => {
|
||||
|
||||
return `${minutes}:${remainSeconds.toString().padStart(2, '0')}`
|
||||
}
|
||||
const detailAudioDurationSeconds = computed(() => {
|
||||
if (!isCurrentDetailAudioTarget.value) return exhibit.value.audio.duration || 0
|
||||
|
||||
return globalAudioPlayer.duration.value
|
||||
|| globalAudioPlayer.currentAudio.value?.duration
|
||||
|| exhibit.value.audio.duration
|
||||
|| 0
|
||||
})
|
||||
const detailAudioDurationSeconds = computed(() => (
|
||||
isCurrentDetailAudioTarget.value ? globalAudioPlayer.duration.value : 0
|
||||
))
|
||||
const detailAudioCurrentSeconds = computed(() => (
|
||||
isCurrentDetailAudioTarget.value ? globalAudioPlayer.currentTime.value : 0
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user