From 6f77b92443dea8ae8ef7fcc4558472e38b197579 Mon Sep 17 00:00:00 2001 From: Hiram <> Date: Mon, 24 Feb 2025 02:02:22 +0800 Subject: [PATCH] [bug] fix build error --- electron.vite.config.ts | 2 +- package.json | 3 ++- src/renderer/src/components/player/src/core/artplayer.ts | 2 +- src/renderer/src/components/player/src/core/dplayer.ts | 1 + src/renderer/src/components/player/src/core/nplayer.ts | 1 + src/renderer/src/components/player/src/core/oplayer.ts | 4 +--- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 607f5c46a..3c8b28fef 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -87,7 +87,7 @@ export default defineConfig(({ mode }: ConfigEnv) => { artplayer: ['artplayer', 'artplayer-plugin-danmuku'], dplayer: ['dplayer'], nplayer: ['nplayer', '@nplayer/danmaku'], - oplayer: ['@oplayer/core', '@oplayer/plugins', '@oplayer/danmaku', '@oplayer/hls', '@oplayer/ui', '@oplayer/dash', '@oplayer/mpegts', '@oplayer/torrent'], + oplayer: ['@oplayer/core', '@oplayer/plugins', '@oplayer/danmaku', '@oplayer/hls', '@oplayer/ui', '@oplayer/dash', '@oplayer/mpegts'], 'video-decoder': ['dashjs', 'flv.js', 'hls.js', 'mpegts.js','shaka-player'], tdesign: ['tdesign-vue-next', 'tdesign-icons-vue-next', '@tdesign-vue-next/chat'], md: ['markdown-it', 'highlight.js', 'markdown-it-mathjax3'], diff --git a/package.json b/package.json index 7e3a652c0..465589c5e 100644 --- a/package.json +++ b/package.json @@ -73,8 +73,8 @@ "@oplayer/dash": "^1.2.27-beta.1", "@oplayer/hls": "^1.2.28-beta.1", "@oplayer/mpegts": "^1.2.26-beta.0", - "@oplayer/torrent": "^1.2.25-beta.2", "@oplayer/plugins": "^1.0.15-beta.3", + "@oplayer/torrent": "^1.2.25-beta.2", "@oplayer/ui": "^1.3.4-beta.3", "@swc/core": "^1.10.18", "@tdesign-vue-next/chat": "^0.1.4", @@ -141,6 +141,7 @@ "luna-data-grid": "^1.3.0", "luna-dom-viewer": "^1.4.0", "luna-object-viewer": "^0.3.1", + "m3u8-parser": "^7.2.0", "markdown-it": "^14.1.0", "markdown-it-mathjax3": "^4.3.2", "mime-types": "^2.1.35", diff --git a/src/renderer/src/components/player/src/core/artplayer.ts b/src/renderer/src/components/player/src/core/artplayer.ts index 877df1ddb..b66acc437 100644 --- a/src/renderer/src/components/player/src/core/artplayer.ts +++ b/src/renderer/src/components/player/src/core/artplayer.ts @@ -1,11 +1,11 @@ import Artplayer from 'artplayer'; import artplayerPluginDanmuku from 'artplayer-plugin-danmuku'; + import publicStream from '../utils/media-stream'; import { publicBarrageSend, playerStorage } from '../utils/tool'; import { publicColor, publicIcons } from '../utils/static'; import emitter from '@/utils/emitter'; - class ArtPlayerAdapter { player: Artplayer | null = null; options: { [key: string]: any } = { diff --git a/src/renderer/src/components/player/src/core/dplayer.ts b/src/renderer/src/components/player/src/core/dplayer.ts index 1b4ffc635..0ec0fde94 100644 --- a/src/renderer/src/components/player/src/core/dplayer.ts +++ b/src/renderer/src/components/player/src/core/dplayer.ts @@ -1,4 +1,5 @@ import DPlayer from 'dplayer'; + import publicStream from '../utils/media-stream'; import { playerStorage } from '../utils/tool'; import { publicIcons } from '../utils/static'; diff --git a/src/renderer/src/components/player/src/core/nplayer.ts b/src/renderer/src/components/player/src/core/nplayer.ts index fe2740708..1904c1450 100644 --- a/src/renderer/src/components/player/src/core/nplayer.ts +++ b/src/renderer/src/components/player/src/core/nplayer.ts @@ -1,5 +1,6 @@ import NPlayer, { EVENT as NPlayerEvent, Icon as NPlayerIcon } from 'nplayer'; import nplayerDanmaku from '@nplayer/danmaku'; + import publicStream from '../utils/media-stream'; import { publicBarrageSend, playerStorage } from '../utils/tool'; import { publicIcons } from '../utils/static'; diff --git a/src/renderer/src/components/player/src/core/oplayer.ts b/src/renderer/src/components/player/src/core/oplayer.ts index 4246b6039..647eb68e9 100644 --- a/src/renderer/src/components/player/src/core/oplayer.ts +++ b/src/renderer/src/components/player/src/core/oplayer.ts @@ -1,5 +1,5 @@ import OPlayer from '@oplayer/core'; -import { Chromecast, AirPlay, Playlist, ad, vttThumbnails } from '@oplayer/plugins'; +// import { Chromecast, AirPlay, Playlist, ad, vttThumbnails } from '@oplayer/plugins'; import OUI from '@oplayer/ui'; import ODanmaku from '@oplayer/danmaku'; import OHls from '@oplayer/hls'; @@ -7,12 +7,10 @@ import ODash from '@oplayer/dash'; import OMpegts from '@oplayer/mpegts'; // import OTorrent from '@oplayer/torrent'; - import { publicBarrageSend, playerStorage } from '../utils/tool'; import { publicColor, publicIcons } from '../utils/static'; import emitter from '@/utils/emitter'; - class OPlayerAdapter { player: OPlayer | null = null; options: { [key: string]: any } = {