From 0ad9b492245e201a44d40b7ee585bd0f8acb5756 Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Wed, 30 Dec 2020 17:08:21 +0100 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9C=89=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=88=97=E8=A1=A8=E6=97=B6=E7=9A=84=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 90a6f33..602ac20 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -622,13 +622,12 @@ export default { this.exportablePlaylist = false this.fetchPlaylist().then(async (fullList) => { var playlist = fullList[0].list - if (fullList.length > 1) { - playlist = fullList.find(x => x.flag === 'm3u8' || x.flag === 'mp4').list // 播放器支持的格式优先 - } - const videoFlag = this.video.info.videoFlag // 如果设定了特定的video flag, 获取该flag下的视频列表 + const videoFlag = this.video.info.videoFlag if (videoFlag) { playlist = fullList.find(x => x.flag === videoFlag).list + } else if (fullList.length > 1 && fullList.find(x => x.flag === 'm3u8' || x.flag === 'mp4')) { + playlist = fullList.find(x => x.flag === 'm3u8' || x.flag === 'mp4').list // 播放器支持的格式优先 } this.right.list = playlist var url = playlist[index].split('$')[1]