From fa0a0d76cd887c95e3a69e0103fdd2786e2c57d6 Mon Sep 17 00:00:00 2001 From: kfj001 Date: Sun, 16 Aug 2026 16:28:55 -0700 Subject: [PATCH] fix: rename hls.min.js -> hls.js to match vite build output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The vite config outputs 'hls.js' but manifest.json and viewer.js both referenced 'hls.min.js', causing chrome.runtime.getURL() to return a 404 — triggering 'HLS player unavailable'. - Update web_accessible_resources entry in manifest.json - Update loadHlsJs() chrome.runtime.getURL reference - Add debug log of manifest URL being loaded for diagnostics --- manifest.json | 5 +++-- src/viewer/viewer.js | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 35afb91..1638b10 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,8 @@ "permissions": [ "storage", "tabs", - "scripting" + "scripting", + "webRequest" ], "host_permissions": [ "" @@ -33,7 +34,7 @@ ], "web_accessible_resources": [ { - "resources": ["interceptors.js", "hls.min.js"], + "resources": ["interceptors.js", "hls.js"], "matches": [""] } ], diff --git a/src/viewer/viewer.js b/src/viewer/viewer.js index 3c62c2f..6d46a00 100644 --- a/src/viewer/viewer.js +++ b/src/viewer/viewer.js @@ -709,6 +709,9 @@ function playHls(video, manifestUrl, panel) { origDestroy(); }; + // Log the manifest URL being loaded for debugging (helps diagnose playback failures). + console.log(`[goon-viewer] Loading HLS manifest:`, manifestUrl.substring(0, 200)); + hls.loadSource(manifestUrl); hls.attachMedia(video); } @@ -726,7 +729,7 @@ function loadHlsJs() { return; } const script = document.createElement('script'); - script.src = chrome.runtime.getURL('hls.min.js'); + script.src = chrome.runtime.getURL('hls.js'); script.onload = () => resolve(); script.onerror = () => reject(new Error('Hls.js bundle unavailable - rebuild the extension.')); document.head.appendChild(script);