RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
This document defines the Native Video engine (AAMP) APIs for embedded devices.
Table of key web links
Web Resource | Owner | Descrption |
---|---|---|
W3C MSE Specifications | W3C | HTML5 specs for Media Source Extenstions |
This section provides a high level architecture
...
This section defines the properties, methods and events for the AAMP Video Engine
draw.io Diagram | ||||||
---|---|---|---|---|---|---|
|
...
AAMPVideoEngine
Name | Data Type | Read or Write | Description |
---|---|---|---|
PlayerVersion | String | r | Version of the player available as a string |
MediaType | Number | r | Type of media enum { LIVE =1, VOD=2, cDVR=3 } Note: may be implied by manifest contents (open/live vs. closed), but in some cases media type (EAS, CDVR) may be knowable only by Player. |
PlayerState | Number | r | Player State Enum. IDLE, // initial state of player INITIALIZING, // drm individualization, etc. INITIALIZED, // TBR? PREPARING, // manifest request in progress - TBR? PREPARED, // have knowledge about stream contents, language availability, etc. BUFFERING, // collecting a/v fragments - not currently presenting; could happen if run dry during playback PAUSED, // player-initiated pause SEEKING, // seek-in-progress - variant of buffering PLAYING, // a/v actively streaming/presenting STOPPING, // reflects async state - needed? STOPPED, // playback stopped at end of asset COMPLETE, // ? ERROR, // fatal video engine state RELEASED |
CurrentPosition | Number | r | Current media play position (milliseconds or seconds?) |
MediaInfo | Object | r | Information about the Media being played by the Player totalDuration – Total duration of the Media startPostion – Media Start Position endPosition – Media End Position |
currentPlaybackSpeed | Number | r | Current speed (play rate); 0 if paused, negative if rewinding |
getSupportedSpeed | Number[ ] | r | Array of supported speeds; [-64, -32, -16, -4, -1, 0, 1, 4, 16, 32, 64]; Needed? An ip video player can present iframe track at arbitrary speeds This set changes during trick mode restrictions; subset may be used during ad. |
timeline | Timeline | r | Timeline for tracking dynamic ad insertion (DAI) |
Volume | Number | r | Current volume (only mute/unmute is actually used) |
drm | Drm | r | interface to Drm specific properties and methods |
Hide If | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
...
enableTSB
...
errorcode
...
enableTSB – Boolean
...
|
...
Show If | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
AAMPVideoEngine.TimedMetadata
AAMPVideoEngine.Timeline
AAMPVideoEngine.AdBreak
AAMPVideoEngine.Ad
AAMPVideoEngine.TrickModeRestrictions
AAMPVideoEngine.AdOpportunity
Name | Data Type | Read or Write | Description |
---|---|---|---|
adBreaks | AdBreak[ ] | r | Array of Ad breaks |
adOpportunities | AdOpportunity[] | r | Array of Ad opportunities |
start | Number | r | Time (ms) of earliest content |
duration | Number | r | Time (ms) of content + placed ads |
position | Number | r | Time (ms) of current playback postion |
restrictions | TrickModeRestrictions | r | Trickmode restrictions on the entire timeline. |
timedMetadata | TimedMetadata[] | r | Array of TimedMetadata |
Name | Return Value | Arguments | Description |
---|---|---|---|
addEventListener | errorcode | eventType – String | Method to add an event listener corresponding to an event type. |
removeEventListener | errorcode | eventType – String | Method to remove an event listener corresponding to an event type. |
placeAdBreak | bool | position – Number adBreak - Object | Places the specified AdBreak at the specified position in the timeline. |
subscribeTimedMetadata | errorcode | tags - String [] | Sets array of HLS tags to monitor while parsing the manifest. |
Name | Payload | Description |
---|---|---|
timedMetadata | timedMetadata - TimedMetadata | Fired when new TimedMetadata has been parsed, or modified. |
timelineUpdated | seekableRangeChanged - bool | Fired when the timeline is updated. |
adBreakStart | adBreak - AdBreak - the adBreak being started | Fired when player starts playing an AdBreak. |
adBreakComplete | adBreak - AdBreak - the adBreak being finished | Fired when player finishes playing an AdBreak. |
adBreakSkipped | adBreak - AdBreak - the adBreak being skipped or exited | Fired when player skips over an AdBreak. |
adStart | ad - Ad - the Ad being started | Fired when player start playing an Ad. |
adProgress | ad - Ad - the Ad being played | Reports the player's progress as it plays an Ad. |
adComplete | ad - Ad - the Ad that finished begin played | Fired when player finishes playing an Ad. |
Name | Data Type | Read or Write | Description |
METADATA_TYPE_TAG | 0 | static const | Indicates metadata is from the manifest. |
METADATA_TYPE_ID3 | 1 | static const | Indicates metadata was embedded in the content. |
METADATA_TYPE_DASH | 2 | static const | Indicates metadata was generated from DASH MPD. |
type | Number | r | Specified the metadata type: manifest vs. embedded. |
time | Number | r | Time (in milliseconds) of the metadata. |
name | String | r | Name of the metadata. E.g., #EXT-X-CUE, #EXT-X-SCTE35. |
content | String | r | Value of the metadata. |
id | String | r | Unique identifier associated with the metadata. |
metadata | Object | r | Additional name / value pairs obtained from the metadata content string. |
Name | Data Type | Read or Write | Description |
---|---|---|---|
ADBREAK_TYPE_INSERT | 0 | static const | Indicates adBreak was inserted. |
ADBREAK_TYPE_REPLACED | 1 | static const | Indicates adBreak was replaced. |
type | Number | r | Type of adBreak (inserted or replaced). |
id | String | r | Unique identifier associated with the ad break. |
start | Number | r | Starting position (milliseconds) of the ad break in the timeline. |
duration | Number | r | Duration (milliseconds) of the ad break. |
ads | Ad[] | r | Array of Ad objects (sorted by time). |
Name | Return Value | Arguments | Description |
---|---|---|---|
placeAds | bool | position - Number, ads - Object[] | Place the specified Ad objects in the AdBreak. Return true if successful. |
Name | Data Type | Read or Write | Description |
---|---|---|---|
id | String | r | Unique identifier associated with the Ad. |
url | String | r | URL specifying the location of the ad's manifest.. |
duration | Number | r | Duration (milliseconds) of the ad. |
restrictions | TrickModeRestrictions | r | Trickmode restrictions applying to the Ad. |
seenCount | Number | r | Number of time AdBreak was played (in full). |
metadata | Object | r | Additional metadata associated with the ad. |
Name | Data Type | Read or Write | Description |
---|---|---|---|
adBreaks | AdBreak[ ] | r | Array of Ad breaks |
adOpportunities | AdOpportunity[] | r | Array of Ad opportunities |
start | Number | r | Time (ms) of earliest content |
duration | Number | r | Time (ms) of content + placed ads |
position | Number | r | Time (ms) of current playback postion |
restrictions | TrickModeRestrictions | r | Trickmode restrictions on the entire timeline. |
timedMetadata | TimedMetadata[] | r | Array of TimedMetadata |
Name | Return Value | Arguments | Description |
---|---|---|---|
addEventListener | errorcode | eventType – String | Method to add an event listener corresponding to an event type. |
removeEventListener | errorcode | eventType – String | Method to remove an event listener corresponding to an event type. |
placeAdBreak | bool | position – Number adBreak - Object | Places the specified AdBreak at the specified position in the timeline. |
subscribeTimedMetadata | errorcode | tags - String [] | Sets array of HLS tags to monitor while parsing the manifest. |
Name | Payload | Description |
---|---|---|
timedMetadata | timedMetadata - TimedMetadata | Fired when new TimedMetadata has been parsed, or modified. |
timelineUpdated | seekableRangeChanged - bool | Fired when the timeline is updated. |
adBreakStart | adBreak - AdBreak - the adBreak being started | Fired when player starts playing an AdBreak. |
adBreakComplete | adBreak - AdBreak - the adBreak being finished | Fired when player finishes playing an AdBreak. |
adBreakSkipped | adBreak - AdBreak - the adBreak being skipped or exited | Fired when player skips over an AdBreak. |
adStart | ad - Ad - the Ad being started | Fired when player start playing an Ad. |
adProgress | ad - Ad - the Ad being played | Reports the player's progress as it plays an Ad. |
adComplete | ad - Ad - the Ad that finished begin played | Fired when player finishes playing an Ad. |
...
Name | Data Type | Read or Write | Description |
---|
METADATA_TYPE_TAG
0
static const
Indicates metadata is from the manifest.
METADATA_TYPE_ID3
TRICKMODE_RESTRICTED_ALWAYS | -1 | static const | Indicates |
restriciton applies always. |
TRICKMODE_ |
RESTRICTED_ |
NEVER |
0 | static const | Indicates |
restriciton does not apply. |
pause | Number | r |
Specified the metadata type: manifest vs. embedded.
Specifies if pause is restricted during Ad playback. | ||
rewind | Number | r |
Time (in milliseconds) of the metadata.
name
String
r
Name of the metadata. E.g., #EXT-X-CUE, #EXT-X-SCTE35.
content
String
r
Value of the metadata.
id
String
r
Unique identifier associated with the metadata.
metadata
Object
r
Additional name / value pairs obtained from the metadata content string.
Specifies if rewind is restricted during Ad playback. | |||
fastForward | Number | r | Specified if fastForward / seek is restricted during Ad playback. |
Name | Data Type | Read or Write | Description |
---|---|---|---|
AD_PLACEMENT_TYPE_PREROLL | 0 | static const | Indicates opportunity places ad before the main content. |
AD_PLACEMENT_TYPE_MIDROLL | 1 | static const | Indicates opportunity places ad in the main content. |
AD_PLACEMENT_TYPE_POSTROLL | 2 | static const | Indicates opportunity places ad after the main content. |
AD_PLACEMENT_MODE_INSERT | 0 | static const | Indicates restriciton applies always. |
AD_PLACEMENT_MODE_REPLACE | 1 | static const | Indicates restriciton does not apply |
Read or Write
Indicates adBreak was inserted.
Indicates adBreak was replaced.
type
. | |||
id | String | r | Unique identifier associated with the ad |
opportunity. | |||
placement | Number | r | Indicates placement type: preroll vs. midroll vs. postroll. |
mode | Number | r |
Starting position (milliseconds) of the ad break in the timeline.
Indicates placement mode: insertion vs. replacement. |
start |
Number | r |
Starting position (milliseconds) of the ad |
opportunity. |
duration |
Number | r |
Array of Ad objects (sorted by time).
Contains the ads that will be played during the ad break.
Name | Return Value | Arguments | Description |
---|---|---|---|
placeAds | bool | position - Number, ads - Object[] | Place the specified Ad objects in the AdBreak. Return true if successful. |
...
Duration (milliseconds) of the ad. | |||
metadata | Object | r | Additional metadata associated with the ad opportunity. |
These apis are modeled using the open CDMI framework
AAMPVideoEngine.Drm
DRM Properties
Name | Data Type | Read or Write | Description |
---|
supportedKeySystems |
string[] | r |
Unique identifier associated with the Ad.
url
String
r
URL specifying the location of the ad's manifest..
duration
Number
r
Duration (milliseconds) of the ad.
seenCount
metadata
Object
r
Additional metadata associated with the ad.
Name | Data Type | Read or Write | Description |
---|---|---|---|
TRICKMODE_RESTRICTED_ALWAYS | -1 | static const | Indicates restriciton applies always. |
TRICKMODE_RESTRICTED_NEVER | 0 | static const | Indicates restriciton does not apply. |
pause | Number | r | Specifies if pause is restricted during Ad playback. |
rewind | Number | r | Specifies if rewind is restricted during Ad playback. |
fastForward | Number | r | Specified if fastForward / seek is restricted during Ad playback. |
...
Read or Write
...
Indicates opportunity places ad before the main content.
...
Indicates opportunity places ad in the main content.
...
Indicates restriciton applies always.
...
Indicates restriciton does not apply.
...
id
...
String
...
r
...
Unique identifier associated with the ad opportunity.
...
placement
...
Number
...
r
...
Indicates placement type: preroll vs. midroll vs. postroll.
...
mode
...
Number
...
r
...
Indicates placement mode: insertion vs. replacement.
...
start
...
Number
...
r
...
Starting position (milliseconds) of the ad opportunity.
...
duration
...
Number
...
r
...
Duration (milliseconds) of the ad.
...
metadata
...
Object
...
r
...
Additional metadata associated with the ad opportunity.
...
These apis are modeled using the open CDMI framework
...
DRM Properties
Name | Data Type | Read or Write | Description |
---|---|---|---|
supportedKeySystems | string[] | r | array of supported DRM keysystems |
DRM Methods
Name | Return Value | Arguments | Description |
---|---|---|---|
setPreferredKeySystem | errorcode | string | sets the preferred DRM Key system AAMP player will use. Ex: "com.microsoft.playready" |
setLicenseServerURL | errorcode | string | sets the URL used for license acquisition |
setAnonymousRequest | errorcode | bool | if true, don't use session token in MDS license request (anonymous mode) if false, use session token in MDS license request |
DRM Events
...
drmReady
...
drmError
...
code - Number
description - String
...
...
array of supported DRM keysystems |
DRM Methods
Name | Return Value | Arguments | Description |
---|---|---|---|
setPreferredKeySystem | errorcode | string | sets the preferred DRM Key system AAMP player will use. Ex: "com.microsoft.playready" |
setLicenseServerURL | errorcode | string | sets the URL used for license acquisition |
setAnonymousRequest | errorcode | bool | if true, don't use session token in MDS license request (anonymous mode) if false, use session token in MDS license request |
DRM Events
Name | Payload | Description |
---|---|---|
drmReady | none | fired when license is acquired and content is ready to play |
drmError | code - Number description - String | fired when license acquisition fails |
TODO: call out how VE supports these
Show If | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hide If | |||||
---|---|---|---|---|---|
| |||||
|
...
|
...
start - Number - start position of the TSB buffer, -1 when no buffer available
...
|
...
When TSB starts, start=end=0
As TSB advances, end increases
...
|