Skip to main content

Player Types Reference

lura.unified.UnifiedEvent

FieldType
namestring
typestring
dataT
class UnifiedEvent<T> {
name: string;
type: string;
data: T;
}

lura.unified.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",
}

lura.unified.VideoType

enum LuraVideoType {
VOD = "VOD",
LIVE = "LIVE",
}

lura.unified.MediaFormat

enum LuraMediaFormat {
DASH = "DASH",
HLS = "HLS",
MP4 = "MP4",
MP3 = "MP3",
WEBM = "WEBM",
}

lura.unified.TrackTypes

enum TrackTypes {
VIDEO = "video",
AUDIO = "audio",
CAPTION = "caption",
}

lura.unified.Tracks

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

lura.unified.VideoTrack

FieldTypeDescription
widthnumberWidth of the video track
heightnumberHeight of the video track
languagestringLanguage of the video track. (e.g. en, es)
bitratenumberBitrate of the video track in kbps
activebooleanBoolean representing whether the video track is active or not
interface VideoTrack {
width: number;
height: number;
language: string;
bitrate: number;
active: boolean;
}

lura.unified.AudioTrack

FieldTypeDescription
languagestringLanguage of the audio track. (e.g. en, es)
labelstringLabel of the audio track (e.g. English)
channelsAudioChannelsChannels of the audio
activebooleanBoolean indicating whether the audio is active or not
interface AudioTrack {
label: string;
language: string;
channels: AudioChannels;
active: boolen;
}

lura.unified.CaptionTrack

FieldTypeDescription
languagestringLanguage of the caption track. (e.g. en, es)
labelstringLabel of the caption track (e.g. English)
typestringType of the caption track
activebooleanBoolean indicating whether the caption is active or not
interface CaptionTrack {
language: string;
label: string;
type: string;
active: boolean;
}

lura.unified.Annotation

FieldTypeDescription
startnumberStarting time of the annotation
endnumberEnding time of the annotation
typestringType of the annotation (e.g. intro, outro)
labelstringLabel for the annotation
interface Annotation {
start: number;
end: number;
type: string;
label?: string;
}

lura.unified.CastTargets

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

lura.unified.AdBreak

FieldTypeDescription
idstringAn identifier for the Ad Break
offsetnumberStart time of the ad in seconds.
adslura.unified.Ad[]Ads of the ad break
watchedbooleanA parameter representing whether the ad break is watched or not.
totalAdsnumberCount of the ads in the ad break.
breakDurationnumberDuration of the ad break.
interface AdBreak {
id: string;
offset: number;
ads: lura.unified.Ad[];
watched?: boolean;
totalAds?: number;
breakDuration?: number;
}

lura.unified.Ad

FieldTypeDescription
durationnumberDuration of the ad in seconds.
skipOffsetnumberSkip offset of the ad in seconds.
titlestringTitle of the ad.
descriptionstringDescription of the ad.
companionsArrayData for the companion ads.
companions.idstringAn optional identifier for the creative.
companions.apiFrameworkstringThe API necessary to communicate with the creative if available.
companions.widthstringThe pixel width of the placement slot for which the creative is intended.
companions.heightstringThe pixel height of the placement slot for which the creative is intended.
companions.assetWidthstringThe pixel width of the creative.
companions.assetHeightstringThe pixel height of the creative.
companions.expandedWidthstringThe maximum pixel width of the creative in its expanded state.
companions.expandedHeightstringThe maximum pixel height of the creative in its expanded state.
companions.adSlotIdstringUsed to identify desiredplacement on a publisher’spage. Values to be used should be discussed between publishers and advertisers
companions.pxratiostringThe 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.renderingModestringUsed 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.altTextstringA string to describe the creative when an ad viewer mouses over the ad.
companions.clickThroughstringA URI to the advertiser’s page that should open when the viewer clicks the companion ad.
companions.clickTrackingstring[]A URI to a tracking resource file used to track a companion clickthrough
companions.type"static" | "iframe" | "html"Resource type of the creative
companions.creativeTypestringMime type of the creative
companions.datastringData of the creative, URL for static and iframe resources, html code snippet for html resource. Check the type field for the resource type
companions.trackingarrayracking events of the companion
companions.tracking.offsetnumberOffset for progress trackings
companions.tracking.typestringType of the tracking event.
companions.tracking.urlstringA URI to the tracking resource for the event specified using the event attribute.
icons.programstringThe program represented in the icon.
icons.widthstringPixel width of the icon asset
icons.heightstringPixel height of the icon asset.
icons.xPositionstringThe 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.yPositionstringThe 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.durationnumberThe duration the icon should be displayed unless clicked or ad is finished playing in seconds.
icons.offsetstringThe time of delay from when the associated linear creative begins playing to when the icon should be displayed in seconds.
icons.apiFrameworkstringIdentifies the API needed to execute the icon resource file if applicable.
icons.pxRatiostringThe 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.clicksObjectIcon clicks
icons.clicks.clickThroughstringA URI to the industryprogram page opened when a viewer clicks the icon.
icons.clicks.clickTrackingArrayTrack click activity within the icon.
icons.clicks.clickTracking.idstringAn id for the click to be measured.
icons.clicks.clickTracking.urlstringA 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.creativeTypestringMime type of the creative
icons.datastringData of the creative, URL for static and iframe resources, html code snippet for html resource. Check the type field for the resource type
interactiveFilesArrayInteractive creative files.
interactiveFiles.apiFrameworkstringIdentifies the API needed to execute the resource file if applicable
interactiveFiles.typestringIdentifies the MIME type of the file provided.
interactiveFiles.urlstringURI to a file providing creative functions for the media file.
interactiveFiles.variableDurationbooleanUseful 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;
}>;
}

lura.unified.ErrorCodes

FieldDescription
CONFIGURATION_ERRORErrors/warnings related to configuration mistakes
NETWORK_ERRORErrors/warnings related to network.
TEXT_ERRORErrors/warnings parsing text streams.
MEDIA_ERRORErrors/warnings parsing or processing audio or video streams, and for demuxing/remuxing related errors/warnings.
MANIFEST_ERRORErrors/warnings parsing the Manifest.
STREAMING_ERRORErrors/warnings related to streaming.
DRM_ERRORErrors/warnings related to key systems.
PLAYER_ERRORMiscellaneous errors/warnings from the player.
CAST_ERRORErrors/warnings related to casting.
STORAGE_ERRORErrors/warnings in the local storage.
AD_ERRORErrors/warnings related to ad insertion and playing.
OTHER_ERRORErrors/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",
}

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.ScreenState

enum ScreenState {
FULLSCREEN = "FULLSCREEN",
PICTURE_IN_PICTURE = "PICTURE_IN_PICTURE",
WINDOWED = "WINDOWED",
}