77 :auto-next-enabled =" autoNextEnabled"
88 :countdown-enabled =" countdownEnabled"
99 :skip-enabled =" skipEnabled"
10+ :show-debug-button =" showDebugButton"
1011 @toggle-auto-next =" toggleAutoNext"
1112 @toggle-countdown =" toggleCountdown"
1213 @player-change =" handlePlayerTypeChange"
1314 @open-skip-settings =" openSkipSettingsDialog"
15+ @toggle-debug =" toggleDebugDialog"
1416 @close =" closePlayer"
1517 />
1618 <div class =" art-player-wrapper" v-show =" props.visible" >
5052 @close =" closeSkipSettingsDialog"
5153 @save =" saveSkipSettings"
5254 />
55+
56+ <!-- 调试信息弹窗组件 -->
57+ <DebugInfoDialog
58+ :visible =" showDebugDialog"
59+ :video-url =" videoUrl"
60+ :headers =" headers"
61+ :player-type =" 'artplayer'"
62+ :detected-format =" detectedFormat"
63+ @close =" closeDebugDialog"
64+ />
5365 </div >
5466 </a-card >
5567</template >
@@ -66,6 +78,7 @@ import { MediaPlayerManager, detectVideoFormat, createCustomPlayer, destroyCusto
6678Artplayer .PLAYBACK_RATE = [0.5 , 0.75 , 1 , 1.25 , 1.5 , 2 , 2.5 , 3 , 4 , 5 ]
6779import PlayerHeader from ' ./PlayerHeader.vue'
6880import SkipSettingsDialog from ' ./SkipSettingsDialog.vue'
81+ import DebugInfoDialog from ' ./DebugInfoDialog.vue'
6982import { useSkipSettings } from ' @/composables/useSkipSettings'
7083import { applyCSPBypass , setVideoReferrerPolicy , REFERRER_POLICIES , getCSPConfig } from ' @/utils/csp'
7184
@@ -130,6 +143,15 @@ const autoNextTimer = ref(null) // 自动下一集定时器
130143const showAutoNextDialog = ref (false ) // 显示自动下一集对话框
131144const countdownEnabled = ref (false ) // 倒计时开关,默认关闭
132145
146+ // 调试相关
147+ const showDebugDialog = ref (false )
148+ const detectedFormat = ref (' ' )
149+
150+ // 计算属性:是否显示调试按钮
151+ const showDebugButton = computed (() => {
152+ return !! props .videoUrl
153+ })
154+
133155// 选集弹窗相关数据已移除,现在使用ArtPlayer的layer功能
134156
135157// 使用片头片尾设置组合式函数
@@ -288,6 +310,7 @@ const initArtPlayer = async (url) => {
288310 try {
289311 // 检测视频格式
290312 const videoFormat = detectVideoFormat (url)
313+ detectedFormat .value = videoFormat
291314 console .log (' 检测到视频格式:' , videoFormat)
292315
293316 // 创建 ArtPlayer 实例
@@ -732,6 +755,15 @@ const toggleCountdown = () => {
732755 }
733756}
734757
758+ // 调试弹窗控制方法
759+ const toggleDebugDialog = () => {
760+ showDebugDialog .value = ! showDebugDialog .value
761+ }
762+
763+ const closeDebugDialog = () => {
764+ showDebugDialog .value = false
765+ }
766+
735767// 滚动到当前选集位置
736768const scrollToCurrentEpisode = async () => {
737769 // 等待DOM更新
0 commit comments