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}if var item = OGMediaItem(urlString: "https://example.com/channel.m3u8") { item.streamType = .liveDVR // or .live player.load(item)}
if let info = player.liveInfo { // dvrWindow, atLiveEdge, latency, playheadDate}player.load({ url: "https://example.com/channel.m3u8", streamType: "LIVE_DVR", // or "LIVE" title: "Channel 1",});
const info = player.liveInfo;// { dvrWindowMs, atLiveEdge, latencyMs, playheadWallClockMs }Edge behaviour
Section titled “Edge behaviour”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.