From 2b5dca7d6712f0b74dae16b5e150b006b63a42e7 Mon Sep 17 00:00:00 2001 From: jmal Date: Fri, 20 Sep 2024 15:02:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dflv=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E9=A2=91=E5=9C=A8=E8=BD=AC=E7=A0=81=E5=90=8E?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=92=AD=E6=94=BE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/preview/VideoPreview.vue | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/preview/VideoPreview.vue b/src/components/preview/VideoPreview.vue index 6d3d863..19d1000 100644 --- a/src/components/preview/VideoPreview.vue +++ b/src/components/preview/VideoPreview.vue @@ -146,7 +146,7 @@ export default { this.option.url = videoUrl if (this.file.m3u8) { - const supported = ['mp4', 'ogg', 'mkv', 'webm', 'hls', 'mov'] + const supported = ['mp4', 'ogg', 'mkv', 'webm', 'hls', 'mov', 'flv'] if (supported.includes(this.file.suffix.toLowerCase())) { this.option.quality = [ { @@ -161,7 +161,8 @@ export default { ] } this.option.customType = { - m3u8: this.playM3u8 + m3u8: this.playM3u8, + flv: this.playFlv } this.option.plugins = [ artplayerPluginVttThumbnail({ @@ -170,14 +171,6 @@ export default { ] } - if (this.file.contentType.indexOf('flv') > -1) { - this.option.url = originUrl - this.option.quality = [] - this.option.customType = { - flv: this.playFlv - } - } - this.videoLink = window.location.origin + originUrl this.title = this.file.name this.option.id = this.file.id