Player Types Reference
UnifiedEvent
Field | Type |
---|---|
name | string |
type | string |
data | T |
class UnifiedEvent<T> {
name: string;
type: string;
data: T;
}
UnifiedEventName
enum UnifiedEventName {
CONFIGURED = "CONFIGURED",
CAN_PLAY = "CAN_PLAY",
ERROR = "ERROR",
WARNING = "WARNING",
DURATION_CHANGE = "DURATION_CHANGE",
ENDED = "ENDED",
PAUSED = "PAUSED",
LOADED_MEDIA_INFO = "LOADED_MEDIA_INFO",
PLAYING = "PLAYING",
BUFFER_CHANGED = "BUFFER_CHANGED",
BUFFERING_STARTED = "BUFFERING_STARTED",
BUFFERING_ENDED = "BUFFERING_ENDED",
RATE_CHANGE = "RATE_CHANGE",
SEEKING = "SEEKING",
SEEKED = "SEEKED",
TIME_UPDATED = "TIME_UPDATED",
MUTE_CHANGED = "MUTE_CHANGED",
VOLUME_CHANGED = "VOLUME_CHANGED",
MUTED_AUTOPLAY_FORCED = "MUTED_AUTOPLAY_FORCED",
TRICK_PLAY_DATA_EVENT = "TRICK_PLAY_DATA_EVENT",
TRACK_CHANGED = "TRACK_CHANGED",
TRACKS_UPDATED = "TRACKS_UPDATED",
EVENT_METADATA_UPDATED = "EVENT_METADATA_UPDATED",
REPLAY = "REPLAY",
INTERSTITIALS = "INTERSTITIALS",
SHOW_CAPTION = "SHOW_CAPTION",
CAPTION_DISPLAY_CHANGED = "CAPTION_DISPLAY_CHANGED",
CUSTOM_DATA_CHANGED = "CUSTOM_DATA_CHANGED",
AD_IMPRESSION = "AD_IMPRESSION",
AD_BREAK_STARTED = "AD_BREAK_STARTED",
AD_STARTED = "AD_STARTED",
AD_FIRST_QUARTILE = "AD_FIRST_QUARTILE",
AD_MIDPOINT = "AD_MIDPOINT",
AD_THIRD_QUARTILE = "AD_THIRD_QUARTILE",
AD_COMPLETED = "AD_COMPLETED",
AD_BREAK_COMPLETED = "AD_BREAK_COMPLETED",
AD_PAUSED = "AD_PAUSED",
AD_RESUMED = "AD_RESUMED",
AD_CLICKED = "AD_CLICKED",
AD_SKIPPED = "AD_SKIPPED",
AD_VOLUME_CHANGED = "AD_VOLUME_CHANGED",
AD_INTERACTION = "AD_INTERACTION",
TIMED_METADATA = "TIMED_METADATA",
DASH_TIMED_METADATA = "DASH_TIMED_METADATA",
CAST_AVAILABILITY_CHANGED = "CAST_AVAILABILITY_CHANGED",
CASTING_REQUESTED = "CASTING_REQUESTED",
CASTING_STARTED = "CASTING_STARTED",
CASTING_ENDED = "CASTING_ENDED",
}
VideoType
enum LuraVideoType {
VOD = "VOD",
LIVE = "LIVE",
}
MediaFormat
enum LuraMediaFormat {
DASH = "DASH",
HLS = "HLS",
MP4 = "MP4",
MP3 = "MP3",
WEBM = "WEBM",
}
TrackTypes
enum TrackTypes {
VIDEO = "video",
AUDIO = "audio",
CAPTION = "caption",
}
Tracks
Field | Type |
---|---|
video | Array<VideoTrack> |
audio | Array<AudioTrack> |
caption | Array<CaptionTrack> |
interface Tracks {
video: VideoTrack[];
audio: AudioTrack[];
caption: CaptionTrack[];
}
VideoTrack
Field | Type | Description |
---|---|---|
width | number | Width of the video track |
height | number | Height of the video track |
language | string | Language of the video track. (e.g. en, es) |
bitrate | number | Bitrate of the video track in kbps |
active | boolean | Boolean representing whether the video track is active or not |
interface VideoTrack {
width: number;
height: number;
language: string;
bitrate: number;
active: boolean;
}
AudioTrack
Field | Type | Description |
---|---|---|
language | string | Language of the audio track. (e.g. en, es) |
label | string | Label of the audio track (e.g. English) |
channels | AudioChannels | Channels of the audio |
active | boolean | Boolean indicating whether the audio is active or not |
interface AudioTrack {
label: string;
language: string;
channels: AudioChannels;
active: boolen;
}
CaptionTrack
Field | Type | Description |
---|---|---|
language | string | Language of the caption track. (e.g. en, es) |
label | string | Label of the caption track (e.g. English) |
type | string | Type of the caption track |
active | boolean | Boolean indicating whether the caption is active or not |
interface CaptionTrack {
language: string;
label: string;
type: string;
active: boolean;
}
Annotation
Field | Type | Description |
---|---|---|
start | number | Starting time of the annotation |
end | number | Ending time of the annotation |
type | string | Type of the annotation (e.g. intro, outro) |
label | string | Label for the annotation |
interface Annotation {
start: number;
end: number;
type: string;
label?: string;
}
CastTargets
Field | Description |
---|---|
CHROMECAST | Chromecast cast target |
AIRPLAY | Airplay cast target |
enum CastTargets {
CHROMECAST = "chromecast",
AIRPLAY = "airplay",
}
AdBreak
Field | Type | Description |
---|---|---|
id | string | An identifier for the Ad Break |
offset | number | Start time of the ad in seconds. |
ads | Ad[] | Ads of the ad break |
watched | boolean | A parameter representing whether the ad break is watched or not. |
totalAds | number | Count of the ads in the ad break. |
breakDuration | number | Duration of the ad break. |
interface AdBreak {
id: string;
offset: number;
ads: Ad[];
watched?: boolean;
totalAds?: number;
breakDuration?: number;
}
Ad
Field | Type | Description |
---|---|---|
duration | number | Duration of the ad in seconds. |
skipOffset | number | Skip offset of the ad in seconds. |
title | string | Title of the ad. |
description | string | Description of the ad. |
companions | Array | Data for the companion ads. |
companions.id | string | An optional identifier for the creative. |
companions.apiFramework | string | The API necessary to communicate with the creative if available. |
companions.width | string | The pixel width of the placement slot for which the creative is intended. |
companions.height | string | The pixel height of the placement slot for which the creative is intended. |
companions.assetWidth | string | The pixel width of the creative. |
companions.assetHeight | string | The pixel height of the creative. |
companions.expandedWidth | string | The maximum pixel width of the creative in its expanded state. |
companions.expandedHeight | string | The maximum pixel height of the creative in its expanded state. |
companions.adSlotId | string | Used to identify desiredplacement on a publisher’spage. Values to be used should be discussed between publishers and advertisers |
companions.pxratio | string | The pixel ratio for which the companion creative is intended. The pixel ratio is the ratio of physical pixels on the device to the device-independent pixels. An ad intended for display on a device with a pixel ratio that is twice that of a standard 1:1 pixel ratio would use the value "2." Default value is "1." |
companions.renderingMode | string | Used to indicate when and where to use this companion ad. Values can be “default” or “end-card” or “concurrent”. If this field is empty or not given, “default” will be used. |
companions.altText | string | A string to describe the creative when an ad viewer mouses over the ad. |
companions.clickThrough | string | A URI to the advertiser’s page that should open when the viewer clicks the companion ad. |
companions.clickTracking | string[] | A URI to a tracking resource file used to track a companion clickthrough |
companions.type | "static" | "iframe" | "html" | Resource type of the creative |
companions.creativeType | string | Mime type of the creative |
companions.data | string | Data of the creative, URL for static and iframe resources, html code snippet for html resource. Check the type field for the resource type |
companions.tracking | array | racking events of the companion |
companions.tracking.offset | number | Offset for progress trackings |
companions.tracking.type | string | Type of the tracking event. |
companions.tracking.url | string | A URI to the tracking resource for the event specified using the event attribute. |
icons.program | string | The program represented in the icon. |
icons.width | string | Pixel width of the icon asset |
icons.height | string | Pixel height of the icon asset. |
icons.xPosition | string | The x-coordinate of the top, left corner of the icon asset relative to the ad display area. Values of "left" or "right" also accepted and indicate the leftmost or rightmost available position for the icon asset. |
icons.yPosition | string | The y-coordinate of the top left corner of the icon asset relative to the ad display area; values of"top" or "bottom" also accepted and indicate the topmost or bottommost available position for the icon asset. |
icons.duration | number | The duration the icon should be displayed unless clicked or ad is finished playing in seconds. |
icons.offset | string | The time of delay from when the associated linear creative begins playing to when the icon should be displayed in seconds. |
icons.apiFramework | string | Identifies the API needed to execute the icon resource file if applicable. |
icons.pxRatio | string | The pixel ratio for which the icon creative is intended. The pixel ratio is the ratio of physical pixels on the device to the device-independent pixels. An ad intended for display on a device with a pixel ratio that is twice that of a standard 1:1 pixel ratio would use the value "2 " Default value is "1 ". |
icons.clicks | Object | Icon clicks |
icons.clicks.clickThrough | string | A URI to the industryprogram page opened when a viewer clicks the icon. |
icons.clicks.clickTracking | Array | Track click activity within the icon. |
icons.clicks.clickTracking.id | string | An id for the click to be measured. |
icons.clicks.clickTracking.url | string | A URI to the tracking resource file to be called when a click corresponding to the id attribute (if provided) occurs. |
icons.type | "static" | "iframe" | "html" | Resource type of the creative |
icons.creativeType | string | Mime type of the creative |
icons.data | string | Data of the creative, URL for static and iframe resources, html code snippet for html resource. Check the type field for the resource type |
interactiveFiles | Array | Interactive creative files. |
interactiveFiles.apiFramework | string | Identifies the API needed to execute the resource file if applicable |
interactiveFiles.type | string | Identifies the MIME type of the file provided. |
interactiveFiles.url | string | URI to a file providing creative functions for the media file. |
interactiveFiles.variableDuration | boolean | Useful for interactive use cases. Identifies whether the ad always drops when the duration is reached, or if it can potentially extend the duration by pausing the underlying video or delaying the adStopped call after adVideoComplete. If set to true, the extension of the duration should be user-initiated (typically, by engaging with an interactive element to view additional content). |
interface Ad {
duration?: number;
skipOffset?: number;
title?: string;
description?: string;
companions?: Array<{
id?: string;
apiFramework?: string;
width?: string;
height?: string;
assetWidth?: string;
assetHeight?: string;
expandedWidth?: string;
expandedHeight?: string;
adSlotId?: string;
pxratio?: string;
renderingMode?: string;
altText?: string;
clickThrough?: string;
clickTracking?: string[];
type?: "static" | "iframe" | "html";
creativeType?: string;
data?: string;
tracking?: Array<{
offset?: number;
type?: string;
url?: string;
}>;
}>;
icons?: Array<{
program?: string;
width?: string;
height?: string;
xPosition?: string;
yPosition?: string;
duration?: number;
offset?: string;
apiFramework?: string;
pxRatio?: string;
clicks?: {
clickThrough?: string;
clickTracking?: Array<{
id?: string;
url?: string;
}>;
};
type?: "static" | "iframe" | "html";
creativeType?: string;
data?: string;
}>;
interactiveFiles?: Array<{
apiFramework?: string;
type?: string;
url?: string;
variableDuration?: boolean;
}>;
}
ErrorCodes
Field | Description |
---|---|
CONFIGURATION_ERROR | Errors/warnings related to configuration mistakes |
NETWORK_ERROR | Errors/warnings related to network. |
TEXT_ERROR | Errors/warnings parsing text streams. |
MEDIA_ERROR | Errors/warnings parsing or processing audio or video streams, and for demuxing/remuxing related errors/warnings. |
MANIFEST_ERROR | Errors/warnings parsing the Manifest. |
STREAMING_ERROR | Errors/warnings related to streaming. |
DRM_ERROR | Errors/warnings related to key systems. |
PLAYER_ERROR | Miscellaneous errors/warnings from the player. |
CAST_ERROR | Errors/warnings related to casting. |
STORAGE_ERROR | Errors/warnings in the local storage. |
AD_ERROR | Errors/warnings related to ad insertion and playing. |
OTHER_ERROR | Errors/warnings that cannot be classified above. |
enum ErrorCodes {
CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
NETWORK_ERROR = "NETWORK_ERROR",
TEXT_ERROR = "TEXT_ERROR",
MEDIA_ERROR = "MEDIA_ERROR",
MANIFEST_ERROR = "MANIFEST_ERROR",
STREAMING_ERROR = "STREAMING_ERROR",
DRM_ERROR = "DRM_ERROR",
PLAYER_ERROR = "PLAYER_ERROR",
CAST_ERROR = "CAST_ERROR",
STORAGE_ERROR = "STORAGE_ERROR",
AD_ERROR = "AD_ERROR",
OTHER_ERROR = "OTHER_ERROR",
}
AvailabilityWindow
Field | Type | Description |
---|---|---|
id | string | Identifier for the availability window |
start | number | Start time of the availability window |
end | number | End time of the availability window |
interface AvailabilityWindow {
id: string;
start: number;
end: number;
}
ScreenState
enum ScreenState {
FULLSCREEN = "FULLSCREEN",
PICTURE_IN_PICTURE = "PICTURE_IN_PICTURE",
WINDOWED = "WINDOWED",
}