AMP Android SDK: DVR management

Document created by Herberth Alvarado Champion on Aug 11, 2016Last modified by Herberth Alvarado Champion on Apr 9, 2017
Version 5Show Document
  • View in full screen mode

Maintainer: Jason Gamboa

This document is part of AMP Android SDK 

 

Android SDK is able to navigate (do seeking operations) through the stream playlist (.m3u8 with the list of segments), even for live streams.

 

It is important to know that the length of the DVR in HLS is defined by the number of segments included in the playlists. For example, if we are using 10 seconds fragment length and it is a requirement to have a DVR of 3 hours, the playlists should reference a total of 1080 segments ((3 hours * 60 minutes/hour * 60 seconds/minute) / 10 seconds/fragment). When using long DVRs, playlists tend to become very big. To help support this, the Android SDK hardware mode supports GZIP encoding for requesting the playlists via HTTP.

 

Methods

getDVRLength() [long] Returns the length of the DVR in seconds.

 

getPositionInDVR() [int] Returns the current playback position relative to the DVR. Its value will be 0 when playing the oldest content in the DVR, and will be equivalent to getDVRLength() when playing in the live position. For VOD streams, returns 0.

 

getTimePositionAsDate() [Date] Returns the current playback position as an absolute time (local timezone is used).

 

seekToLive() Seeks to the live position. Only works for live streams.

 

 

 

This document is part of AMP Android SDK 

Attachments

    Outcomes