feat: wire NSBridge fully + HD artwork + disable watchdog in wrapper mode
player.js - Replace `_native()` function with `const HAS_BRIDGE` (evaluated once at module load so bridge detection is rock-solid) - Add `buildTrackList()` — maps S.queue to NSBridge Track array with 1024px artworkUrl so lock-screen cover is crisp on high-DPR displays - Add `_pushQueueIfBridge()` — called by `fillRadioQueue()` so radio top-ups are pushed to ExoPlayer in real time (fixes autoplay gap after radio refill) - `playQueue`: route through `NSBridge.setQueue` when bridge present; old `S.audio` path retained for browser/PWA fallback - `playCurrent`: `NSBridge.seekToIndex + play` in bridge mode - `nextSong / prevSong / togglePlay / onEnded`: delegate to bridge, skip local S.qIdx manipulation (native sends onTrackChanged callback instead) - `seekTo / _initBarScrub`: use `_lastDurationMs` for ms-accurate seeks - `onTrackChanged`: guard with `p.index !== S.qIdx` to avoid redundant redraws - `updateMediaSession`: artwork sizes 96/300/512 → 256/512/1024 - Player-bar cover: 100 → 256px; NP cover/bg: 400 → 1024px; queue items: 60 → 128px; preload hint sizes: 96/300/512 → 256/512/1024 main.js - Wrap watchdog setInterval in `typeof window.NSBridge === 'undefined'` guard; the foreground service keeps ExoPlayer alive — JS watchdog not needed there views.js - Album detail / playlist detail covers: 300 → 512px - Playlist grid cards: 200 → 512px - Search result song cards: 200 → 256px - Artist top-songs / all-songs thumbnails: 60 → 128px - Partial album art in _renderArtistAlbums: 300 → 512px components.js - makeAlbumCard: 200 → 512px - makeSongItem: 60 → 128px nowplaying.js - NP queue items: 60 → 128px - NP action sheet thumb: 80 → 256px sw.js - Bump CACHE to ns-v41 so stale small-cover entries are evicted on next load Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
0ee2a62adb
commit
76ecfe2268
6 files changed
+144
-113
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
||||
const CACHE = 'ns-v40';
|
||||
const CACHE = 'ns-v41';
|
||||
const PRECACHE = ['/', 'index.html', 'manifest.json', 'icon.svg'];
|
||||
const SKIP_PATHS = ['/rest/stream', '/rest/download', '/config.js'];
|
||||
// Auth token params stripped from cache keys so artwork survives across sessions/token refreshes.
|
||||
|
||||
Reference in new issue
Block a user