Event Playback

Pre-requisite: Fetching event tokens requires a signed-in user; eventM3U8 needs only a configured SDK.

Event video is served as an HLS playlist (.m3u8). Two things stand between the URL on the event and a playing video: the storage bucket wants an authorization token on the URL, and a player that cannot set its own headers needs the playlist fetched with the SDK’s authentication. Both are covered here.


Generating an Event Playback URL

The video URL in the event object may or may not contain an Authorization query param. If the URL contains the query param you are to replace it.

  • Start by fetching the Event Tokens
  • For the event that you need to play, replace the Authorization in the video URL with the token after matching the bucket names
  • The newly constructed URL can be played using IJKFFMoviePlayerController.
  • You will also need to use IJKFFOptions to pass authentication to IJKMediaPlayer.

For example: if the video URL in the event is https://www.example.com/video.m3u8 and the event entity has the bucket name 180-days, look up the token for the bucket named 180-days; the newly formed URL is https://www.example.com/video.m3u8?Authorization=123123123123123.


Get the Event Playlist

To fetch the HLS playlist of a recorded event with the SDK authentication applied, The following method can be used:

  • url (required): The playlist URL of the event.
Factory.systemService.eventM3U8(url: String) -> IVPublisher<Data>

This call only needs the SDK to be configured — it does not require a signed-in user.


Footage still on the camera’s card is streamed rather than downloaded — see SD Card Playback.