Skip to main content

Linear DVR

What you learn​

You're instantiating DIVA Player in your Android front-end and relying on DIVA Back Office as the video streaming source.

The goal of this article is to build the simplest front-end to stream a Linear DVR video from the DIVA Back Office.

Before starting​

  • Ensure the DIVA Back Office instance you rely on is up and running.
  • Ask your video engineers team <videoId>, <settingsURL>, <languageCountryCode>, <userToken> and <sharedKey>.
  • Ask your video engineers team confirmation that streamed video have the dvrType=limited within the VideoMetadata.
  • During Linear DVR streaming, Diva Player supports displaying the Wall Clock time on the UI. To enable this feature, ask your video engineers to set wallclock=true in the node capabilities within the VideoMetadata.

Instantiation​

Linear DVR code​

There's no code to add to the Basic instantiation code.

Behaviour​

Scrubbing within the DVR Window​

  • Users can scrub (seek) within the available DVR window.
  • Playback resumes from the selected time after entitlement verification, granting access to eligible content.
  • If entitlement validation fails, the video will not play, and the DIVA session will close due to a fatal error (on-screen alert about the entitlement error).
  • If the user pauses playback and the pause duration exceeds the available DVR window, upon resuming, playback starts from the beginning of the DVR window. In case of technical limitations preventing a pause beyond the DVR window, the video will remain paused until user interaction resumes playback, tailored per platform specifications.
  • If the user seeks back, the 'Go Live' button will be visible, allowing the user to jump to live content. Simultaneously, the 'Live' indicator is hidden while the user is in the DVR window.
  • If the user clicks the 'Go Live' button, the playback immediately jumps to the current live point of the stream.
  • The 'Live' indicator is shown, while the 'Go Live' button is hidden since the user is already at the live point.
  • When the user hovers or selects the scrubber bar, it will display the local device time in a wall clock format, providing clarity on the timeline relative to real-world time.

Technical Details

Heartbeat Seek Interval verification​

To prevent users from accessing content they are not authorized to view, the heartbeatSeekInterval configuration controls the frequency of periodic seek operations, also known as heartbeat seeks, in a streaming system.

This functionality ensures that the player regularly checks and adjusts the playback position to maintain synchronization with the live stream or other time-sensitive content.

By performing these periodic seeks, the system can correct any drift or delay that may occur during playback, providing a smoother and more accurate viewing experience.

The heartbeatSeekInterval can be configured to control this behavior. Ensure the settings file contains the heartbeatSeekInterval field:

"settings": {
"entitlementCheck": {
...
"heartbeatSeekInterval": 10000,
}
}

The default value is set to 10,000 milliseconds (10 seconds), meaning the system will perform a seek operation every 10 seconds. If the value is set to 0, a negative number, or null, the heartbeat seek functionality will be disabled, and no periodic seek operations will be performed.