SD Card Playback

Playback streams footage stored on the camera’s own SD card, rather than clips uploaded to the cloud. It uses the same WebRTC stack as live view — the difference is the client:

val client = SDCardPlaybackClient(startTime = from, endTime = to, device = device) // connects on construction

Close the live view client before starting playback — nothing in the SDK enforces one session per camera, but the camera does not serve both well.

In this section

Page Covers
Setting Up Creating the playback client
Rendering Playback Attaching the player and observing status
Playback Controls Play, pause, seek, switching sensor, end of footage
Event Handling Locating recorded segments on the timeline

Building a scrubber

requestMediaInfo(start, end) asks the camera which segments exist in a range — that populates timeLine (a list of PlaybackEvent(start, end)) and the “has footage” bands of a scrubber. requestMediaInfo(start) asks for the segments in the one-hour window containing start and repositions the playback window there. The earliest footage on the card is requested automatically after every media_info reply on firmware v2+ and arrives as firstEventTime, which is where the timeline should begin. timeLine is null while a request is outstanding. currentTime is the position; playbackEnded and noMorePlaybackData mark the end of available footage.


Table of contents


This site uses Just the Docs, a documentation theme for Jekyll.