diff mrjunejune/src/public/sw.js @ 242:543df0fe7168

[tools] Add full HLS player support
author MrJuneJune <me@mrjunejune.com>
date Mon, 03 Aug 2026 13:14:41 -0700
parents 9c2eec61a152
children
line wrap: on
line diff
--- a/mrjunejune/src/public/sw.js	Mon Aug 03 11:26:30 2026 -0700
+++ b/mrjunejune/src/public/sw.js	Mon Aug 03 13:14:41 2026 -0700
@@ -1,5 +1,5 @@
 // Service Worker for MrJuneJune PWA
-const CACHE_VERSION = 'v2-webp';
+const CACHE_VERSION = 'v4-hlsjs';
 const CACHE_NAME = `mrjunejune-${CACHE_VERSION}`;
 
 // Files to cache immediately on install
@@ -69,6 +69,12 @@
     return;
   }
 
+  // The HLS tool and media must always reflect the current player version.
+  if (url.pathname.startsWith('/tools/hls_player') ||
+      url.pathname.startsWith('/public/hls-sample/')) {
+    return;
+  }
+
   event.respondWith(
     caches.match(request).then((cachedResponse) => {
       if (cachedResponse) {