Skip to content

Live & DVR

Declare the stream type and the player does the rest. LIVE locks to the live edge: no scrubber, no seek buttons, no time labels — the LIVE chip is the state. LIVE_DVR keeps scrubbing within the seekable window and shows how far behind the edge the viewer is; tapping the chip jumps back to live. Playback speed is hidden for both (meaningless on live).

player.load(
OGMediaItem.Builder("https://example.com/channel.m3u8")
.setStreamType(StreamType.LIVE_DVR) // or StreamType.LIVE
.setTitle("Channel 1")
.build(),
)
player.liveInfo?.let { info ->
// dvrWindowMs, atLiveEdge, latencyMs, playheadWallClockMs
}
  • seekToLiveEdge() jumps to the newest point; the LIVE chip calls it for you.
  • onLiveEdgeChanged(atLiveEdge) fires as the viewer drifts behind or catches up.
  • Falling out of the DVR window raises error 6000 BEHIND_LIVE_WINDOW — but only after the SDK has silently retried at the live edge first.