Skip to main content

Linear DVR

What you learn​

You're instantiating DIVA Player in your iOS/tvOS 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 videodata.
  • During Linear DVR streaming, Diva Player supports displaying the Wall Clock time on the UI. To enable or disable this feature in iOS, ask your video engineers to set wallclock=true in the node capabilities within the videodata. tvOS alwayt display wall clock by default.

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 beyond live window (around 18s), the 'Go Live' button will be visible, allowing the user to jump to live point. Simultaneously, the 'Live' indicator is hidden in iOS and gray out in tvOS 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 UI is displayed, 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 user is entitled to see the current video. When user seeks a certain interval, Diva player checks with the entitlement service whether the user is still entitled to view the content. If the user is not entitled, the player will stop the playback and display an error message.

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 validation if user seeks more than 10 seconds. If the value is set to 0, a negative number, or null, the heartbeat seek functionality will be disabled.