Files
ytplayer/package.json
Jonathan Sykes 84d6487125 feat: wire up WEB-mode OPFS offline cache for PWA
The PWA conversion shipped sw.js, opfs.js, manifest and icons, but app.js
was never updated to use them — it still routed cache_* calls through the
native bridge (call('cache.list', ...)), which throws 'No native bridge
available' in a browser. That surfaced as 'Offline cache unavailable /
not available in this build' on the Saved videos and Settings pages.

- Add WEB mode detection (no Tauri/zero bridge present)
- Route cache_* through OPFS (opfsDownload/Status/List/Delete/Clear)
- Proxy downloads via /api/download so the browser never hits YouTube CDN
- Load fingerprint.js + opfs.js; add manifest link and PWA meta tags
- Relax CSP to allow blob: media/img and worker-src 'self' for the SW
2026-06-30 08:37:45 +08:00

21 lines
650 B
JSON
Executable File

{
"name": "ytplayer",
"version": "1.0.0",
"description": "Ad-free YouTube player with local playlists. No login, no ads, direct streams via yt-dlp. zero-native (Linux/macOS) and Tauri (Windows) shells.",
"scripts": {
"setup": "node scripts/setup-ytdlp.js",
"update-ytdlp": "node scripts/setup-ytdlp.js --force",
"make-icon": "node scripts/make-icon.js",
"make-pwa-icons": "node scripts/make-pwa-icons.js",
"tauri": "tauri",
"tauri:dev": "tauri dev",
"tauri:build": "tauri build",
"test": "node --test frontend/"
},
"author": "",
"license": "MIT",
"devDependencies": {
"@tauri-apps/cli": "^2"
}
}