修复 raw 模式下播放器文件大小无法统计,及 raw 模式错误调用 prepare

This commit is contained in:
2021-05-26 00:39:58 +08:00
parent 19241d10f5
commit 91082e343c

View File

@@ -577,7 +577,7 @@ const component_audio_player = {
file() {
// 如果没有勾选 prepare 则直接播放
// 否则进入 prepare 流程
if (this.prepare) {
if (this.prepare && this.file.play_back_type === 'stream') {
this.prepare_func()
} else {
this.playing_file = this.file
@@ -599,6 +599,9 @@ const component_audio_player = {
if (this.prepare) {
filesize = this.prepared_filesize
}
if (this.playing_file.play_back_type === 'raw') {
filesize = this.playing_file.filesize
}
if (filesize < 1024 * 1024) {
return filesize
}