Package-level declarations
Types
Backing view model for BunnyLiveStreamPlayer. Owns the polling loop, the play-data fetches, and the trailer fetch — exposes a single StateFlow of LiveStreamPlayerState for the UI to consume. Mirrors the behaviour of Bunny's web player.
Pure description of what the live player should display right now. Computed from the latest LiveStream + LiveStreamPlayData snapshot plus the wall clock — no Android types, no coroutines, no mutable state. Lives here so we can unit-test the entire web-player decision tree without spinning up a player.
Functions
Public Compose entry point for live-stream playback. Mirrors Bunny's web player behaviour for every non-running state (offline overlays, countdown, pre-stream trailer) and auto-connects to the live source when polling reports the stream is running — the viewer never needs to refresh.
Resolves the display state for a live stream.
Resolves the best HLS URL from a LiveStreamPlayData in the same priority order the demo stopgap used: LiveStreamPlayData.videoPlaylistUrl (token-aware, what the iframe uses) ->LiveStreamPlayData.fallbackUrl (CDN edge alternative) -> the list-endpoint LiveStream.playbackUrlHls (often 403s on token-auth libraries; last resort).