新增进度条缩略图功能
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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<number>();
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user