Skip interval
What you learnβ
You're instantiating DIVA Player in your ios 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 video from the DIVA Back Office with skip intervals.
Before startingβ
- Ensure the DIVA Back Office instance you rely on is up and running.
- Ask your video engineers team the
<video id>
and the related<settings URL>
. - Ensure the VideoMetadata file contains the skip intervals properties:
{
"skipIntervals": [
{
"start": 0, // start in millis from the beginning of the video + trimIn
"end": 10000, // end in millis from the beginning of the video + trimIn
"label": "diva_skip_intro", // Key to look into the dictionary (optional, with 'diva_skip_interval_button' as default),
"autoHide": 5000, // Autohide if not interacted (optional, default 5000)
}
]
}
Instantiationβ
There's no code to add to the Basic instantiation code.
Behaviourβ
Skip Intro Button Visibility and Interaction:β
- When watching a VOD content piece, the "Skip Intro" button is displayed at the start of an intro interval and is usable by the user.
- When casting content through Chromecast, the "Skip Intro" button is also shown on the casting device, allowing the user to click it from there.
Button Focus and Playback Skipping:β
- When a skippable intro interval is reached, the "Skip Intro" button is focused, and pressing it advances playback to the end of the interval.
Minimal View Behaviorβ
- The "Skip Intro" button is not shown when the player is in minimal view, even during skippable intervals.
Interaction Priorityβ
- If the user's interaction overlaps with the "Skip Intro" button, the user's interaction takes precedence, allowing a smooth experience.
Live Content Behaviorβ
- For live content, the "Skip Intro" button is not shown when the user is at the live point.
- If the user is not at the live point and a skippable interval exists, the "Skip Intro" button is displayed, allowing the user to skip the interval.