Overview
OpenTV Platform supports cue points – markers in a content item's timeline that show where, for example, a recap ends, where the opening credits start and end, or where the end credits start. A client application can use them to implement features such as skip recap, skip intro, and next episode buttons.
This page explains how a client application gets cue points and how to interpret them. For a general explanation of cue points and cue point profiles, see Managing cue points.
Prerequisites
Before a client application can use cue points, you must ensure that:
-
Cue points have been defined for the content, either directly or through a cue point profile. See Managing cue points.
-
Cue points are enabled for your deployment. Contact your NAGRAVISION representative if you are not sure.
Getting cue points
Cue points are returned in the following fields:
-
csCuesEnabled– whether the client application should use cue points for the content -
csCueList– the cue points for the content -
cueProfileId– the cue point profile that the cue points came from (if any). This is for information only.
OpenTV Platform works out which cue points apply to each content item (including those inherited from a cue point profile, season, series, or node) and returns them in csCueList. The client application does not need to look up profiles or parent entities itself.
These fields are returned by the following APIs:
VOD content
Cue points are returned for each editorial content in the response of the Metamorph v2/vod/editorials API. See Retrieve content information.
For example:
https://<host>:<port>/metadata/delivery/v2/[provider]/vod/editorials?filter={"editorial.id":"EP_S01E02", "locale":"en_gb"}&fields=["editorial.Title", "editorial.csCuesEnabled", "editorial.cueProfileId", "editorial.csCueList"]
Live events
Cue points are returned in the editorial object of each programme in the Metamorph btv/programmes API. See Retrieving events for an EPG window – advanced queries.
For example:
https://<host>:<port>/metadata/delivery/[provider]/btv/programmes?filter={"id":"PROG_001", "locale":"en_gb"}&fields=["editorial.Title", "editorial.csCuesEnabled", "editorial.cueProfileId", "editorial.csCueList"]
Recordings
NPVR recordings returned by the User Recordings v2 API include a csCueList field. See Retrieve event recordings and requests.
Recordings include csCueList only. They do not include csCuesEnabled or cueProfileId.
Cue points are not included in media card, rails, search, or series episodes responses. The pre-defined EPG queries API (/metadata/v1/epg) does not include cue points that come from a cue point profile or are inherited from a season or series. To get the cue points for a content item, use the APIs listed above.
Interpreting cue points
Each cue point in csCueList has the following fields:
|
Field |
Description |
|---|---|
|
|
A unique identifier or label for the cue point, for example, |
|
|
The category of the cue point, for example, |
|
|
A human-readable description of the cue point. |
|
|
The length of the section that the cue point marks, in milliseconds. |
|
|
The position of the cue point, as a time from the start of the content, in milliseconds. |
|
|
The position of the cue point, as a percentage of the content's duration, from the start. |
|
|
The position of the cue point, as a time before the end of the content, in milliseconds. |
|
|
The position of the cue point, as a percentage of the content's duration, from the end. |
|
|
Custom key/value pairs for the cue point, as an object (for example, |
When you interpret cue points:
-
If
csCuesEnabledisfalse, do not use the cue points, even ifcsCueListis present. -
Each cue point should have exactly one timing field (
timeOffset,timePercentage,timeFromEnd, ortimePercentageFromEnd). However, cue points that come from a cue point profile include all four timing fields, with the ones that are not used set to0, and in recordings the timing fields that are not used arenull. So treat a timing field whose value is0ornullas not set, unless it is the only timing field that is present. -
To work out the position of a cue point that uses a percentage, or a time from the end, you need the duration of the content.
-
If
csCueListis not present or is empty, there are no cue points for the content.
For example, this is the editorial object of a live event (an episode of a series) that gets its cue points from a profile:
"editorial": {
"Title": "Episode 2",
"csCuesEnabled": true,
"cueProfileId": "drama-60s-recap",
"csCueList": [
{
"name": "recapEnd",
"type": "recap",
"description": "End of the recap of the previous episode",
"duration": 0,
"timeOffset": 60000,
"timePercentage": 0,
"timeFromEnd": 0,
"timePercentageFromEnd": 0
},
{
"name": "endCreditsStart",
"type": "credits",
"description": "Start of the end credits",
"duration": 0,
"timeOffset": 0,
"timePercentage": 0,
"timeFromEnd": 120000,
"timePercentageFromEnd": 0,
"metadata": {
"buttonLabel": "Next episode"
}
}
]
}
Here, the recap ends 60 seconds into the episode, and the end credits start two minutes before the end.
Use cases
Typical ways that a client application can use cue points include:
-
Skip recap / skip intro – while playback is in the section that a cue point marks (from the cue point's position, for its
duration), or before a cue point that marks the end of a recap, display a skip button. If the user selects it, seek to the end of the section. -
Next episode – when playback reaches a cue point that marks the start of the end credits, display a next episode button or start a countdown to the next episode. To find the next episode, see Retrieving the episodes of a series (binge watching).
How each cue point is used depends on the names and types that the operator has defined. Agree these with the operator.