Resume Point API
What you learn​
You are instantiating DIVA Player in your Roku application and relying on DIVA Back Office as the video streaming source.
The goal of this article is to build the simplest Roku app to stream a video from the DIVA Back Office and how to work with Resume Point API
.
Resume Point API
will notify the subscriber about a change and also allow the integrator to query the current status Diva Player.
Before starting​
- Ensure
Diva Player lib
andDIVA Back Office Adapter lib
downloaded (Setup > Step 13). - Ask your video engineers team the
<video id>
and<settings URL>
.
Technical Details
Resume Point API
helps integrator to get updates of: Player Position
, Video Metadata
and Player State
-
Player Position
- value triggered constantly while video is playing. It will emit a structure which contains:relativePosition
is formatted as millisecond integer numberabsolutePosition
is formatted as a date (logged as ISO format)
-
Video Metadata
- Exposes the VideoMetadata received by Diva via VideoMetaDataProvider. From here integrator can know which video is being player, video id may be used to identify the current video being played. It is important because Diva can internally change the video being played, for instance thought video list or end of play. -
Player State
- The current player state should inform the current player state. At a minimum, it should contain playing and pause. The integrator may save the resume point when the user pauses the video.Variants of the state that can comes from Diva Player:
inited
- this event triggers when Diva Player finished the initializationstarted
- when video playback startedbuffering
- video stream in the buffering stateplaying
- video stream are playingpaused
- video stream pausedstopped
- video stream stoppedfinished
- video stream finishederror
- when error is triggered while playing the video stream related with video streamprebuffering done
- in the launching of the video playback when pre-buffering of the video stream is done