Skip to main content

Configuration

Lura Configuration

AttributeTypeDescriptionUpdatable
appKeystringAppKey generated in MCP based on the pre-adjusted play configurationNo
assetIdstringAssetId of the VOD or the Live StreamNo
tokenstring(Optional) When specified the provided token will be used in entitlements requests.No
const config = {
...
lura: {
appKey: "<YOUR_APP_KEY>",
assetId: "<ASSET_ID>",
token: "<OPTIONAL_TOKEN>"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Controls Configuration

AttributeTypeDescriptionUpdatable
enabledbooleanEnable or disable the UI (Defaults to true)Yes
theme"Default"UI Theme of the Lura Player.Yes
platform"desktop" | "tv"The platform that the player is currently playing in.Yes
layout"default" | "tv" | "vertical"UI Layout of the Lura Player.Yes
autoplaybooleanAutoplay attribute of the player. Defaults to falseNo
mutedbooleanWhether to start muted when the player autoplays. Defaults to false.No
volumenumberInitial volume of the player between 0.0 and 1.0. Defaults to 1.0No
loopbooleanWhether the video should play in a loop. Defaults to falseNo
sharingobjectIn-video sharing configuration.Yes
sharing.urlstringURL to create the sharing link.Yes
sharing.descriptionstringDescription for social sharing.Yes
sharing.posterUrlstringPoster URL for social sharing.Yes
sharing.socials("facebook" | "whatsapp" | "x" | "pinterest" | "reddit" | "tumblr")[]Social sharing platforms to enable.Yes
const config = {
...
controls: {
enabled: true,
theme: "Default",
platform: "desktop",
layout: "default",
autoplay: true,
muted: true,
volume: 1.0,
loop: false,
sharing: {
url: "https://example.com/watch/asset-id",
description: "Example video description",
posterUrl: "https://example.com/poster.jpg",
socials: ["facebook", "whatsapp", "x", "pinterest", "reddit", "tumblr"],
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Ads Configuration

Policy

Ad policy can be configured by the policy object inside ads. Ad policy is independent of the ad delivery type and applies to both client-side ads and server-side ads.

AttributeTypeDescriptionUpdatable
policyobjectConfigurations of the ad policyNo
policy.skipMode"ad" | "pod"Skip mode of the ads, "ad" will skip a single ad wherever possible, "pod" will skip the whole pod wherever possible. (Defaults to pod)No
policy.cooldownnumberSnapback cooldown duration in seconds after an ad break completes. Set to 0 to disable the cooldown.No
policy.pauseAdCooldownnumberCooldown duration in seconds between non linear pause ad displays. Set to 0 to disable the cooldown.No
const config = {
...
ads: {
policy: {
skipMode: "ad",
cooldown: 300,
pauseAdCooldown: 300
}
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Macros

In order to add macros, you need to encapsulate your macro string by square brackets in the URLs that you've provided.

url: "https://example.com/adtag?macro1=[MACRO1]&macro2=[MACRO2]";

After specifying the macros, in your URLs, you can specify them using macros attribute.

const config = {
...
ads: {
macros: {
USER_ID: "1234567890",
SESSION_ID: "078a54ef-c45e-4356-b556-a99fdab158c1",
},
clientSide: {
provider: "generic",
generic: {
breaks: [
{ url: "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]"},
{ url: "https://example.com/adtag?pal_nonce=[LURA_PAL_NONCE]&correlator=[LURA_CORRELATOR]"},
],
},
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Custom Macros

AttributeTypeDescriptionUpdatable
macrosObject<key: string, string>Your macros in key value pair as string.Yes
const config = {
...
ads: {
macros: {
USER_ID: "1234567890",
SESSION_ID: "078a54ef-c45e-4356-b556-a99fdab158c1",
},
clientSide: {
provider: "generic",
generic: {
breaks: [
{ url: "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]"},
{ url: "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]"},
],
},
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Reserved Macros

AttributeDescriptionUpdatable
LURA_PAL_NONCENonce generated by PAL SDK if PAL Plugin is configured and enabledNo
LURA_CORRELATORRandomly generated stringNo
const config = {
...
ads: {
clientSide: {
provider: "generic",
generic: {
breaks: [
{ url: "https://example.com/adtag?pal_nonce=[LURA_PAL_NONCE]&correlator=[LURA_CORRELATOR]"},
],
},
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Serverside Ads

AttributeTypeDescriptionUpdatable
providerstringServerside ad provider.No
const config = {
...
lura: {
appKey: "<APP_KEY_WITH_SSAI_ENABLED>",
assetId: "<ASSET_ID_YOU_WANT_TO_PLAY>"
}
ads: {
serverSide: {
provider: "lura",
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Clientside Ads

AttributeTypeDescriptionUpdatable
provider"generic" | "gam" | "freewheel"Provider of your client side adNo
genericObjectLuraPlayer Ad Manager managed ads configurationNo
gamObjectIMA SDK managed ads configurationNo
freewheelObjectFreeWheel managed ads configurationNo

Generic Configuration

AttributeTypeRequiredDescriptionUpdatable
breaksArray<{url: string, offset?: string | number}>yesAd breaks informationNo
breaks[i].urlstringyesURL of the VAST or VMAP Ad TagNo
breaks[i].offsetstring | numberonly if vast url is providedOffset of the VAST Ad Tag. The offset value can be provided in "preroll", "postroll", "NN%", "HH:MM:SS.mmm" and seconds as number format.No
info

LuraPlayer Ad Manager will assume that the entered URL is a VMAP URL if no offset is provided and will try to fetch the data from the provided URL. However, if the response is not a VMAP, LuraPlayer Ad Manager will ignore it.

const config = {
...
ads: {
clientSide: {
provider: "generic",
generic: {
breaks: [
{
// Ad will play before the content.
offset: "preroll",
url: "https://example.com/your_vast_url"
},
{
// Ad will play in the middle of the content.
offset: "50%",
url: "https://example.com/your_vast_url"
},
{
// Ad will play 1 minute 10 seconds from the beginning of the video.
offset: "00:01:10.000",
url: "https://example.com/your_vast_url"
},
{
// Ad will play 125 seconds from the beginning of the video.
offset: 125,
url: "https://example.com/your_vast_url"
},
{
// Ads will be aligned based on the time of the ads in the VMAP
url: "https://example.com/your_vmap_url"
},
{
// This will be ignored, since it is a VAST Url without an offset.
url: "https://example.com/your_vast_url"
}
],
}
}
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

GAM Configuration

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanYesEnable the plugin (Defaults to false if no value is given.)No
adTagUrlstringNoAd Tag URL of the advertisement. (VAST, VPAID, VMAP, SIMID)No
liveStreamPrefetchSecondsnumberNoInform IMA about when the ad should start loading before the ad shows in live streams.No
const config = {
...
ads: {
clientSide: {
provider: "gam",
gam: {
enabled: true,
adTagUrl:
"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=[LURA_CORRELATOR]",
}
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

FreeWheel Configuration

AttributeTypeDescriptionUpdatable
enabledbooleanEnable the plugin (Defaults to false if no value is given.)No
networkIdstringNetwork IdNo
serverUrlstringServer UrlNo
profileIdstringProfile IdNo
siteSectionIdstringSite Section IdNo
videoAssetIdstringVideo Asset IdNo
adSlotsArrayPositions for the ad slotsNo
adSlots.customIdstringCustom id for the ad slotsNo
adSlots.adUnit"preroll" | "midroll" | "postroll"Ad unit for the ad slotsNo
adSlots.timePositionnumberTime position for the ad slotsNo
adSlots.slotProfilestringSlot profile for the ad slotsNo
adSlots.cuepointSequencenumberCuepoint sequence for the ad slotsNo
adSlots.maxDurationnumberMax duration for the ad slotsNo
adSlots.minDurationnumberMin duration for the ad slotsNo
adSlots.acceptContentTypestringAccept content type for the ad slotsNo
adSlots.signalIdstringSignal id for the ad slotsNo
adSlots.maxAdsnumberMax ads for the ad slotsNo
keyValueMap{[key: string]: string}Key value map to be passed to the Freewheel SDKNo
parametersArray<{name: string, value: any, level: any}>Parameters to be passed to the Freewheel SDKNo
FreeWheel Configuration
const config = {
...
ads: {
clientSide:{
provider: "freewheel",
freewheel: {
enabled: true,
networkId: 42015,
serverUrl: "https://demo.v.fwmrm.net/ad/g/1",
profileId: "42015:js_allinone_profile",
videoAssetId: "js_allinone_demo_video",
siteSectionId: "js_allinone_demo_site_section",
adSlots: [
{ customId: "preroll1", adUnit: "preroll", timePosition: 0 },
{ customId: "midroll1", adUnit: "midroll", timePosition: 222 },
{ customId: "midroll2", adUnit: "midroll", timePosition: 444 },
{ customId: "midroll3", adUnit: "midroll", timePosition: 666 },
{ customId: "postroll1", adUnit: "postroll", timePosition: 888 },
],
},
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Non Linear Ads

Pause Ads

AttributeTypeDescriptionUpdatable
provider"generic"Provider of your client non linear adNo
genericObjectLuraPlayer Ad Manager managed non linear ads configurationNo
generic.urlstringURL for VAST tag that includes non linear adsNo
generic.xPosition"left" | "center" | "right"Horizontal display box position of the non linear adsNo
generic.yPosition"top" | "center" | "bottom"Vertical display box position of the non linear adsNo
generic.backgroundOpacitynumberBackground opacity of RGB(1,1,1) background when the ad is displayedNo
generic.slideAnimationObjectConfiguration object for the transition animation for the non linear adNo
generic.slideAnimation.enabledbooleanWhether the slide animation is enabled or notNo
generic.slideAnimation.direction"left" | "right" | "up" | "down"Direction for the slide animationNo
generic.slideAnimation.durationnumberDuration for the slide animation (in seconds)No
generic.paddingObjectConfiguration object for the padding for the non linear ad display areaNo
generic.padding.topstringTop padding in acceptable unitsNo
generic.padding.bottomstringBottom padding in acceptable unitsNo
generic.padding.leftstringLeft padding in acceptable unitsNo
generic.padding.rightstringRight padding in acceptable unitsNo
const config = {
...
ads: {
nonLinear: {
pause: {
provider: "generic",
generic: {
url: "VAST_AD_TAG_URL_WITH_NON_LINEAR_ADS",
xPosition: "right",
yPosition: "center",
backgroundOpacity: 0.6,
slideAnimation: {
enabled: true,
direction: "left",
duration: 0.6,
},
padding: {
right: "5%",
},
},
},
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Cast Configuration

Airplay Configuration

AttributeTypeOptionalDescriptionUpdatable
enabledbooleantrueWhether casting is enabled in available devices. (Defaults to false)Yes
const config = {
...
cast: {
airplay: {
enabled: true
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Chromecast Configuration

AttributeTypeOptionalDescriptionUpdatable
enabledbooleantrueWhether casting is enabled in available devices. (Defaults to false)Yes
appIdstringfalseChromecast receiver application ID.Yes
const config = {
...
cast: {
chromecast: {
enabled: true,
appId: "12345678"
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Name Configuration

const config = {
...
name: "lorem-ipsum-dolor-sit-amet",
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Concurrency Configuration

Concurrency configuration lets the player include session identity and limit information for playback concurrency checks. This feature requires Akta Cloud.

AttributeTypeDescriptionUpdatable
enabledbooleanWhether concurrency handling is enabled.No
accountIdstringAccount identifier used for concurrency checks.No
deviceIdstringDevice identifier used for concurrency checks.No
maxnumberMaximum number of allowed concurrent playback sessions.No
const config = {
...
concurrency: {
enabled: true,
accountId: "<ACCOUNT_ID>",
deviceId: "<DEVICE_ID>",
max: 2
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Content Configuration

caution

Providing a lura key will fill this field from MCP. You don't need to configure this part if you are using lura appKey and assetId. This part is only for manual media configuration and for overriding the data filled from mcp (e.g. title or description).

Title Configuration

AttributeTypeDescriptionUpdatable
titlestringTitle of the content.Yes
const config = {
...
content: {
title: "Title of the video"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Description Configuration

AttributeTypeDescriptionUpdatable
descriptionstringDescription of the content.Yes
const config = {
...
content: {
description: "Lorem ipsum dolor sit amet, consectetur adespiscing elit"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Language Configuration

AttributeTypeRequiredDescriptionUpdatable
languagestringnoLanguage of the content in ISO 639-1 formatYes
const config = {
...
content: {
language: "en"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Start At Configuration

AttributeTypeDescriptionUpdatable
startAtnumberVOD: offset in seconds from the beginning of the asset.
DVR (live with content.dvr enabled): UNIX timestamp in seconds for the initial playback position; must fall within the DVR availability window.
No
info

For on-demand playback, startAt is a time offset into the file. For DVR / Restart TV on a live stream, pass a wall-clock UNIX timestamp in seconds (not a relative offset). DVR requires content.dvr to be configured so the player can resolve the seekable window.

VOD

Offset from the start of the asset, in seconds.

const config = {
...
content: {
startAt: 30,
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

DVR (live)

Initial position as a UNIX timestamp in seconds (replace the value with a time inside your stream’s DVR window).

const config = {
...
content: {
dvr: {
enabled: true,
mode: "event",
},
startAt: 1710528000,
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

DVR Configuration

DVR settings live under content.dvr. They apply to live streams (for example Restart TV) when you need the player to compute a seekable availability window.

Akta Cloud requirement

Restart TV requires Akta Cloud configuration before the player can expose DVR controls.

In Akta Cloud, configure DVR from Live Encoders > Edit Encoder > Settings tab > DVR or override it per event from Edit Event > Content Control > DVR. Events are created in Inherit mode by default. The event-level values are:

  • Inherit - Uses the encoder DVR setting.
  • Enabled - Enables DVR for the event, overriding the encoder.
  • Disabled - Disables DVR for the event, overriding the encoder.

In Play Configuration > Edit > Private > Custom, add and keep this block:

dvr:
enabled: true

Restart TV does not require a separate play configuration. Restart TV is fully compatible only with server-side ads stitched by Akta.

AttributeTypeDescriptionUpdatable
enabledbooleanWhen true, DVR handling is enabled for the live stream. Defaults to false.No
mode"event" | "window"event — window is derived from event metadata (start/end and DVR availability from the encoder). window — window is a sliding range ending at “now”, spanning availabilityWindow seconds into the past.No
availabilityWindownumberDuration of the DVR window in seconds. Used when mode is "window".No
info

For "event" mode, the player relies on event metadata (including DVR availability). For "window" mode, set availabilityWindow to the desired lookback length in seconds.

Window mode

Sliding DVR window ending at the current time, spanning availabilityWindow seconds into the past.

const config = {
...
content: {
dvr: {
enabled: true,
mode: "window",
availabilityWindow: 7200,
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Event mode

Availability window is derived from event metadata (event start/end and DVR availability from the encoder). availabilityWindow is not used in this mode.

const config = {
...
content: {
dvr: {
enabled: true,
mode: "event",
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Low Latency Media Configuration

Some live streams can be delivered through both a standard media source and a lower-latency media source. The optional content.lowLatencyMedia field holds the low-latency source list. It uses the same item shape, MIME types, DRM fields, and platform handling rules as content.media.

When content.lowLatencyMedia is present and contains at least one valid playable media item, low latency mode is available for that content. When it is omitted, empty, or not an array, only default latency mode is available.

info

When playback is resolved through Akta Cloud (app key + asset id), content.lowLatencyMedia is returned automatically for live content that has a low-latency source configured. You only need to set it manually for direct media configuration.

AttributeTypeRequiredDescriptionUpdatable
urlstringyesContent URL of the low-latency source.No
typestringyesMIME type of the content. Must match the values used for content.media (for example application/x-mpegURL for HLS or application/dash+xml for DASH).No
licenseUrlstringnoLicense URL of the content. Only required for DRM-protected low-latency sources.No
const config = {
...
content: {
media: [
{
url: "https://example.com/default.m3u8",
type: "application/x-mpegURL"
}
],
lowLatencyMedia: [
{
url: "https://example.com/low-latency.m3u8",
type: "application/x-mpegURL"
}
]
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
note

Default latency mode ("def") is always available for valid content because content.media is required. Low latency mode ("low") is available only when content.lowLatencyMedia is present and non-empty. Use getLatencyModeAvailability() to check which modes are available at runtime.

Annotations Configuration

AttributeTypeRequiredDescription
startnumberyesStart time in seconds
endnumberyesEnd time in seconds
typestringyesType of the annotation
labelstringnoLabel of the annotation
const config = {
...
content: {
...
annotations: [
...
{
start: 0,
end: 10,
type: "intro"
}
...
],
...
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Media Source

AttributeTypeRequiredDescriptionUpdatable
urlstringyesContent URLNo
typestringyesMIME type of the contentNo
licenseUrlstringnoLicense URL of the content. (Only required for DRM Protected videos)No

Supported MIME types:

  • application/dash+xml - For DASH streams
  • application/x-mpegURL - For HLS streams
  • video/mp4 - For MP4 videos
const config = {
...
content: {
media: [
...
{
url: "https://media.example.com/hls.m3u8",
type: "application/x-mpegURL",
licenseUrl: "https://license.example.com"
},
{
url: "https://media.example.com/dash.mpd",
type: "application/dash+xml",
licenseUrl: "https://license.example.com"
},
{
url: "https://media.example.com/mp4.mp4",
type: "video/mp4",
licenseUrl: "https://license.example.com"
},
...
]
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

DRM Configuration

Widevine and Playready

AttributeTypeRequiredDescriptionUpdatable
licenseUrlstringyesLicense URL of the content.No
Widevine and Playready
const config = {
...
content: {
media: [
...
{
url: "YOUR_PROTECTED_MEDIA",
type: "application/dash+xml",
licenseUrl: "YOUR_DRM_LICENSE_SERVER_URL"
}
...
]
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

FairPlay

In media item:

AttributeTypeRequiredDescriptionUpdatable
licenseUrlstringyesLicense URL of the content.No

In clientCertificates:

AttributeTypeDescriptionUpdatable
datastringFairPlay certificate data.No
urlstringURL to download the FairPlay certificate data by GET request.No
FairPlay
const config = {
...
content: {
media: [
...
{
url: "YOUR_PROTECTED_MEDIA",
type: "application/x-mpegURL",
licenseUrl: "YOUR_DRM_LICENSE_SERVER_URL"
}
...
],
clientCertificates: {
fairplay: {
// You can either provide the certificate data
data: "YOUR_FAIRPLAY_CERTIFICATE_DATA",
// Or the URL to get the certificate data
url: "https://example.com/path/to/certificate/data"
}
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Preferred DRM Systems

AttributeTypeDescriptionUpdatable
preferredDRMSystemsArray<"widevine" | "fairplay" | "playready">Preferred DRM Systems.No

Sidecar Caption Configuration

AttributeTypeRequiredDescriptionUpdatable
urlstringyesURL of the caption that will be loadedNo
typestringyesMIME type of the captionNo
languagestringyesLanguage of the caption in ISO 639-1 formatNo

Supported MIME types:

  • text/vtt - Web Video Text Tracks Format (WebVTT)
  • text/plain - SubRip Text (SRT)
  • application/ttml+xml - Timed Text Markup Language (TTML)
  • application/ttaf+xml - Distribution Format Exchange Profile (DFXP)
  • application/smpte-tt+xml - Society of Motion Picture and Television Engineers - Timed Text (SMPTE-TT)
const config = {
...
content: {
media: [
...
{
url: "https://example.com/en.vtt",
type: "text/vtt",
language: "en"
},
{
url: "https://example.com/es.xml",
type: "application/ttml+xml",
language: "es"
},
...
]
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Captions Display Configuration

Use content.captions.enabled to disable captions for the content.

AttributeTypeDescriptionUpdatable
enabledbooleanDisables captions when set to false.No
const config = {
...
content: {
captions: {
enabled: false
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Poster Image Configuration

AttributeTypeRequiredDescriptionUpdatable
urlstringyesPoster URL of the content.No
typestringyesMIME type of the content.No
widthnumbernoWidth of the content (not required for single poster image)No
heightnumbernoHeight of the content (not required for single poster image)No

Supported MIME types:

  • image/jpg
  • image/jpeg
  • image/webp
  • image/apng
  • image/avif

const config = {
...
content: {
media: [
...
{
url: "https://picsum.photos/640/360",
type: "image/jpeg",
width: 640,
height: 360,
},
{
url: "https://picsum.photos/1920/1080",
type: "image/jpeg",
width: 1920,
height: 1080,
}
...
]
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Trick Play Configuration

AttributeTypeRequiredDescriptionUpdatable
urlstringyesTrick play URL of the content.No
typestringyesMIME type of the content.No
widthnumbernoWidth of the content (not required for single trick play image)No
heightnumbernoHeight of the content (not required for single trick play image)No

Supported MIME types:

  • image/bif

const config = {
...
content: {
media: [
...
{
url: "https://example.com/pvw.bif",
type: "image/bif",
width: 640,
height: 360,
},
{
url: "https://example.com/pvw2.bif",
type: "image/bif",
width: 1920,
height: 1080,
}
...
]
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Type Configuration

AttributeTypeDescriptionUpdatable
type"vod" | "live"Type of the video content. This value will only be used for plugins that need to know the video type in advance.No
const config = {
...
content: {
type: "vod"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Lura Analytics Configuration

Lura Analytics configuration enables Lura Analytics at the top level of the player configuration. Lura Analytics is enabled only when enabled is true, host is a valid HTTPS URL, and apiKey is valid.

Lura Analytics payloads are sent every period seconds. When period is not specified, the player uses 10 seconds.

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanNoEnables or disables analytics collection and transmission.No
hoststringNoHTTPS analytics server endpoint. This value is provided by NXS.No
apiKeystringNoAPI key used to authenticate analytics requests.No
periodnumberNoSending period for the analytics payload in seconds. Defaults to 10.No
appobjectNoApplication metadata to include with analytics payloads.No
app.idstringNoUnique application identifier, such as a package name or bundle ID.No
app.namestringNoUser-facing application name.No
app.versionstringNoApplication version.No
sessionobjectNoSession metadata to include with analytics payloads.No
session.datastringNoAdditional session-specific data. Do not include sensitive data.No
session.userIdstringNoUser identifier associated with the session, such as a UUID when available.No
const config = {
...
analytics: {
enabled: true,
host: "https://player-analytics.mp.lura.live",
apiKey: "sample-api-key",
period: 20,
app: {
id: "sample-app-id",
name: "Sample App",
version: "1.0.0",
},
session: {
data: "sample-session-data",
userId: "sample-user-id",
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Latency Configuration

Latency configuration lets you restrict which latency modes the player is allowed to expose for the viewer. This is useful for entitlement or premium-user gating, where low latency playback should only be available to certain viewers.

When playback is resolved through Akta Cloud, the player forwards latency.allowedModes so that Akta Cloud only returns the low-latency media source when allowed.

info

latency.allowedModes controls what the player is allowed to return. initialization.video.latencyMode controls the requested initial runtime mode. They are related but independent: a requested "low" mode falls back to "def" when allowedModes prevents the low-latency source from being returned.

AttributeTypeRequiredDescriptionUpdatable
allowedModesobjectnoRestricts which latency modes may be exposed. When omitted, all available modes are exposed.No
allowedModes.lowbooleannoWhether low latency mode may be exposed. When false, the low-latency media source is not returned even if it is available. Default latency ("def") is always enabled.No
const config = {
...
latency: {
allowedModes: {
low: false
}
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Plugins

const config = {
...
plugins: {
...
PLUGIN_CONFIG_NAME: {
...
PLUGIN_PARAM : VALUE
...
}
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

PAL

info

To use PAL nonce, please use [LURA_PAL_NONCE] reserved macro in url's under the ads section.

allowStorageConsent is removed from player configuration.

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanNoEnable the plugin. Defaults to false.No
ppidstringNoPublisher provided identifier.No
descriptionUrlstringNoDescription URL of the content where ads will be played.No
skippablesSupportedbooleanNoSignals skippable ad support to PAL where supported.No
forceLimitedAdsbooleanNoForces limited ads mode when true. Keep false unless forcing limited ads is explicitly required.No
directedForChildOrUnknownAgebooleanNoMarks requests as child-directed or unknown-age when set.No
disableLimitedAdsStoragebooleanNoDisables limited-ads storage in PAL Google Ad Manager settings when true.No
disableFirstPartyIdentifiersbooleanNoDisables first-party identifiers in PAL Google Ad Manager settings when true.No
Example
const config = {
...
plugins: {
pal: {
enabled: true,
forceLimitedAds: false,
directedForChildOrUnknownAge: false,
disableLimitedAdsStorage: false,
disableFirstPartyIdentifiers: false,
ppid: "12DJD92J02KXVLS9D817DCJ078S8F1J2",
descriptionUrl: "https://docs4.lura.app/",
},
},
ads: {
...
clientSide:{
generic:{
breaks: [
{
url: "https://example.com?pal_nonce=[LURA_PAL_NONCE]"
}
]
}
}
...
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Conviva

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanYesEnable the plugin (Defaults to false if no value is given.)No
customerKeystringYesConviva customer key, it can be test or production key.No
gatewayUrlstringNoService URL of your conviva touchstone gateway. Don't fill this parameter in production.No
viewerIdstringNoViewer ID of the session, if you don't fill this parameter, it will be filled automatically.No
contentInfoObject<[key: string]: string>NoThe metadata to be sent to the conviva dashboard for current session.Yes
deviceMetadataObject<[key: string]: string>NoDevice metadata to be sent to the conviva for current session.No
const config = {
...
plugins: {
...
conviva: {
enabled: true,
customerKey: "CUSTOMER_KEY",
gatewayUrl: "https://test.conviva.com",
viewerId: "test-viewer",
contentInfo: {
...
key: "value",
...
},
deviceMetadata: {
...
key: "value",
...
},
},
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Nielsen

AttributeTypeRequiredDescription
enabledbooleanYesEnable the plugin (Defaults to false if no value is given.)
appIdstringYesUnique ID assigned to the player/site and configured by product provided by Nielsen
initializationObject<[key: string]: string>NoThe initialization parameters of the Nielsen SDK.
metadataObject<[key: string]: string>NoThe metadata to be sent to the Nielsen.
const config = {
...
plugins: {
...
nielsen: {
enabled: true,
appId: "APP_ID_PROVIDED_BY_NIELSEN",
initialization: {
...
key: "value",
...
},
metadata: {
...
key: "value",
...
}
},
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Adobe Media Analytics

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanNoEnable the plugin (Defaults to false if no value is given.)No
appIdstringYesApplication id used for configuration.No
griffonUrlstringNoURL needed for starting assurance and inspect collected data on assurance serverNo
marketingCloudIdstringYesMarketing Cloud ID for getting the visitor.No
publisherIdstringYesID of the publisher.No
trackingServerstringYesAppMeasurement tracking serverNo
mediaTrackingServerstringYesMedia collection server endpoint to which all the media tracking data is sentNo
channelstringYesChannel nameNo
userIdstringYesUser/Account ID to get app measurement instance.No
pageNamestringYesName of the page.No
playerNamestringNoName of the media player in use (defaults to Lura Player)No
debugLoggingbooleanNoA boolean to enable debug mode on adobe media analytics sdkNo
contentInfoobjectNoInformation related to contentNo
contentInfo.namestringYesName of the currently playing contentNo
contentInfo.idstringYesID of the currently playing contentNo
contentInfo.lengthnumberYesLength of the currently playing content in secondsNo
contentInfo.streamType"vod" | "live"YesType of the streamNo
contentInfo.mediaType"video" | "audio"YesType of the mediaNo
contextData{[key: string] : string}NoMetadata that will be passed to adobe media analyticsNo
const config = {
...
plugins: {
...
adobeMediaAnalytics?: {
enabled?: true;
// For mobile sdks
appId?: "APP_ID";
griffonUrl?: "GRIFFON_URL";
// For web sdk
marketingCloudId?: "MARKETING_CLOUD_ID";
publisherId?: "PUBLISHER_ID";
trackingServer?: "TRACKING_SERVER";
mediaTrackingServer?: "MEDIA_TRACKING_SERVER";
channel?: "CHANNEL";
userId?: "USER_ID";
pageName?: "PAGE_NAME";
playerName?: "PLAYER_NAME";
// For both
debugLogging?: false;
contentInfo?: {
name: "NAME";
id: "ID";
length: 0;
streamType: "STREAM_TYPE";
mediaType: "MEDIA_TYPE";
};
contextData: {
[key: string]: string;
};
};
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Comscore

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanYesEnable the plugin (Defaults to false if no value is given.)No
publisherIdstringYesProvide your Publisher ID value. The Publisher ID is often also referred to as the Client ID or c2 value.No
publisherSecretstringNoProvide a string with your Publisher Secret value.No
userHasConsentbooleanNoIf you are using a Consent Management Platform (CMP) which implements iAB Transparency and Consent Framework (TCF) version 2.0 then Comscore Publisher Tag integrates with the CMP to automatically collect user consent. No additional steps are necessary to enable this integration, however if you are not using a Consent Management Platform, you can manually ask user for consent and give here.No
appNamestringNoTitle of the page that your video is playing. (Defaults to HTML title tag.)No
autoUpdateMode"FOREGROUND_ONLY" | "FOREGROUND_AND_BACKGROUND" | "DISABLED"NoThis setting controls if the library will update application usage times at a regular interval. (Defaults to FOREGROUND_ONLY)No
autoUpdateIntervalnumberNoThe interval in seconds at which the library automatically updates usage times if the auto-update is enabled. (Defaults to 60, which is also the minimum value.)No
metadataObject<[key: string]: string>NoMetadata to be sent to comscore.Yes
const config = {
...
plugins: {
...
comscore: {
enabled: true,
publisherId: "PUBLISHER_ID_PROVIDED_BY_COMSCORE",
publisherSecret: "PUBLISHER_SECRET_PROVIDED_BY_COMSCORE",
userHasConsent: true,
appName: "Lura Player Included Application",
autoUpdateMode: "FOREGROUND_ONLY",
autoUpdateInterval: 60,
metadata: {
key: "value"
}
},
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Open Measurement

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanYesEnable the plugin (Defaults to false if no value is given.)No
const config = {
...
plugins: {
...
openMeasurement: {
enabled: true,
},
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Oracle Moat

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanNoEnable the plugin (Defaults to false if no value is given.)No
partnerCodestringNoPartner codeNo
const config = {
...
plugins: {
...
moat: {
enabled: true,
partnerCode: "samplepartnercode123"
}
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Initialization Configuration

The initialization configuration allows you to set initial values when the player is starting, such as video bitrate, latency mode, audio language, and caption language preferences.

Video Configuration

AttributeTypeRequiredDescriptionUpdatable
preferredBitratenumberNoInitial preferred bitrate for video playback in bits per second (e.g., 1000000 for 1 Mbps). On platforms that support bitrate selection, player selects stream variant closest to this value.No
abrEnabledbooleanNoEnable or disable adaptive bitrate streaming. When false, player attempts to maintain preferredBitrate. Only works on platforms that support disabling ABR. (Defaults to true)No
latencyModeLatencyModeNoPreferred latency mode on initialization. Supported values are def and low. Only applies on platforms and streams that support latency mode selection.No

Unsupported Devices for Initial Video Configuration

Platform / DeviceBrowser / SDKSupported?Notes
macOSSafariNoSafari HLS player does not support preferred bitrate and abr disabling
iOSSafariNoSafari HLS player does not support preferred bitrate and abr disabling
iOSNative SDKNoSwift SDKs do not support abr disabling and preferred bitrate
tvOSNative SDKNoSwift SDKs do not support abr disabling and preferred bitrate
RokuAllNoRoku player does not support preferred bitrate and abr disabling
const config = {
...
initialization: {
video: {
// iOS Browsers and macOS Safari do not support initial video configuration.
preferredBitrate: 1000000, // 1 Mbps
abrEnabled: true,
latencyMode: "def"
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Caption Configuration

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanNoEnable or disable caption at initialization. When true, captions in preferredLanguage are displayed if available. (Defaults to false)No
preferredLanguagestringNoISO 639-1 language code for preferred caption language (e.g., "en" for English). Player selects caption track matching this code if available.No
sourceArray<"manifest" | "sidecar" | "embedded">NoCaption sources to use on initialization. Defaults to ["manifest", "embedded"]. Use sidecar to include captions configured outside the media manifest. Web only.No
const config = {
...
initialization: {
caption: {
enabled: true,
preferredLanguage: "en",
source: ["manifest", "embedded"]
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Audio Configuration

AttributeTypeRequiredDescriptionUpdatable
preferredLanguagestringNoISO 639-1 language code for preferred audio language (e.g., "en" for English). Player selects audio track matching this code if available.No
const config = {
...
initialization: {
audio: {
preferredLanguage: "en"
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Teasers Configuration

The teasers configuration allows you to enable the teaser feature from Akta MCP.

AttributeTypeRequiredDescriptionUpdatable
enabledbooleanNoEnable the teaser (Defaults to false if no value is given.)Yes
const config = {
...
teasers: {
enabled: true
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);

Debug Configuration

AttributeTypeRequiredDescriptionUpdatable
debugbooleanNoEnable the debug mode (Defaults to false if no value is given.)No
const config = {
...
debug: true,
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);