Highlights
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 highlights.
Before starting
- The DIVA Back Office instance you rely on as the video streaming source is up and running.
- Ensure that, in the settings file, the
highlightssection is available like in the following example with mandatory fields filled in:
{
...,
"highlights": {
"shortFilter": [
{friendlyName: 'FirstPeriodStart', event: 'period'},
"Goal" //case-insensitive
],
"mediumFilter": [
"GOAL",
"REDCARD",
"YELLOWCARD"
],
"longFilter": [
"*"
]
},
},
Is possible to have all the events in the collection using the asterisk (*), like the example above on longFilter.
If no one filter is set, the Highlights Mode will be disabled.
- Ensure that, in the settings file, the
pushenginesection is available like in the following example with mandatory fields filled in:
"pushEngine": {
"configUrl": "https://example.com/fe/config/pushengine/pushengineConfig.json", //mandatory
"playByPlayCollectionName": "PlayByPlay", //optional - it can overwrite the default value
"playByPlayScopeName": "{v.EventID}.{d.Culture}", //optional - it can to overwrite the default value
}
- Ensure that, in the playByPlay file we have the relevant information to "crop" the highlights:
{
"TimeCode": "2024-07-24T01:23:26Z",
"SeekOffset": "-00:00:10",
}
Highlights duration
When an event occurs, it arrives with a TimeCode and a setting that defines how many seconds to add before the event (SeekOffset).
The highlight video will start at TimeCode- SeekOffset for a duration of 15 seconds.
Dictionary
Ensure the dictionary file contains the relevant keys.
Analytics events
Find here the available analytics events for the Highlights.
Instantiation
There's no code to add to the Basic instantiation code.