What is Live Streaming in ExoPlayer & Live Window - devrath/MediaAlchemySuite GitHub Wiki

πŸŽ₯ What is Live Streaming in ExoPlayer?

  • Exoplayer supports adaptive live streaming like HLS and DASH, where the content is being produced in real-time.

πŸ” Understanding the Live Window

  • Live streams have a live window, A moving time window of available content.
  • Think of it like a rolling video buffer.
  • You'll be able to seek within this window only, not before it.
  • The current time is near the "live edge" (the latest point in the stream).
  • Live window is not present in progressive streams.

πŸ’‘ In Simple Terms:

  • A Live Window is a sliding time range that contains the portion of a live stream that is available for playback.
  • It moves forward in real time.
  • You'll be able to seek within this window, but not before its start.

πŸ“Ί Example

Suppose you're watching a news livestream that started at 10:00 AM:

Real Time Live Window Start Live Window End What You Can Do
10:05 AM 10:00 AM 10:05 AM Can seek within this 5 min window
10:10 AM 10:05 AM 10:10 AM Now window has moved forward
10:20 AM 10:15 AM 10:20 AM You can't seek before 10:15 AM anymore

β›” You cannot go back and watch the first 5 minutes anymore (unless it's DVR-enabled or recorded).

🧠 Why Live Window?

  • Adaptive live streams (e.g., HLS, DASH) don’t retain the entire live event history.
  • Only a sliding window (e.g., last 5 mins or 30 secs) is kept to minimize latency and save bandwidth.
  • Your playback is somewhere in that window β€” ideally near the live edge (latest point).

πŸ“Œ Terms to Remember

Term Meaning
Live Edge The latest point in the stream (real-time end)
Live Offset How far behind the live edge you're watching
Default Position Where playback starts in the live window (usually near live edge)

🧭 Visual Timeline

Real-Time:              10:00 ------ 10:05 ------ 10:10 ------ 10:15 ------ 10:20
Live Window (at 10:20):                    [10:15 -------- 10:20]
You Can Seek:                             ^ Within this 5-minute range

πŸ“ Live Offset

  • This is the delay between the live edge (real-time) and the current playback position.