Skip to main content

Player Types Reference

lura.unified.UnifiedEvent

FieldType
namelura.unified.UnifiedEventName
typestring
dataT
initiatorlura.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

FieldDescription
SYSTEMEvent fired by the player.
USEREvent 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

TypeDescription
lura.unified.LatencyModes | "def" | "low"Supported latency mode values.
type LatencyMode = lura.unified.LatencyModes | "def" | "low";

lura.unified.AvailabilityWindow

FieldTypeDescription
idstringIdentifier for the availability window
startnumberStart time of the availability window
endnumberEnd time of the availability window
interface AvailabilityWindow {
id: string;
start: number;
end: number;
}

lura.unified.TimeUpdateDataInterface

FieldTypeDescription
typestringCurrent playback timeline type.
adlura.unified.AdProgressInterfaceCurrent ad progress information when in an ad.
contentTimenumberCurrent content time in seconds.
annotationsArrayActive annotations for the current time frame.
annotations.startnumberAnnotation start time in seconds.
annotations.endnumberAnnotation end time in seconds.
annotations.typestringAnnotation 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

FieldType
videoArray<lura.unified.VideoTrack>
audioArray<lura.unified.AudioTrack>
captionArray<lura.unified.CaptionTrack>
viewgridArray<lura.unified.ViewGrid>
interface Tracks {
video: lura.unified.VideoTrack[];
audio: lura.unified.AudioTrack[];
caption: lura.unified.CaptionTrack[];
viewgrid: lura.unified.ViewGrid[];
}

lura.unified.VideoTrack

FieldTypeDescription
widthnumberWidth of the video track.
heightnumberHeight of the video track.
bitratenumberBitrate of the video track in kbps.
activebooleanWhether the video track is active.
interface VideoTrack {
width: number;
height: number;
bitrate: number;
active: boolean;
}

lura.unified.AudioTrack

FieldTypeDescription
languagestringLanguage of the audio track.
labelstringLabel of the audio track.
channelsstringAudio channel description.
activebooleanWhether the audio track is active.
interface AudioTrack {
language: string;
label: string;
channels: string;
active: boolean;
}

lura.unified.CaptionTrack

FieldTypeDescription
languagestringLanguage of the caption track.
labelstringLabel of the caption track.
typestringCaption track type.
activebooleanWhether the caption track is active.
interface CaptionTrack {
language: string;
label: string;
type: string;
active: boolean;
}

lura.unified.ViewGrid

FieldTypeDescription
gridIdstringView grid id.
audioLanguagestringAudio language for the view grid.
leftnumberLeft position of the view grid.
topnumberTop position of the view grid.
widthnumberWidth of the view grid.
heightnumberHeight of the view grid.
activebooleanWhether the view grid is active.
isCompositebooleanWhether 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

FieldTypeDescription
startnumberStarting time of the annotation.
endnumberEnding time of the annotation.
typestringType of the annotation.
interface Annotation {
start: number;
end: number;
type: string;
}

lura.unified.EventMetadata

FieldTypeDescription
titlestringEvent title.
descriptionstringEvent description.
startTimenumberEvent start time in seconds.
endTimenumberEvent end time in seconds.
eventIdstringEvent id.
dvr_availability"YES" | "NO"DVR availability flag.
customMetadataobjectCustom 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

FieldTypeDescription
widthnumberTrick-play image width.
timenumberTrick-play time in seconds.
imageDatastringTrick-play image data or URL.
heightnumberTrick-play image height.
rowsnumberNumber of rows in the tile sheet.
columnsnumberNumber of columns in the tile sheet.
offset[number, number]Tile offset.
tileWidthnumberTile width.
tileHeightnumberTile 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

FieldTypeDescription
idstringEngagement id.
countnumberEngagement count.
histogramnumber[]Engagement histogram values.
interface Engagement {
id: string;
count: number;
histogram: number[];
}

lura.unified.Highlight

FieldTypeDescription
idstringHighlight id.
activebooleanWhether the highlight is currently active.
timenumberHighlight start time in seconds.
descriptionstringHighlight description.
titlestringHighlight title.
posterstringHighlight poster image URL.
interface Highlight {
id: string;
active: boolean;
time: number;
description: string;
title: string;
poster: string;
}

Ads

lura.unified.AdBreak

FieldTypeDescription
idstringAd break id.
resourceIdstringResource id for user interaction handling.
offsetnumberStart time of the ad break in seconds.
adslura.unified.Ad[]Ads in the ad break.
watchedbooleanWhether the ad break has been watched.
totalAdsnumberNumber of ads in the ad break.
breakDurationnumberDuration of the ad break in seconds.
origin"CLIENTSIDE" | "SERVERSIDE"Origin of the ad break.
stitcherstringStitcher 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

FieldTypeDescription
durationnumberDuration of the ad in seconds.
skipOffsetnumberSkip offset of the ad in seconds.
titlestringAd title.
descriptionstringAd description.
resourceIdstringResource id for user interaction handling.
companionsArrayCompanion ad data.
companions.idstringCompanion creative id.
companions.apiFrameworkstringAPI framework needed by the companion creative.
companions.widthstringCompanion placement width.
companions.heightstringCompanion placement height.
companions.assetWidthstringCompanion creative width.
companions.assetHeightstringCompanion creative height.
companions.expandedWidthstringExpanded companion creative width.
companions.expandedHeightstringExpanded companion creative height.
companions.adSlotIdstringCompanion ad slot id.
companions.pxratiostringPixel ratio for the companion creative.
companions.renderingModestringRendering mode for the companion ad.
companions.altTextstringAlternate text for the companion creative.
companions.clickThroughstringURL opened when the companion is clicked.
companions.clickTrackingstring[]Companion click tracking URLs.
companions.type"static" | "iframe" | "html"Companion resource type.
companions.creativeTypestringCompanion creative MIME type.
companions.datastringCompanion creative data or URL.
companions.trackingArrayCompanion tracking events.
companions.tracking.offsetnumberTracking offset.
companions.tracking.typestringTracking event type.
companions.tracking.urlstringTracking URL.
iconsArrayIcon creative data.
icons.resourceIdstringResource id to notify the player of icon click.
icons.programstringProgram represented in the icon.
icons.widthstringIcon width.
icons.heightstringIcon height.
icons.xPositionstringIcon x-position.
icons.yPositionstringIcon y-position.
icons.durationnumberIcon display duration in seconds.
icons.offsetstringIcon display offset.
icons.apiFrameworkstringAPI framework needed by the icon resource.
icons.pxRatiostringPixel ratio for the icon creative.
icons.clicksObjectIcon click data.
icons.clicks.clickThroughstringURL opened when the icon is clicked.
icons.clicks.clickTrackingArrayIcon click tracking data.
icons.clicks.clickTracking.idstringClick tracking id.
icons.clicks.clickTracking.urlstringClick tracking URL.
icons.type"static" | "iframe" | "html"Icon resource type.
icons.creativeTypestringIcon creative MIME type.
icons.datastringIcon creative data or URL.
icons.viewTrackingstring[]Icon view tracking URLs.
interactiveFilesArrayInteractive creative files.
interactiveFiles.apiFrameworkstringAPI framework needed by the interactive file.
interactiveFiles.typestringInteractive file MIME type.
interactiveFiles.urlstringInteractive file URL.
interactiveFiles.variableDurationbooleanWhether the interactive ad can extend duration.
isClickablebooleanWhether the ad has a click-through target.
callToActionItemslura.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

FieldTypeDescription
idstringCurrent ad id.
isLuraAdbooleanWhether the current ad is a Lura ad.
totalAdsnumberTotal number of ads in the ad break.
breakDurationnumberAd break duration in seconds.
adDurationnumberCurrent ad duration in seconds.
timeInAdnumberCurrent playback time within the ad.
timeInBreaknumberCurrent playback time within the ad break.
adPositionnumberCurrent ad position in the ad break.
skipOffsetnumberCurrent ad skip offset in seconds.
origin"CLIENTSIDE" | "SERVERSIDE"Current ad origin.
isClickablebooleanWhether the current ad is clickable.
metadataobjectCurrent ad metadata.
metadata.titlestringCurrent 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

FieldTypeDescription
idstringCall-to-action item id.
labelstringLabel displayed on the call-to-action button.
buttonVariantnumberCustom button variant id.
actionnumberAction tag of the call-to-action item.
datastringAction data of the call-to-action item.
startnumberStart time in seconds.
endnumberEnd time in seconds.
interface CallToActionItem {
id: string;
label: string;
buttonVariant: number;
action: number;
data: string;
start: number;
end: number;
}

lura.unified.NotifiableEventType

FieldDescription
CLICKNotifies a click on an ad or ad resource.
CTA_CLICKNotifies a click on a call-to-action item.
BACK_CLICKNotifies a back-click interaction.
enum NotifiableEventType {
CLICK = "CLICK",
CTA_CLICK = "CTA_CLICK",
BACK_CLICK = "BACK_CLICK",
}

Casting

lura.unified.CastTargets

FieldDescription
CHROMECASTChromecast cast target
AIRPLAYAirPlay cast target
enum CastTargets {
CHROMECAST = "chromecast",
AIRPLAY = "airplay",
}

Resources And Captions

lura.unified.LuraResource

FieldTypeDescription
resourceIdstringResource id for user interaction handling
interface LuraResource {
resourceId?: string;
}

lura.unified.UnifiedCaption

FieldTypeDescription
cuestringCaption cue id or cue content.
textstringCaption text.
startnumberCaption start time in seconds.
endnumberCaption 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

FieldTypeDescription
lowLatencybooleanWhether low-latency mode is allowed.
interface LatencyAllowedModes {
lowLatency?: boolean;
}