feat(media,android): live channels in ExoPlayer — LiveWatcher, ShadeLiveDataSource
LiveWatcher is the Android LiveWatchClient (OkHttp WebSocket, subscribe with the read token, reconnect with backoff, backlog deduplicated by the subscriber). ShadeLiveDataSource turns frames into one endless WebM/fMP4 stream for ExoPlayer's extractors: init, then media from the first keyframe, and after a gap nothing until the next keyframe. Late joiners start at 0:00 (fMP4: per-join TimestampAdjuster; WebM: cluster Timecode rewritten in place). A changed init fails with a ParserException (not retried). The demo app plays live video and follows log channels. LiveSubscriber.close() wipes keys, as in TS. Verified (Robolectric): late join on H.264/AAC fMP4 and VP8/Opus WebM cut by the TS splitter (fixtures from scripts/make-live-fixtures.ts) plays from the keyframe, rebased (mutation check: without the rebase the WebM test fails, 5020 vs 4250 ms); gap recovery; format change; LiveWatcher against MockWebServer with a dropped connection and backlog replay. Kotlin 81/0. Not yet run on a device. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,7 @@ decided: "2026-10-18 — Cardwell: neste steg er Shade-streaming av tekst, video
|
||||
- [x] Android: `:shade-android-media` (Media3 `ShadeMediaDataSource`, Robolectric-test med ExoPlayer som spiller og spoler) + `:shade-media-demo`-APK
|
||||
- [x] Album: én lenke for en sesong/et fotoalbum (forseglet liste av grants), `shade media put dir/`, rutenett i `/watch/`, Kotlin-leser + vektor
|
||||
- [x] Sikkerhet: `shade media get` brukte `meta.name` som filsti (sti-traversering) — rettet
|
||||
- [x] Android live: `LiveWatcher` + `ShadeLiveDataSource` (WebM/fMP4 i ExoPlayer, sen innstigning, hull, tidslinje fra 0), demo-appen spiller live video og følger loggkanaler
|
||||
|
||||
## Neste
|
||||
- Kjør `:shade-media-demo` på dev-telefonen (RFCN504DWJF var ikke tilkoblet 2026-10-18)
|
||||
|
||||
Reference in New Issue
Block a user