From 5c2700f9fdda2b938a7d204d33395793d54546c8 Mon Sep 17 00:00:00 2001 From: knight Date: Mon, 5 May 2025 16:34:33 -0400 Subject: [PATCH] Add video player with controls, hotkeys, and quality selection for DASH streams --- assets/js/player.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/assets/js/player.js b/assets/js/player.js index 16274bb1..d1c017e8 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -25,11 +25,10 @@ var options = { ] }, html5: { + preloadTextTracks: false, vhs: { - overrideNative: true // always use VHS - }, - nativeAudioTracks: false, // disable native tracks***optional - nativeVideoTracks: false // – they interfere with VHS + overrideNative: true + } } }; @@ -350,6 +349,17 @@ if (video_data.params.autoplay) { if (!video_data.params.listen && video_data.params.quality === 'dash') { console.log('[Invidious Debug] Initializing httpSourceSelector...'); console.log('[Invidious Debug] Player sources BEFORE httpSourceSelector init:', JSON.stringify(player.currentSources())); + + // --- START Pre-Plugin Environment Check --- + console.log('[Invidious Debug] Checking environment before httpSourceSelector call:'); + console.log('[Invidious Debug] - typeof window.fetch:', typeof window.fetch); + console.log('[Invidious Debug] - typeof window.XMLHttpRequest:', typeof window.XMLHttpRequest); + console.log('[Invidious Debug] - typeof window.Promise:', typeof window.Promise); + console.log('[Invidious Debug] - typeof window.URL:', typeof window.URL); + console.log('[Invidious Debug] - typeof window.DOMParser:', typeof window.DOMParser); + console.log('[Invidious Debug] - videojs.options:', JSON.stringify(videojs.options)); + // --- END Pre-Plugin Environment Check --- + try { player.httpSourceSelector(); // This triggers manifest fetch & parsing console.log('[Invidious Debug] httpSourceSelector initialized (call successful).'); // Log after call