Files
grayjay/app
Simon Gardling b5caea6556 Expose live-stream state and edge detection
Foundational hooks for follow-up live-recovery and UI work; no behaviour
change on its own.

  - isLive: whether the current media item is live
  - liveOffsetMs: offset behind wall-clock live edge
  - targetLiveOffsetMs: manifest's intended offset (null if not declared)
  - isAtLiveEdge: target-aware boundary, with a 45s fallback for sources
    (e.g. YouTube HLS) that do not declare targetOffsetMs
  - seekToLiveEdge(): wraps Player.seekToDefaultPosition() for live items
  - onLiveChanged event, fired from onTimelineChanged/onMediaItemTransition
  - _isLiveSession sticky flag: stays true through the transient empty
    timeline the player goes through during a reload, so consumers can
    distinguish 'a live source is loaded' from the dynamic isLive bit

LIVE_EDGE_TOLERANCE_MS = 5s and LIVE_EDGE_FALLBACK_THRESHOLD_MS = 45s
are tuned to match what YouTube's HLS player reports (currentLiveOffset
sits at ~25-30s natively even at the edge, so a tighter threshold would
report 'behind' forever).
2026-05-01 01:15:42 -04:00
..
2026-03-11 12:51:17 -05:00
2023-09-25 17:18:43 +02:00
2026-03-11 12:51:17 -05:00
2023-09-25 17:18:43 +02:00