From 6c8f53396bc19d6f6c6c5b52deebc205d86004c0 Mon Sep 17 00:00:00 2001 From: jmal Date: Fri, 12 May 2023 18:47:55 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=A7=86=E9=A2=91=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=B0=81=E9=9D=A2=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Icon/IconFile.vue | 5 ++++- src/components/ShowFile/ShowFile.vue | 3 +++ src/components/preview/VideoPreview.vue | 6 +----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Icon/IconFile.vue b/src/components/Icon/IconFile.vue index e8914b6..6af407a 100644 --- a/src/components/Icon/IconFile.vue +++ b/src/components/Icon/IconFile.vue @@ -32,12 +32,15 @@
-
+
+
+ +
diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 244e938..84a6b50 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -1007,6 +1007,9 @@ export default { let index = this.fileList.findIndex(file => file.id === fileDoc.id) if ('updateFile' === url) { if (index > -1) { + if (fileDoc.m3u8) { + this.fileList[index].m3u8 = fileDoc.m3u8 + } this.fileList[index].size = fileDoc.size this.fileList[index].agoTime = 1 this.fileList[index].updateDate = fileDoc.updateDate diff --git a/src/components/preview/VideoPreview.vue b/src/components/preview/VideoPreview.vue index 11f377c..57a164f 100644 --- a/src/components/preview/VideoPreview.vue +++ b/src/components/preview/VideoPreview.vue @@ -136,7 +136,6 @@ export default { } } this.option.url = videoUrl - console.log('this.option.url', this.option.url) if (this.file.m3u8) { this.option.customType = { m3u8: this.playM3u8 @@ -186,10 +185,9 @@ export default { // iina const iina = doc.querySelector('[data-index="1"]').querySelector('a'); iina.href = `iina://weblink?url=${this.videoLink}` - console.log('iina.href', iina.href) // nplayer const nplayer = doc.querySelector('[data-index="2"]').querySelector('a'); - let link = `nplayer-${this.videoLink}` + const link = `nplayer-${this.videoLink}` nplayer.href = link // infuse const infuse = doc.querySelector('[data-index="3"]').querySelector('a'); @@ -202,11 +200,9 @@ export default { hls.loadSource(url); hls.attachMedia(video); art.hls = hls; - console.log('Hls') art.on('destroy', () => hls.destroy()); } else if (video.canPlayType('application/vnd.apple.mpegurl')) { video.src = url; - console.log('Hls1') } else { art.notice.show = 'Unsupported playback format: m3u8'; }