playLiveUrl

fun playLiveUrl(libraryId: Long, streamId: String, videoTitle: String, hlsUrl: String, enableSubtitles: Boolean = false, playData: LiveStreamPlayData? = null, dvrEnabled: Boolean = false, isVodRecording: Boolean = false, startPositionMs: Long? = null)(source)

Play a pre-resolved HLS URL through the standard Bunny player UI (custom controller, progress text auto-contrast, fullscreen, etc.). Used by the live-stream Compose surface in net.bunny.bunnystreamplayer.livestream so live playback looks visually identical to VOD — same controls, same chrome.

Unlike playVideo, this method does not fetch video metadata or player settings from the server: the caller already has both (resolved from the live stream's play-data endpoint), and going through the videos play-data endpoint would 404 for a live-only stream id. We synthesise the minimal VideoModel the engine needs; PlayerSettings is built from the live /play customization via livePlayerSettings — the live player is server-driven (dashboard player settings), mirroring the iOS SDK. No client-side configuration.

Parameters

libraryId

the Bunny library id.

streamId

the live-stream GUID (used as the engine's currentVideoId so position resume keys don't collide with VOD entries).

videoTitle

title for analytics/logging; not shown in the controls (the demo screen already renders a top app bar with the title).

hlsUrl

pre-resolved playable URL (videoPlaylistUrl > fallbackUrl > playbackUrlHls).

enableSubtitles

forwarded to the synthetic PlayerSettings. Defaults to false for live (Bunny doesn't currently surface live captions through this path).

playData

the live /play response carrying the dashboard customization (accent colour, font, UI language, control tokens, compact mode, heatmap). null (not fetched yet) falls back to SDK defaults.

isVodRecording

the URL is the ended stream's recording (live→VOD hand-off): the timeline stays (a recording is fully seekable) and CMCD reports st=v.

startPositionMs

where playback should start, in milliseconds, or null for the beginning. The live surface passes the position the viewer was at when it rebuilds the player after a playback failure: a recovery must not send them back to the start of a recording they were half way through. It takes precedence over any stored resume position for this load.