Push Engine
The Push Engine is a technical component responsible for retrieving collections of data to synchronize with a particular video stream.
The collections data used by Diva should be: PlayByPlay, Editorial, OverlayData, Midrolls.
- PlayByPlay: contains all sportive datas (playByPlay, phases, scores).
- Editorial: contains all editorial datas (commentary, chapters).
- OverlayData: contains references for overlays.
- Midrolls: contains references for midrolls.
- eCommerce: contains references for ecommerce notifications.
The player merges the PlayByPlay and Editorial collections into a unique collection which is used to populate the timeline, the playByPlay overlay, and the score header.
PushEngine Config​
For a detailed description, please refer to Push Engine
PushEngine Data Contract​
Sport and Editorial collections​
Definition of the new format of the PbP is made generic to be able to be extended or upgraded.
Therefore the external container of the data JSON in the PbP collection will just contain a few parameters (timecode, Type, Id) and the actual data will be separated in a Body
section if embedded, or referenced in a RefBody
reference if external.
This is a typical object delivered by the PlayByPlay and Editorial collection
{
"Id" : "1",
"TimeCode" : "2014-12-09T19:56:50.7Z",
"Type" : "pbp",
"RefBody" : "",
"Body" : {
[....]
}
}
This content is expected to be received in the i
field of the Push Engine collection.
Fields and formats:
- Id: String, unique identifier of the play-by-play item. Mandatory. It might be different from the Push Engine key.
- TimeCode: time code, ISO 8601 UTC format. Mandatory.
- Type: String, identifier of the PbP type. Mandatory.
- RefBody: String, external identifier of the data if present. Nullable.
- Body: Object, payload of the PbP. Depending on the Type field. Nullable
Event Collection Types​
The content of Body field is an object determined by the value of the Type field.
Type PBP:​
"Body" : {
"Type" : "Goal",
"Text" : "Tevez scores!",
"SeekOffset" : "-00:00:10",
"GameTime" : "11'",
"Mode" : "TSL",
"Opponent" : "A",
"Priority" : 1,
"VideoRef" : "111111",
"VideoRefVersion" : "1",
"VideoRefPlatforms" : [
{ "P": "HLS" },
{ "P": "IIS" },
{ "P": "MP4" }
],
"Video360Platforms" : [
{ "P": "HLS" },
{ "P": "IIS" },
{ "P": "MP4" }
]
}
Fields and formats:
- Type: (es. "Goal") - String, subtype of the PbP. Mandatory. Used to define the icon to show for the pbp rendering
- Text: (es. "Tevez scores!") - String, text describing the event, possibly empty. Mandatory.
- SeekOffset: (es "-00:00:10") - String, seek anticipation of the PbP. It uses the "time parser" format, possibily (and typically) negative. Mandatory, with a default of 0 if empty.
- GameTime: (es. "11'") - String, time to be visualized in the PbP rendering. Mandatory, possibly empty.
- Mode: (es. "TSL") - String, visualization options. Not sorted string with the possible flags listed below. Mandatory, order insensitive and case insensitive:
- M = most important (sticky)
- S = seekable
- L = list marker
- T = timeline marker
- Opponent: (es. "A") - String, opponent allocation. Possible values: "A" (home), "B" (away) or "" (both). Mandatory, possibly empty. Case insensitive.
- Priority: (es. 1) - Number, identifier of the PbP priority. 1 based, nullable
- VideoRef: (es. "111111") - String, reference of the multicam videos associated to the PbP. Nullable. If empty or null, then no multicam is associated to the PbP.
- VideoRefVersion: (es. "1") - String, version number (to de-cache) to be added to the multicam list reference. Nullable.
- VideoRefPlatforms: (es. see above) - Array of objects, containing a single
P
(uppercase) element, String, specifying a platform. If formats in this array are not accepted from the player it will be considered empty. Nullable - Video360Platforms: (es. see above) - Array of objects, containing a single
P
(uppercase) element, String, specifying a platform. If formats in this array are not accepted from the player it will be considered empty. Nullable
- If
VideoRefPlatforms
andVideo360Platforms
are both empty the multicam label, the multicam icon on commentary overlay and the tooltip will not appear for the given pbp. - If both arrays are set and accepted by the player the multicam icons used by tooltip, commentary and marker will show the 360 symbol.
- If only the
VideoRefPlatforms
array is set and accepted by the player the multicam icons used by tooltip, commentary and marker will show the standard multicam symbol. - If only the
Video360Platforms
array is set and accepted by the player the multicam icons used by tooltip, commentary and marker will show the 360 symbol. - To avoid wrong sorting events on Commentary, set the same
seekOffset
in pushEngine data for the too close events (like assist and goal, foul and YC) in order to avoid to see next labeled event below current event inside the list.
Rules
- The Mode is a collection of flags, case insensitive and order insensitive, describing the visibility of the PbP.
- If the
VideoRef
field is not present, no multicam are considered present for the given PbP. If present, the multicam clips are considered present only if one of the platforms managed by the video plugin is included in the list of theVideoRefPlatforms
orVideo360Platforms
VideoRef
,VideoRefVersion
,VideoRefPlatforms
,Video360Platforms
are nullable and expected not to be present in the PbPs without associated clips.Priority
is not yet managed (though it should be parsed)- If both
VideoRefPlatforms
andVideo360Platforms
arrays are set and accepted by the player the wordtag used for the label on top of the pbp will be"diva_360multicam"
, if only theVideoRefPlatforms
array is valid the wordtag used for the label on top of the pbp will be"diva_multicam"
, if only theVideo360Platforms
array is valid the wordtag used for the label on top of the pbp will be"diva_360clips"
Type COM​
"Body" : {
"Type" : "Interview",
"Text" : "Tevez interview!",
"SeekOffset" : "-00:00:10",
"Mode" : "TSL",
"Priority" : 1,
"VideoRef" : "123456",
"VideoRefVersion" : "1",
"VideoRefPlatforms" : [
{ "P": "HLS" },
{ "P": "IIS" },
{ "P": "MP4" }
],
"Video360Platforms" : [
{ "P": "HLS" },
{ "P": "IIS" },
{ "P": "MP4" }
]
}
Fields and formats:
- Type: (es. "Interview") - String, subtype of the Com. Mandatory. Used to define the icon to show for the Com rendering
- Text: (es. "Tevez interview") - String, text describing the event, possibly empty. Mandatory.
- SeekOffset: (es "-00:00:10") - String, seek anticipation of the Com. It uses the "time parser" format, possibily (and typically) negative. Mandatory, with a default of 0 if empty.
- DisplayDuration: (es "00:00:10") - String, duration of robot commentary visualization. Mandatory, with a default of 0.
- Mode: (es. "TSL") - String, visualization options. Not sorted string with the possible flags listed below. Mandatory, order insensitive and case insensitive:
- M = most important (sticky)
- S = seekable
- L = list marker
- T = timeline marker
- Priority: (es. 1) - Number, identifier of the Com priority. 1 based, nullable
- VideoRef: (es. "111111") - String, reference of the multicam videos associated to the Com. Nullable. If empty or null, then no multicam are associated to the Com.
- VideoRefVersion: (es. "1") - String, version number (to de-cache) to be added to the multicam list reference. Nullable.
- VideoRefPlatforms: (es. see above) - Array of objects, containing a single
P
(uppercase) element, String, specifying a platform. If formats in this array are not accepted from the player it will be considered empty. Nullable - Video360Platforms: (es. see above) - Array of objects, containing a single
P
(uppercase) element, String, specifying a platform. If formats in this array are not accepted from the player it will be considered empty. Nullable
- If
VideoRefPlatforms
andVideo360Platforms
are both empty the multicam label, the multicam icon on commentary overlay and the tooltip will not appear for the given pbp. - If both arrays are set and accepted by the player the multicam icons used by tooltip, commentary and marker will show the 360 symbol.
- If only the
VideoRefPlatforms
array is set and accepted by the player the multicam icons used by tooltip, commentary and marker will show the standard multicam symbol. - If only the
Video360Platforms
array is set and accepted by the player the multicam icons used by tooltip, commentary and marker will show the 360 symbol.
Rules
- The
Mode
is a collection of flags, case insensitive and order insensitive, describing the visibility of the PbP. - If the
VideoRef
field is not present, no multicam are considered present for the given PbP. If present, the multicam clips are considered present only if one of the platforms managed by the video plugin is included in the list of the__VideoRefPlatforms__
or__Video360Platforms__
VideoRef
,VideoRefVersion
,VideoRefPlatforms
,Video360Platforms
are nullable and expected not to be present in the PbPs without associated clips.Priority
is not yet managed (though it should be parsed)- If both
VideoRefPlatforms
andVideo360Platforms
arrays are set and accepted by the player the wordtag used for the label on top of the pbp will be"diva_360multicam"
, if only theVideoRefPlatforms
array is valid the wordtag used for the label on top of the pbp will be"diva_multicam"
, if only theVideo360Platforms
array is valid the wordtag used for the label on top of the pbp will be"diva_360clips"
Type SRM​
"Body" : {
"ScoreA" : "1",
"ScoreB" : "2",
"AggregateScoreA" : "2",
"AggregateScoreB" : "2",
"OpponentNameA" : "Juventus",
"OpponentNameB" : "Atletico",
"OpponentShortNameA" : "JUV",
"OpponentShortNameB" : "ATL",
"OpponentCodeA" : "12548",
"OpponentCodeB" : "16875"
}
Fields and formats:
- ScoreA: (es. "1") - String, score of the "home" opponent. Mandatory, possibly empty.
- ScoreB: (es. "2") - String, score of the "away" opponent. Mandatory, possibly empty.
- AggregateScoreA: (es. "2") - String, aggregate score of the "home" opponent. Nullable
- AggregateScoreB: (es. "2") - String, aggregate score of the "away" opponent. Nullable
- OpponentNameA: (es. "Juventus") - String, opponent or team name for the "home" opponent. Mandatory, possibly empty.
- OpponentNameB: (es. "Atletico") - String, opponent or team name for the "away" opponent. Mandatory, possibly empty.
- OpponentShortNameA: (es. "Juv") - String, short opponent or team name for the "home" opponent. Mandatory, possibly empty.
- OpponentShortNameB: (es. "Atl") - String, short opponent or team name for the "away" opponent. Mandatory, possibly empty.
- OpponentCodeA: (es. "12548") - String, code or ID of the "home" opponent. Mandatory, possibly empty.
- OpponentCodeB: (es. "12548") - String, code or ID of the "away" opponent. Mandatory, possibly empty.
Rules
- The Match score defines the score of a match between opponents. As long as one SRM item is displayed, the visualization of the player changes to "match" mode.
- The
OpponentShortNameA
andOpponentShortNameB
attributes define the short names of the opponents (or teams) and must be mapped to theOpponent.ShortName
placeholder of the Path Resolver in the context of title and score visualization. - The
OpponentCodeA
andOpponentCodeB
attributes define the codes, or IDs, of the opponents (or teams) and must be mapped to theOpponent.Code
placeholder of the Path Resolver in the context of title and score visualization.
Visual Behaviour
- When a SRM item is visualized (because synched to the video and shown in accordance to the PbP rules) the player enters the "match" mode, meaning that:
- The title of the player shows the score: opponent name A, badge A, score A, score B, badge B, opponent name B
- The timeline shows the "three letter" of opponents (or teams) name (if the three letter box is enabled, e.g. if not in "DVR none" mode). Display animation to be defined, none is acceptable as temporary solution
- The player invocation should no longer include the "match mode/score mode" parameter.
- The Settings file should no longer handle the
pushEngine/scoreCollectionName
parameter and that collection should no longer be read.
Type PHS
​
"Body" : {
"Code" : "123",
"PhaseShortName" : "FH",
"PhaseName" : "FirstHalf",
"StartGameTime" : "0",
"Duration" : "00:45:00"
}
Fields and formats:
- Code: (es. "123") - String, generic phase code. To be used to match in a detailed way the phases for the management of updates. Mandatory, expected not to be empty.
- PhaseShortName: (es. "FH") - String, short name of the phase, for display purposes (e.g. match clock w/ score). Mandatory, expected not to be empty.
- PhaseName: (es. "First half") - String, long name of the phase, for display purposes. Mandatory, expected not to be empty.
- StartGameTime: (es. "0") - String, starting time of the phase, in minutes, to be displayed on the timeline if present. Mandatory, possibly empty.
- Duration: (es. "00:45:00") - String, clock duration (without interruptions) of the phase, whatever expected or actual. Expressed in standard Diva time parser format. Mandatory, expected not to be empty.
Rules
- Each phase is a visual indicator of a phase of the game (or a significant period of the video).
- The phase is set by a single collection item, which indicates both the start and the end (end = start, timecode of the item, plus duration).
- Each phase item can be updated when a phase length (or another phase attribute) must be changed. The player should correctly handle the update or removal.
- The
StartGameTime
attribute is used when a display of the phase time is necessary on the timeline. If empty, no numbers should be rendered above the ticks. If not empty, it should be parsed as an integer and indicates the starting minute of the phase. It is expressed in minutes without any time format. - The
Duration
is the displayed duration (expected or actual) of the phase when drawn on the timeline.
Visual Behaviour
- The ticks must be drawn and updated for each phase reached by the player, up to the farthest position reached by the seek bar.
- Any tick might fall outside of the visualization (for example: because of a trimming, or because a phase overlaps the current chapter). The ticks should be correctly drawn only in the visualized part of the timeline and clipped elsewhere.
- A minimum space between the tall ticks is defined as constant - At the moment this is defined as 80 px/dp
- A set of intervals in minutes is defined as constant for tall ticks - At the moment this is: [1, 2, 3, 5, 6, 10, 12, 15, 20, 30, 45, 60, 90, 120]
- Once the pix/duration ratio is known, the player must calculate the minimum interval for which interval: ratio >= minimum space interval
- A minimum space between the short ticks is defined as constant - At the moment this is defined as 5 px/dp
- The same set of intervals defined for the tall ticks is used for small ticks, but the numbers selected must be less than the tall tick interval, and modulo 0 with it (they must be integer dividers).
- The numbers are visualized only on top of the "tall" ticks and are horizontally centered over them.
- The numbers should start from the
StartGameTime
value - Single digit numbers (e.g. "0" are rendered with a single digit)
Type CHP​
"Body" : {
"Title" : "Chapter 1",
"Subtitle" : "Chapter 1 - Match start",
}
Fields and formats:
- Title: (es. "Chapter 1") - String, Chapter name. Mandatory, expected not to be empty.
- Subtitle: (es. "Chapter 1 - Match start") - String, short name of the phase, for display purposes. Nullable
Rules
- The chapter is identified by its own timecode.
- The chapter can be clicked, and the video will seek to its timecode (or to the live point if the selected chapter is the last one of a live video).
Visual Behaviour
- Chapter section is visualized below the timeline.
- The current chapter is visualized with white text color. The other chapters are visualized with grey text color.
- If the
Chapters
section is disabled in the configuration file, chapters aren't displayed, even if there are items with type CHP defined in the collection. For documentation regarding theChapters
section, please refer to Chapters
Midrolls collection​
The Midrolls collection at the moment is based on the same contract of Diva 1.5/1.4.
This is a typical object delivered by the Midrolls collection
{
"Id": "585545",
"TimeCode": "2014-02-23T12:41:56.7621405Z",
"TemplateType": "3a6fd826-272c-424e-a512-64ff70649da7"
}
This content is expected to be received in the i
field of the Push Engine collection.
Fields and formats:
- Id: String, unique identifier of the midroll item. Mandatory. It might be different from the Push Engine key.
- TimeCode: time code, ISO 8601 UTC format. Mandatory.
- TemplateType: String, identifier of the midroll in the AdTemplate file. Mandatory.
Overlay data collection​
The OverlayData collection at the moment is based on the same contract of Diva 1.5/1.4.
This is a typical object delivered by the OverlayData collection
{
"Id": "2014396.menu",
"TimeCode": "0001-01-01T00:00:00Z",
"TrackID": "menu"
}
This content is expected to be received in the i
field of the Push Engine collection.
Fields and formats:
- Id: String, unique identifier of the overlay item. Mandatory. It might be different from the Push Engine key. Used to retrive the overlay reference xml.
- TimeCode: time code, ISO 8601 UTC format. Mandatory.
- TrackID: String, identifier of the Overlay track. Mandatory. Should be more than one in the collection with different timeCode.
E-Commerce data collection​
This is a typical object delivered by the E-Commerce collection
{
"expireDate": "2030-06-06T18:34:09.7Z",
"displayDuration": 3,
"extId": "1",
"title": "Make this memory last",
"description": "Tango ball is available for $32",
"imageUrl": "http://divademo.deltatre.net/DIVAProduct/www/Data/diva4.10Test/img/adidas-tango-pasadena-ball.png",
"actionIcon": "http://divademo.deltatre.net/DIVAProduct/www/Data/diva4.10Test/img/shop_icon_black.png",
"actionText": "Click here to add to wishlist",
"actionType": "COMPANION",
"actionUrl": "",
"template": "",
"position": "center-top"
}
This content is expected to be received in the i
field of the Push Engine collection.
Fields and formats:
- extId: String, unique identifier of the shop item. Mandatory. It might be different from the Push Engine key. Used to retrive the shop item.
- expireDate: Expiration data of the shop notification, ISO 8601 UTC format. Mandatory.
- displayDuration: Timespan, duration of the notification visualization. Mandatory. If it'is 0/NULL/wrong, the notification disappears only if the user closes it timeCode.
- title: String, shop notification title.
- description: String, shop notification description.
- imageUrl: String, shop notification image url.
- actionIcon: String, action button icon url.
- actionText: String, action button text.
- actionType: String: COMPANION | EXTERNAL | IN-APP, action button type.
- COMPANION: notification interaction is integrated with video companion area to navigate available shop items and manage whishlist while watching video.
- EXTERNAL: link to external shop to finalize the purchase
- IN-APP: TBD
- actionUrl: String, external link. Used only in case of actionType = EXTERNAL
- template: String, template.
- position: String, notification position. At the moment only "center-top" is available.