Revert "feat(web): gapless audio handoff to fix desktop media-tile flicker"

This reverts commit 98d7c84269.
This commit is contained in:
Honey committed 2026-06-26 17:45:40 +02:00
1 parent 98d7c84269
commit 420c84d191
4 files changed
+48 -92

No files matched your search

+1 -1
View File
@@ -74,7 +74,7 @@ Versioning: two-part `MAJOR.MINOR` — each release bumps the minor (features an
- **Android** — Offline detail screen flashed open then immediately returned: its initial empty state (before Room emitted) was mistaken for "deleted". Now shows a brief spinner until loaded, and only leaves when the last song is actually removed
- **Android** — Lyrics autoscroll: rewrote centering to use the active line's *measured* position in a `LazyColumn` instead of a fixed line-height estimate. Eliminates the stutter and the downward drift on wrapped (multi-line) lyrics — the active line now tracks smoothly and sits at a natural ~40 %-from-top reading anchor
- **Web** — Home now refreshes on an explicit Home click (matching Android): the album rows re-fetch and the random row re-randomizes instead of serving the 5-minute cache. Back/forward navigation still keeps the cached state
- **Web (PWA)** — OS media tile no longer disappears/reappears when skipping tracks on desktop. Two fixes: (1) the Media Session metadata is mutated in place instead of replaced with a new `MediaMetadata` each track, and (2) gapless handoff — playback is handed to a second, pre-buffered `<audio>` element on skip so the active element never empties (the source-swap gap is what made Windows hide the tile). Falls back to the classic source swap when the next track isn't preloaded
- **Web (PWA)** — OS media tile no longer disappears/reappears when skipping tracks on desktop: the Media Session metadata is now mutated in place instead of replaced with a new `MediaMetadata` each track (which made Windows rebuild the tile)
### Internal
- **Android** — Offline system: `Room` DB (`novasonic_offline.db`) with `downloaded_tracks`, `download_groups`, `group_track_cross_refs`; `OfflineRepository` holds hot `StateFlow` maps for O(1) local-path lookups; `DownloadWorker` streams audio + cover art via `HttpURLConnection` to `context.filesDir/offline/{audio|covers}/`. `MusicRepository.streamUrl()` checks local files first, so playback uses the `file://` URI on every entry point