From 336bfe736d0af480cdbdd2efcb8851524d2e25b0 Mon Sep 17 00:00:00 2001 From: mtvpls Date: Thu, 11 Jun 2026 02:25:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BF=9B=E5=BA=A6=E6=9D=A1?= =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/app/play/page.tsx | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cf6245b..0f24a22 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@xmldom/xmldom": "^0.9.10", "anime4k-webgpu": "^1.0.0", "artplayer": "^5.4.0", + "artplayer-plugin-auto-thumbnail": "^1.1.0", "artplayer-plugin-danmuku": "^5.2.0", "better-sqlite3": "^12.6.2", "bs58": "^6.0.0", diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 5740680..a3588da 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -6142,15 +6142,17 @@ function PlayPageClient() { } // 动态导入播放器库 - const [ArtplayerModule, HlsModule, DanmukuPlugin] = await Promise.all([ + const [ArtplayerModule, HlsModule, DanmukuPlugin, AutoThumbnailPlugin] = await Promise.all([ import('artplayer'), import('hls.js'), import('artplayer-plugin-danmuku'), + import('artplayer-plugin-auto-thumbnail'), ]); const Artplayer = ArtplayerModule.default; const Hls = HlsModule.default; const artplayerPluginDanmuku = DanmukuPlugin.default as any; + const artplayerPluginAutoThumbnail = AutoThumbnailPlugin.default as any; const playerTimeouts = new Set(); const clearTrackedTimeout = (timeoutId: number | null) => { if (timeoutId == null) { @@ -6563,8 +6565,13 @@ function PlayPageClient() { }); }, }, - // 弹幕插件 plugins: [ + artplayerPluginAutoThumbnail({ + url: videoUrl, + width: 160, + number: 100, + scale: 1, + }), artplayerPluginDanmuku({ danmuku: [], speed: danmakuSettingsRef.current.speed,