Player Types Reference
lura.unified.UnifiedEvent
| Field | Type |
|---|---|
| name | lura.unified.UnifiedEventName |
| type | string |
| data | T |
| initiator | lura.unified.InitiatorType |
class UnifiedEvent<T> {
name: lura.unified.UnifiedEventName;
type: string;
data: T;
initiator: lura.unified.InitiatorType;
}
lura.unified.UnifiedEventName
enum UnifiedEventName {
CONFIGURED = "CONFIGURED",
CLEARED = "CLEARED",
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",
SCREEN_STATE_CHANGED = "SCREEN_STATE_CHANGED",
LATENCY_MODE_CHANGED = "LATENCY_MODE_CHANGED",
CAST_AVAILABILITY_CHANGED = "CAST_AVAILABILITY_CHANGED",
CASTING_REQUESTED = "CASTING_REQUESTED",
CASTING_STARTED = "CASTING_STARTED",
CASTING_ENDED = "CASTING_ENDED",
PLAYLIST_ITEM_LOADED = "PLAYLIST_ITEM_LOADED",
PLAYLIST_ITEM_CHANGED = "PLAYLIST_ITEM_CHANGED",
PLAYLIST_COMPLETED = "PLAYLIST_COMPLETED",
PLAYLIST_CONFIG_CHANGE_NEEDED = "PLAYLIST_CONFIG_CHANGE_NEEDED",
PLAYLIST_INITIALIZED = "PLAYLIST_INITIALIZED",
PLAYLIST_DISCARDED = "PLAYLIST_DISCARDED",
PLAYLIST_AUTO_SWITCH_COUNTER = "PLAYLIST_AUTO_SWITCH_COUNTER",
PLAYLIST_AUTO_SWITCH_ABORTED = "PLAYLIST_AUTO_SWITCH_ABORTED",
LIVE_AVAILABILITY_WINDOW_FOUND = "LIVE_AVAILABILITY_WINDOW_FOUND",
EVENT_NOTIFIED = "EVENT_NOTIFIED",
NON_LINEAR_MARKERS = "NON_LINEAR_MARKERS",
NON_LINEAR_STARTED = "NON_LINEAR_STARTED",
NON_LINEAR_COMPLETED = "NON_LINEAR_COMPLETED",
NON_LINEAR_PROGRESS = "NON_LINEAR_PROGRESS",
NON_LINEAR_LOADED = "NON_LINEAR_LOADED",
ENGAGEMENT_LOADED = "ENGAGEMENT_LOADED",
HIGHLIGHTS_UPDATED = "HIGHLIGHTS_UPDATED",
HIGHLIGHT_LOADED = "HIGHLIGHT_LOADED",
HIGHLIGHT_UNLOADED = "HIGHLIGHT_UNLOADED",
HIGHLIGHT_AUTO_SWITCH_COUNTER = "HIGHLIGHT_AUTO_SWITCH_COUNTER",
HIGHLIGHT_AUTO_SWITCH_ABORTED = "HIGHLIGHT_AUTO_SWITCH_ABORTED",
}
lura.unified.InitiatorType
| Field | Description |
|---|---|
| SYSTEM | Event fired by the player. |
| USER | Event fired by user action. |
enum InitiatorType {
SYSTEM = "SYSTEM",
USER = "USER",
}
Playback
lura.unified.VideoType
enum VideoType {
VOD = "VOD",
LIVE = "LIVE",
}
lura.unified.MediaFormat
enum MediaFormat {
DASH = "DASH",
HLS = "HLS",
MP4 = "MP4",
MP3 = "MP3",
WEBM = "WEBM",
WHEP = "WHEP",
}
lura.unified.ScreenState
enum ScreenState {
FULLSCREEN = "FULLSCREEN",
PICTURE_IN_PICTURE = "PICTURE_IN_PICTURE",
WINDOWED = "WINDOWED",
}
lura.unified.LatencyModes
enum LatencyModes {
DEFAULT = "def",
LOW_LATENCY = "low",
}
lura.unified.LatencyMode
| Type | Description |
|---|---|
| lura.unified.LatencyModes | "def" | "low" | Supported latency mode values. |
type LatencyMode = lura.unified.LatencyModes | "def" | "low";
lura.unified.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;
}
lura.unified.TimeUpdateDataInterface
| Field | Type | Description |
|---|---|---|
| type | string | Current playback timeline type. |
| ad | lura.unified.AdProgressInterface | Current ad progress information when in an ad. |
| contentTime | number | Current content time in seconds. |
| annotations | Array | Active annotations for the current time frame. |
| annotations.start | number | Annotation start time in seconds. |
| annotations.end | number | Annotation end time in seconds. |
| annotations.type | string | Annotation type. |
interface TimeUpdateDataInterface {
type: string;
ad?: lura.unified.AdProgressInterface;
contentTime: number;
annotations: Array<{
start: number;
end: number;
type: string;
}>;
}
Tracks
lura.unified.TrackTypes
enum TrackTypes {
VIDEO = "video",
AUDIO = "audio",
CAPTION = "caption",
VIEWGRID = "viewgrid",
}
lura.unified.Tracks
| Field | Type |
|---|---|
| video | Array<lura.unified.VideoTrack> |
| audio | Array<lura.unified.AudioTrack> |
| caption | Array<lura.unified.CaptionTrack> |
| viewgrid | Array<lura.unified.ViewGrid> |
interface Tracks {
video: lura.unified.VideoTrack[];
audio: lura.unified.AudioTrack[];
caption: lura.unified.CaptionTrack[];
viewgrid: lura.unified.ViewGrid[];
}
lura.unified.VideoTrack
| Field | Type | Description |
|---|---|---|
| width | number | Width of the video track. |
| height | number | Height of the video track. |
| bitrate | number | Bitrate of the video track in kbps. |
| active | boolean | Whether the video track is active. |
interface VideoTrack {
width: number;
height: number;
bitrate: number;
active: boolean;
}
lura.unified.AudioTrack
| Field | Type | Description |
|---|---|---|
| language | string | Language of the audio track. |
| label | string | Label of the audio track. |
| channels | string | Audio channel description. |
| active | boolean | Whether the audio track is active. |
interface AudioTrack {
language: string;
label: string;
channels: string;
active: boolean;
}
lura.unified.CaptionTrack
| Field | Type | Description |
|---|---|---|
| language | string | Language of the caption track. |
| label | string | Label of the caption track. |
| type | string | Caption track type. |
| active | boolean | Whether the caption track is active. |
interface CaptionTrack {
language: string;
label: string;
type: string;
active: boolean;
}
lura.unified.ViewGrid
| Field | Type | Description |
|---|---|---|
| gridId | string | View grid id. |
| audioLanguage | string | Audio language for the view grid. |
| left | number | Left position of the view grid. |
| top | number | Top position of the view grid. |
| width | number | Width of the view grid. |
| height | number | Height of the view grid. |
| active | boolean | Whether the view grid is active. |
| isComposite | boolean | Whether the view grid is composite. |
interface ViewGrid {
gridId: string;
audioLanguage: string;
left: number;
top: number;
width: number;
height: number;
active: boolean;
isComposite: boolean;
}
Content Metadata
lura.unified.Annotation
| Field | Type | Description |
|---|---|---|
| start | number | Starting time of the annotation. |
| end | number | Ending time of the annotation. |
| type | string | Type of the annotation. |
interface Annotation {
start: number;
end: number;
type: string;
}
lura.unified.EventMetadata
| Field | Type | Description |
|---|---|---|
| title | string | Event title. |
| description | string | Event description. |
| startTime | number | Event start time in seconds. |
| endTime | number | Event end time in seconds. |
| eventId | string | Event id. |
| dvr_availability | "YES" | "NO" | DVR availability flag. |
| customMetadata | object | Custom metadata keyed by string. |
interface EventMetadata {
title?: string;
description?: string;
startTime?: number;
endTime?: number;
eventId?: string;
dvr_availability?: "YES" | "NO";
customMetadata?: {
[key: string]: string;
};
}
lura.unified.TrickplayData
| Field | Type | Description |
|---|---|---|
| width | number | Trick-play image width. |
| time | number | Trick-play time in seconds. |
| imageData | string | Trick-play image data or URL. |
| height | number | Trick-play image height. |
| rows | number | Number of rows in the tile sheet. |
| columns | number | Number of columns in the tile sheet. |
| offset | [number, number] | Tile offset. |
| tileWidth | number | Tile width. |
| tileHeight | number | Tile height. |
interface TrickplayData {
width: number;
time: number;
imageData: string;
height?: number;
rows?: number;
columns?: number;
offset?: [number, number];
tileWidth?: number;
tileHeight?: number;
}
lura.unified.Engagement
| Field | Type | Description |
|---|---|---|
| id | string | Engagement id. |
| count | number | Engagement count. |
| histogram | number[] | Engagement histogram values. |
interface Engagement {
id: string;
count: number;
histogram: number[];
}
lura.unified.Highlight
| Field | Type | Description |
|---|---|---|
| id | string | Highlight id. |
| active | boolean | Whether the highlight is currently active. |
| time | number | Highlight start time in seconds. |
| description | string | Highlight description. |
| title | string | Highlight title. |
| poster | string | Highlight poster image URL. |
interface Highlight {
id: string;
active: boolean;
time: number;
description: string;
title: string;
poster: string;
}
Ads
lura.unified.AdBreak
| Field | Type | Description |
|---|---|---|
| id | string | Ad break id. |
| resourceId | string | Resource id for user interaction handling. |
| offset | number | Start time of the ad break in seconds. |
| ads | lura.unified.Ad[] | Ads in the ad break. |
| watched | boolean | Whether the ad break has been watched. |
| totalAds | number | Number of ads in the ad break. |
| breakDuration | number | Duration of the ad break in seconds. |
| origin | "CLIENTSIDE" | "SERVERSIDE" | Origin of the ad break. |
| stitcher | string | Stitcher of the ad break. |
interface AdBreak {
id: string;
resourceId?: string;
offset: number;
ads: lura.unified.Ad[];
watched?: boolean;
totalAds?: number;
breakDuration?: number;
origin: "CLIENTSIDE" | "SERVERSIDE";
stitcher: string;
}
lura.unified.Ad
| Field | Type | Description |
|---|---|---|
| duration | number | Duration of the ad in seconds. |
| skipOffset | number | Skip offset of the ad in seconds. |
| title | string | Ad title. |
| description | string | Ad description. |
| resourceId | string | Resource id for user interaction handling. |
| companions | Array | Companion ad data. |
| companions.id | string | Companion creative id. |
| companions.apiFramework | string | API framework needed by the companion creative. |
| companions.width | string | Companion placement width. |
| companions.height | string | Companion placement height. |
| companions.assetWidth | string | Companion creative width. |
| companions.assetHeight | string | Companion creative height. |
| companions.expandedWidth | string | Expanded companion creative width. |
| companions.expandedHeight | string | Expanded companion creative height. |
| companions.adSlotId | string | Companion ad slot id. |
| companions.pxratio | string | Pixel ratio for the companion creative. |
| companions.renderingMode | string | Rendering mode for the companion ad. |
| companions.altText | string | Alternate text for the companion creative. |
| companions.clickThrough | string | URL opened when the companion is clicked. |
| companions.clickTracking | string[] | Companion click tracking URLs. |
| companions.type | "static" | "iframe" | "html" | Companion resource type. |
| companions.creativeType | string | Companion creative MIME type. |
| companions.data | string | Companion creative data or URL. |
| companions.tracking | Array | Companion tracking events. |
| companions.tracking.offset | number | Tracking offset. |
| companions.tracking.type | string | Tracking event type. |
| companions.tracking.url | string | Tracking URL. |
| icons | Array | Icon creative data. |
| icons.resourceId | string | Resource id to notify the player of icon click. |
| icons.program | string | Program represented in the icon. |
| icons.width | string | Icon width. |
| icons.height | string | Icon height. |
| icons.xPosition | string | Icon x-position. |
| icons.yPosition | string | Icon y-position. |
| icons.duration | number | Icon display duration in seconds. |
| icons.offset | string | Icon display offset. |
| icons.apiFramework | string | API framework needed by the icon resource. |
| icons.pxRatio | string | Pixel ratio for the icon creative. |
| icons.clicks | Object | Icon click data. |
| icons.clicks.clickThrough | string | URL opened when the icon is clicked. |
| icons.clicks.clickTracking | Array | Icon click tracking data. |
| icons.clicks.clickTracking.id | string | Click tracking id. |
| icons.clicks.clickTracking.url | string | Click tracking URL. |
| icons.type | "static" | "iframe" | "html" | Icon resource type. |
| icons.creativeType | string | Icon creative MIME type. |
| icons.data | string | Icon creative data or URL. |
| icons.viewTracking | string[] | Icon view tracking URLs. |
| interactiveFiles | Array | Interactive creative files. |
| interactiveFiles.apiFramework | string | API framework needed by the interactive file. |
| interactiveFiles.type | string | Interactive file MIME type. |
| interactiveFiles.url | string | Interactive file URL. |
| interactiveFiles.variableDuration | boolean | Whether the interactive ad can extend duration. |
| isClickable | boolean | Whether the ad has a click-through target. |
| callToActionItems | lura.unified.CallToActionItem[] | Call-to-action items associated with the ad. |
interface Ad {
duration?: number;
skipOffset?: number;
title?: string;
description?: string;
resourceId?: 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<{
resourceId?: string;
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;
viewTracking?: string[];
}>;
interactiveFiles?: Array<{
apiFramework?: string;
type?: string;
url?: string;
variableDuration?: boolean;
}>;
isClickable: boolean;
callToActionItems?: lura.unified.CallToActionItem[];
}
lura.unified.AdProgressInterface
| Field | Type | Description |
|---|---|---|
| id | string | Current ad id. |
| isLuraAd | boolean | Whether the current ad is a Lura ad. |
| totalAds | number | Total number of ads in the ad break. |
| breakDuration | number | Ad break duration in seconds. |
| adDuration | number | Current ad duration in seconds. |
| timeInAd | number | Current playback time within the ad. |
| timeInBreak | number | Current playback time within the ad break. |
| adPosition | number | Current ad position in the ad break. |
| skipOffset | number | Current ad skip offset in seconds. |
| origin | "CLIENTSIDE" | "SERVERSIDE" | Current ad origin. |
| isClickable | boolean | Whether the current ad is clickable. |
| metadata | object | Current ad metadata. |
| metadata.title | string | Current ad title. |
interface AdProgressInterface {
id: string;
isLuraAd?: boolean;
totalAds: number;
breakDuration: number;
adDuration: number;
timeInAd: number;
timeInBreak: number;
adPosition: number;
skipOffset?: number;
origin: "CLIENTSIDE" | "SERVERSIDE";
isClickable: boolean;
metadata?: {
title: string;
};
}
lura.unified.CallToActionItem
| Field | Type | Description |
|---|---|---|
| id | string | Call-to-action item id. |
| label | string | Label displayed on the call-to-action button. |
| buttonVariant | number | Custom button variant id. |
| action | number | Action tag of the call-to-action item. |
| data | string | Action data of the call-to-action item. |
| start | number | Start time in seconds. |
| end | number | End time in seconds. |
interface CallToActionItem {
id: string;
label: string;
buttonVariant: number;
action: number;
data: string;
start: number;
end: number;
}
lura.unified.NotifiableEventType
| Field | Description |
|---|---|
| CLICK | Notifies a click on an ad or ad resource. |
| CTA_CLICK | Notifies a click on a call-to-action item. |
| BACK_CLICK | Notifies a back-click interaction. |
enum NotifiableEventType {
CLICK = "CLICK",
CTA_CLICK = "CTA_CLICK",
BACK_CLICK = "BACK_CLICK",
}
Casting
lura.unified.CastTargets
| Field | Description |
|---|---|
| CHROMECAST | Chromecast cast target |
| AIRPLAY | AirPlay cast target |
enum CastTargets {
CHROMECAST = "chromecast",
AIRPLAY = "airplay",
}
Resources And Captions
lura.unified.LuraResource
| Field | Type | Description |
|---|---|---|
| resourceId | string | Resource id for user interaction handling |
interface LuraResource {
resourceId?: string;
}
lura.unified.UnifiedCaption
| Field | Type | Description |
|---|---|---|
| cue | string | Caption cue id or cue content. |
| text | string | Caption text. |
| start | number | Caption start time in seconds. |
| end | number | Caption end time in seconds. |
interface UnifiedCaption {
cue: string;
text: string;
start: number;
end: number;
}
lura.unified.SubtitleMimeType
enum SubtitleMimeType {
PLAIN = "text/plain",
VTT = "text/vtt",
SRT = "text/srt",
TTML = "application/ttml+xml",
DFXP = "application/ttaf+xml",
SMPTE_TT = "application/smpte-tt+xml",
SCC = "application/x-scc",
}
lura.unified.PosterMimeType
enum PosterMimeType {
JPG = "image/jpg",
JPEG = "image/jpeg",
WEBP = "image/webp",
APNG = "image/apng",
AVIF = "image/avif",
}
lura.unified.MediaMimeType
enum MediaMimeType {
VIDEO_MP4 = "video/mp4",
VIDEO_WEBM = "video/webm",
AUDIO_MP4 = "audio/mp4",
VIDEO_MP2T = "video/mp2t",
AUDIO_AAC = "audio/aac",
AUDIO_AC3 = "audio/ac3",
AUDIO_EC3 = "audio/ec3",
VIDEO_HLS_APPLE = "application/vnd.apple.mpegurl",
VIDEO_HLS = "application/x-mpegurl",
AUDIO_HLS = "audio/mpegurl",
VIDEO_DASH = "application/dash+xml",
AUDIO_MP3 = "audio/mpeg",
WHEP = "application/whep",
}
lura.unified.TrickPlayMimeType
enum TrickPlayMimeType {
BIF_APPLICATION = "application/octet-stream",
BIF_BINARY = "binary/octet-stream",
BIF_IMAGE = "image/bif",
LURA_TRICKPLAY = "application/x-trickplay",
}
Errors
lura.unified.ErrorCodes
enum ErrorCodes {
NXS_FORBIDDEN = 1001,
NXS_ASSET_NOT_FOUND = 1002,
NXS_REQUEST_FAILED = 1003,
NXS_REQUEST_TIMED_OUT = 1005,
MANIFEST_REQUEST_FAILED = 1101,
MANIFEST_FORBIDDEN = 1102,
MANIFEST_NOT_FOUND = 1103,
MANIFEST_IS_EMPTY = 1104,
MANIFEST_REQUEST_TIMED_OUT = 1105,
SEGMENT_REQUEST_FAILED = 1201,
SEGMENT_FORBIDDEN = 1202,
SEGMENT_NOT_FOUND = 1203,
SEGMENT_REQUEST_TIMED_OUT = 1205,
MEDIA_REQUEST_FAILED = 1301,
MEDIA_FORBIDDEN = 1302,
MEDIA_NOT_FOUND = 1303,
MEDIA_REQUEST_TIMED_OUT = 1305,
CONCURRENCY_LIMIT_REACHED = 1901,
DEVICE_CANNOT_PLAY_THIS_PROFILE = 2001,
MEDIA_DECODING_ERROR = 2002,
NO_PLAYABLE_MEDIA_FOUND = 2003,
DRM_REQUEST_FAILED = 3001,
REQUESTED_KEY_SYSTEM_NOT_AVAILABLE = 3002,
DRM_INITIALIZATION_FAILED = 3003,
DRM_REQUEST_TIMED_OUT = 3005,
CASTING_START_FAILED = 4001,
CASTING_CONNECTION_FAILED = 4002,
UNKNOWN_ERROR = 5001,
OFFLINE_NO_SPACE_LEFT_ON_DEVICE = 6001,
OFFLINE_DOWNLOADING_ERROR = 6002,
OFFLINE_MANIFEST_NOT_FOUND_ERROR = 6003,
OFFLINE_DRM_DOWNLOAD_ERROR = 6004,
PLAYER_LICENSE_NOT_FOUND = 7001,
PLAYER_LICENSE_INVALID = 7002,
PLAYER_LICENSE_EXPIRED = 7003,
PLAYER_LICENSE_IS_NOT_VALID = 7004,
}
Configuration
lura.unified.Configuration
Configuration is documented in Configuration.
lura.unified.PlaylistConfiguration
PlaylistConfiguration is documented in Playlist Configuration.
lura.unified.LatencyAllowedModes
| Field | Type | Description |
|---|---|---|
| lowLatency | boolean | Whether low-latency mode is allowed. |
interface LatencyAllowedModes {
lowLatency?: boolean;
}