Lura Configuration
| Attribute | Type | Description | Updatable |
|---|
| appKey | string | AppKey generated in MCP based on the pre-adjusted play configuration | No |
| assetId | string | AssetId of the VOD or the Live Stream | No |
| token | string | (Optional) When specified the provided token will be used in entitlements requests. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
lura: {
appKey: "<YOUR_APP_KEY>",
assetId: "<ASSET_ID>",
token: "<OPTIONAL_TOKEN>"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
lura = Lura(
appKey = "<YOUR_APP_KEY>",
assetId = "<ASSET_ID>"
)
)
val config = LuraConfiguration(
lura = Lura(
token = "<OPTIONAL_TOKEN>"
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
lura: .init(
appKey: "<YOUR_APP_KEY>",
assetId: "<ASSET_ID>",
token: "<OPTIONAL_TOKEN>"
)
)
player?.setConfig(config)
config = {
lura: {
appKey: "<YOUR_APP_KEY>"
assetId: "<ASSET_ID>"
token: "<OPTIONAL_TOKEN>"
}
}
player.callFunc("setConfig", config)
Controls Configuration
| Attribute | Type | Description | Updatable |
|---|
| enabled | boolean | Enable 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 |
| autoplay | boolean | Autoplay attribute of the player. Defaults to false | No |
| muted | boolean | Whether to start muted when the player autoplays. Defaults to false. | No |
| volume | number | Initial volume of the player between 0.0 and 1.0. Defaults to 1.0 | No |
| loop | boolean | Whether the video should play in a loop. Defaults to false | No |
| sharing | object | In-video sharing configuration. | Yes |
| sharing.url | string | URL to create the sharing link. | Yes |
| sharing.description | string | Description for social sharing. | Yes |
| sharing.posterUrl | string | Poster URL for social sharing. | Yes |
| sharing.socials | ("facebook" | "whatsapp" | "x" | "pinterest" | "reddit" | "tumblr")[] | Social sharing platforms to enable. | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
controls = LuraControlsConfiguration(
enabled = true,
layout = "default",
autoplay = true,
muted = true,
volume = 1.0,
loop = false,
mediaSession = LuraMediaSessionConfiguration(),
sharing = LuraControlsSharingConfiguration(
url = "https://example.com/watch/asset-id",
description = "Example video description",
posterUrl = "https://example.com/poster.jpg",
socials = listOf(
LuraControlsSharingSocial.FACEBOOK,
LuraControlsSharingSocial.WHATSAPP,
LuraControlsSharingSocial.X,
LuraControlsSharingSocial.PINTEREST,
LuraControlsSharingSocial.REDDIT,
LuraControlsSharingSocial.TUMBLR
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
controls: .init(
enabled: true,
autoplay: true,
muted: true,
volume: 1.0,
layout: "default",
loop: false,
sharing: .init(
url: "https://example.com/watch/asset-id",
description: "Example video description",
posterUrl: "https://example.com/poster.jpg",
socials: [.facebook, .whatsapp, .x, .pinterest, .reddit, .tumblr]
)
)
)
player?.setConfig(config)
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"]
}
}
}
player.callFunc("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.
| Attribute | Type | Description | Updatable |
|---|
| policy | object | Configurations of the ad policy | No |
| 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.cooldown | number | Snapback cooldown duration in seconds after an ad break completes. Set to 0 to disable the cooldown. | No |
| policy.pauseAdCooldown | number | Cooldown duration in seconds between non linear pause ad displays. Set to 0 to disable the cooldown. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
ads: {
policy: {
skipMode: "ad",
cooldown: 300,
pauseAdCooldown: 300
}
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
ads = LuraAdsConfiguration(
policy = LuraAdsPolicyConfiguration(
skipMode = LuraAdsSkipMode.AD,
cooldown = 300,
pauseAdCooldown = 300
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
ads: .init(
policy: .init(
skipMode: .ad,
cooldown: 300,
pauseAdCooldown: 300
)
)
)
player?.setConfig(config)
config = {
ads: {
policy: {
skipMode: "ad"
cooldown: 300
pauseAdCooldown: 300
}
}
}
player.callFunc("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]¯o2=[MACRO2]";
After specifying the macros, in your URLs, you can specify them using macros attribute.
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
ads = LuraAdsConfiguration(
macros = mapOf(
"USER_ID" to "1234567890",
"SESSION_ID" to "078a54ef-c45e-4356-b556-a99fdab158c1"
),
clientSide = LuraClientSideConfiguration(
provider = "generic",
generic = LuraGenericConfiguration(
breaks = listOf(
LuraGenericBreak(url = "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]"),
LuraGenericBreak(url = "https://example.com/adtag?pal_nonce=[LURA_PAL_NONCE]&correlator=[LURA_CORRELATOR]")
)
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
ads: .init(
macros: [
"USER_ID": "1234567890",
"SESSION_ID": "078a54ef-c45e-4356-b556-a99fdab158c1"
],
clientSide: .init(
provider: "generic",
generic: .init(
breaks: [
.init(url: "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]"),
.init(url: "https://example.com/adtag?pal_nonce=[LURA_PAL_NONCE]&correlator=[LURA_CORRELATOR]")
]
)
)
)
)
player?.setConfig(config)
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]"}
]
}
}
}
}
player.callFunc("setConfig", config)
Custom Macros
| Attribute | Type | Description | Updatable |
|---|
| macros | Object<key: string, string> | Your macros in key value pair as string. | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
ads = LuraAdsConfiguration(
macros = mapOf(
"USER_ID" to "1234567890",
"SESSION_ID" to "078a54ef-c45e-4356-b556-a99fdab158c1"
),
clientSide = LuraClientSideConfiguration(
provider = "generic",
generic = LuraGenericConfiguration(
breaks = listOf(
LuraGenericBreak(url = "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]"),
LuraGenericBreak(url = "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]"),
)
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
ads: .init(
macros: [
"USER_ID": "1234567890",
"SESSION_ID": "078a54ef-c45e-4356-b556-a99fdab158c1"
],
clientSide: .init(
provider: "generic",
generic: .init(
breaks: [
.init(url: "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]"),
.init(url: "https://example.com/adtag?userid=[USER_ID]&session_id=[SESSION_ID]")
]
)
)
)
)
player?.setConfig(config)
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]"}
]
}
}
}
}
player.callFunc("setConfig", config)
Reserved Macros
| Attribute | Description | Updatable |
|---|
| LURA_PAL_NONCE | Nonce generated by PAL SDK if PAL Plugin is configured and enabled | No |
| LURA_CORRELATOR | Randomly generated string | No |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
ads = LuraAdsConfiguration(
clientSide = LuraClientSideConfiguration(
provider = "generic",
generic = LuraGenericConfiguration(
breaks = listOf(
LuraGenericBreak(url = "https://example.com/adtag?pal_nonce=[LURA_PAL_NONCE]&correlator=[LURA_CORRELATOR]"),
)
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
ads: .init(
clientSide: .init(
provider: "generic",
generic: .init(
breaks: [
.init(url: "https://example.com/adtag?pal_nonce=[LURA_PAL_NONCE]&correlator=[LURA_CORRELATOR]")
]
)
)
)
)
player?.setConfig(config)
config = {
ads: {
clientSide: {
provider: "generic"
generic: {
breaks: [
{ url: "https://example.com/adtag?pal_nonce=[LURA_PAL_NONCE]&correlator=[LURA_CORRELATOR]"}
]
}
}
}
}
player.callFunc("setConfig", config)
Serverside Ads
| Attribute | Type | Description | Updatable |
|---|
| provider | string | Serverside ad provider. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
lura = Lura(
appKey = "<APP_KEY_WITH_SSAI_ENABLED>",
assetId = "<ASSET_ID_YOU_WANT_TO_PLAY>"
),
ads = LuraAdsConfiguration(
serverSide = LuraServerSideConfiguration(
provider = "lura"
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
lura: .init(
appKey: "<APP_KEY_WITH_SSAI_ENABLED>",
assetId: "<ASSET_ID_YOU_WANT_TO_PLAY>"
),
ads: .init(
serverSide: .init(
provider: "lura"
)
)
)
player?.setConfig(config)
config = {
lura: {
appKey: "<APP_KEY_WITH_SSAI_ENABLED>"
assetId: "<ASSET_ID_YOU_WANT_TO_PLAY>"
}
ads: {
serverSide: {
provider: "lura"
}
}
}
player.callFunc("setConfig", config)
Clientside Ads
| Attribute | Type | Description | Updatable |
|---|
| provider | "generic" | "gam" | "freewheel" | Provider of your client side ad | No |
| generic | Object | LuraPlayer Ad Manager managed ads configuration | No |
| gam | Object | IMA SDK managed ads configuration | No |
| freewheel | Object | FreeWheel managed ads configuration | No |
Generic Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| breaks | Array<{url: string, offset?: string | number}> | yes | Ad breaks information | No |
| breaks[i].url | string | yes | URL of the VAST or VMAP Ad Tag | No |
| breaks[i].offset | string | number | only if vast url is provided | Offset 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 |
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.
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
ads: {
clientSide: {
provider: "generic",
generic: {
breaks: [
{
offset: "preroll",
url: "https://example.com/your_vast_url"
},
{
offset: "50%",
url: "https://example.com/your_vast_url"
},
{
offset: "00:01:10.000",
url: "https://example.com/your_vast_url"
},
{
offset: 125,
url: "https://example.com/your_vast_url"
},
{
url: "https://example.com/your_vmap_url"
},
{
url: "https://example.com/your_vast_url"
}
],
}
}
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
ads = LuraAdsConfiguration(
clientSide = LuraClientSideConfiguration(
provider = "generic",
generic = LuraGenericConfiguration(
breaks = listOf(
LuraGenericBreak(
offset = "preroll",
url = "https://example.com/your_vast_url"
),
LuraGenericBreak(
offset = "50%",
url = "https://example.com/your_vast_url"
),
LuraGenericBreak(
offset = "00:01:10.000",
url = "https://example.com/your_vast_url"
),
LuraGenericBreak(
offset = "125",
url = "https://example.com/your_vast_url"
),
LuraGenericBreak(
url = "https://example.com/your_vmap_url"
),
LuraGenericBreak(
url = "https://example.com/your_vast_url"
),
)
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
ads: .init(
clientSide: .init(
provider: "generic",
generic: .init(
breaks: [
.init(offset: "preroll", url: "https://example.com/your_vast_url"),
.init(offset: "50%", url: "https://example.com/your_vast_url"),
.init(offset: "00:01:10.000", url: "https://example.com/your_vast_url"),
.init(offset: "125", url: "https://example.com/your_vast_url"),
.init(url: "https://example.com/your_vmap_url"),
.init(url: "https://example.com/your_vast_url")
]
)
)
)
)
player?.setConfig(config)
config = {
ads: {
clientSide: {
provider: "generic"
generic: {
breaks: [
{
offset: "preroll"
url: "https://example.com/your_vast_url"
}
{
offset: "50%"
url: "https://example.com/your_vast_url"
}
{
offset: "00:01:10.000"
url: "https://example.com/your_vast_url"
}
{
offset: 125
url: "https://example.com/your_vast_url"
}
{ url: "https://example.com/your_vmap_url"}
{ url: "https://example.com/your_vast_url"}
]
}
}
}
}
player.callFunc("setConfig", config)
GAM Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | Yes | Enable the plugin (Defaults to false if no value is given.) | No |
| adTagUrl | string | No | Ad Tag URL of the advertisement. (VAST, VPAID, VMAP, SIMID) | No |
| liveStreamPrefetchSeconds | number | No | Inform IMA about when the ad should start loading before the ad shows in live streams. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
ads = LuraAdsConfiguration(
clientSide = LuraClientSideConfiguration(
provider = "gam",
gam = LuraGamConfiguration(
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]"
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
ads: .init(
clientSide: .init(
provider: "gam",
gam: .init(
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]"
)
)
)
)
player?.setConfig(config)
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]"
}
}
}
}
player.callFunc("setConfig", config)
FreeWheel Configuration
| Attribute | Type | Description | Updatable |
|---|
| enabled | boolean | Enable the plugin (Defaults to false if no value is given.) | No |
| networkId | string | Network Id | No |
| serverUrl | string | Server Url | No |
| profileId | string | Profile Id | No |
| siteSectionId | string | Site Section Id | No |
| videoAssetId | string | Video Asset Id | No |
| adSlots | Array | Positions for the ad slots | No |
| adSlots.customId | string | Custom id for the ad slots | No |
| adSlots.adUnit | "preroll" | "midroll" | "postroll" | Ad unit for the ad slots | No |
| adSlots.timePosition | number | Time position for the ad slots | No |
| adSlots.slotProfile | string | Slot profile for the ad slots | No |
| adSlots.cuepointSequence | number | Cuepoint sequence for the ad slots | No |
| adSlots.maxDuration | number | Max duration for the ad slots | No |
| adSlots.minDuration | number | Min duration for the ad slots | No |
| adSlots.acceptContentType | string | Accept content type for the ad slots | No |
| adSlots.signalId | string | Signal id for the ad slots | No |
| adSlots.maxAds | number | Max ads for the ad slots | No |
| keyValueMap | {[key: string]: string} | Key value map to be passed to the Freewheel SDK | No |
| parameters | Array<{name: string, value: any, level: any}> | Parameters to be passed to the Freewheel SDK | No |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
FreeWheel Configuration
val config = LuraConfiguration(
ads = LuraAdsConfiguration(
clientSide = LuraClientSideConfiguration(
provider = "freewheel",
freewheel = LuraFreewheelConfiguration(
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"
)
)
)
)
player?.setConfig(config)
Not supported on iOS SDK.
FreeWheel Configuration
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 }
]
}
}
}
}
player.callFunc("setConfig", config)
Non Linear Ads
Pause Ads
| Attribute | Type | Description | Updatable |
|---|
| provider | "generic" | Provider of your client non linear ad | No |
| generic | Object | LuraPlayer Ad Manager managed non linear ads configuration | No |
| generic.url | string | URL for VAST tag that includes non linear ads | No |
| generic.xPosition | "left" | "center" | "right" | Horizontal display box position of the non linear ads | No |
| generic.yPosition | "top" | "center" | "bottom" | Vertical display box position of the non linear ads | No |
| generic.backgroundOpacity | number | Background opacity of RGB(1,1,1) background when the ad is displayed | No |
| generic.slideAnimation | Object | Configuration object for the transition animation for the non linear ad | No |
| generic.slideAnimation.enabled | boolean | Whether the slide animation is enabled or not | No |
| generic.slideAnimation.direction | "left" | "right" | "up" | "down" | Direction for the slide animation | No |
| generic.slideAnimation.duration | number | Duration for the slide animation (in seconds) | No |
| generic.padding | Object | Configuration object for the padding for the non linear ad display area | No |
| generic.padding.top | string | Top padding in acceptable units | No |
| generic.padding.bottom | string | Bottom padding in acceptable units | No |
| generic.padding.left | string | Left padding in acceptable units | No |
| generic.padding.right | string | Right padding in acceptable units | No |
- Javascript
- Kotlin
- Swift
- Brightscript
- C#
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);
val config = LuraConfiguration(
ads = LuraAdsConfiguration(
nonLinear = LuraNonLinearConfiguration(
pause = NonLinearPauseConfiguration(
provider = "generic",
generic = NonLinearPauseGenericConfiguration(
url = "VAST_AD_TAG_URL_WITH_NON_LINEAR_ADS",
xPosition = LuraXPosition.Right,
yPosition = LuraYPosition.Center,
backgroundOpacity = 0.6f,
slideAnimation = NonLinearSlideAnimationConfiguration(
enabled = true,
direction = LuraSlideDirections.Left,
duration = 0.6
),
padding = NonLinearPaddingConfiguration(
right = "5%"
)
)
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
ads: .init(
nonLinear: .init(
pause: .init(
provider: "generic",
generic: .init(
url: "VAST_AD_TAG_URL_WITH_NON_LINEAR_ADS",
xPosition: .Right,
yPosition: .Center,
backgroundOpacity: 0.6,
slideAnimation: .init(
enabled: true,
direction: .Left,
duration: 0.6
),
padding: .init(
right: "5%"
)
)
)
)
)
)
player?.setConfig(config)
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%"
}
}
}
}
}
}
player.callFunc("setConfig", config)
var config = new Configuration
{
Ads = new AdsConfiguration
{
NonLinear = new NonLinearConfiguration
{
Pause = new NonLinearPauseConfiguration
{
Provider = "generic",
Generic = new NonLinearPauseGenericConfiguration
{
Url = "VAST_AD_TAG_URL_WITH_NON_LINEAR_ADS",
XPosition = "right",
YPosition = "center",
BackgroundOpacity = 0.6,
SlideAnimation = new NonLinearSlideAnimationConfiguration
{
Enabled = true,
Direction = "left",
Duration = 0.6
},
Padding = new NonLinearPaddingConfiguration
{
Right = "5%"
}
}
}
}
}
};
player.SetConfig(config);
Cast Configuration
Airplay Configuration
| Attribute | Type | Optional | Description | Updatable |
|---|
| enabled | boolean | true | Whether casting is enabled in available devices. (Defaults to false) | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
cast: {
airplay: {
enabled: true
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
Not supported on Android SDK.
let config = LuraPlayerConfiguration(
cast: .init(
airplay: .init(
enabled: true
)
)
)
player?.setConfig(config)
config = {
cast: {
airplay: {
enabled: true
}
}
}
player.callFunc("setConfig", config)
Chromecast Configuration
| Attribute | Type | Optional | Description | Updatable |
|---|
| enabled | boolean | true | Whether casting is enabled in available devices. (Defaults to false) | Yes |
| appId | string | false | Chromecast receiver application ID. | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
cast: {
chromecast: {
enabled: true,
appId: "12345678"
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
cast = LuraCastConfiguration(
chromecast = LuraChromecastConfiguration(
enabled = true,
appId = "12345678"
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
cast: .init(
chromecast: .init(
enabled: true,
appId: "12345678"
)
)
)
player?.setConfig(config)
config = {
cast: {
chromecast: {
enabled: true
appId: "12345678"
}
}
}
player.callFunc("setConfig", config)
Name Configuration
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
name: "lorem-ipsum-dolor-sit-amet",
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
name = "lorem-ipsum-dolor-sit-amet"
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
name: "lorem-ipsum-dolor-sit-amet"
)
player?.setConfig(config)
config = {
name: "lorem-ipsum-dolor-sit-amet"
}
player.callFunc("setConfig", config)
Concurrency Configuration
Concurrency configuration lets the player include session identity and limit information for playback concurrency checks. This feature requires Akta Cloud.
| Attribute | Type | Description | Updatable |
|---|
| enabled | boolean | Whether concurrency handling is enabled. | No |
| accountId | string | Account identifier used for concurrency checks. | No |
| deviceId | string | Device identifier used for concurrency checks. | No |
| max | number | Maximum number of allowed concurrent playback sessions. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
- C#
const config = {
...
concurrency: {
enabled: true,
accountId: "<ACCOUNT_ID>",
deviceId: "<DEVICE_ID>",
max: 2
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
concurrency = LuraConcurrencyConfiguration(
enabled = true,
accountId = "<ACCOUNT_ID>",
deviceId = "<DEVICE_ID>",
max = 2
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
concurrency: .init(
enabled: true,
accountId: "<ACCOUNT_ID>",
deviceId: "<DEVICE_ID>",
max: 2
)
)
player?.setConfig(config)
config = {
concurrency: {
enabled: true
accountId: "<ACCOUNT_ID>"
deviceId: "<DEVICE_ID>"
max: 2
}
}
player.callFunc("setConfig", config)
var config = new Configuration
{
Concurrency = new ConcurrencyConfiguration
{
Enabled = true,
AccountId = "<ACCOUNT_ID>",
DeviceId = "<DEVICE_ID>",
Max = 2
}
};
await player.SetConfig(config);
Content Configuration
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
| Attribute | Type | Description | Updatable |
|---|
| title | string | Title of the content. | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
title: "Title of the video"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
title = "Title of the video"
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
title: "Title of the video"
)
)
player?.setConfig(config)
config = {
content: {
title: "Title of the video"
}
}
player.callFunc("setConfig", config)
Description Configuration
| Attribute | Type | Description | Updatable |
|---|
| description | string | Description of the content. | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
description: "Lorem ipsum dolor sit amet, consectetur adespiscing elit"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
description = "Lorem ipsum dolor sit amet, consectetur adespiscing elit"
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
description: "Lorem ipsum dolor sit amet, consectetur adespiscing elit"
)
)
player?.setConfig(config)
config = {
content: {
description: "Lorem ipsum dolor sit amet, consectetur adespiscing elit"
}
}
player.callFunc("setConfig", config)
Language Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| language | string | no | Language of the content in ISO 639-1 format | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
language: "en"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
language = "en"
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
language: "en"
)
)
player?.setConfig(config)
config = {
content: {
language: "en"
}
}
player.callFunc("setConfig", config)
Start At Configuration
| Attribute | Type | Description | Updatable |
|---|
| startAt | number | VOD: 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 |
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.
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
startAt: 30,
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
startAt = 30.0,
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
startAt: 30,
),
)
player?.setConfig(config)
config = {
content: {
startAt: 30
}
}
player.callFunc("setConfig", config)
DVR (live)
Initial position as a UNIX timestamp in seconds (replace the value with a time inside your stream’s DVR window).
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
dvr: {
enabled: true,
mode: "event",
},
startAt: 1710528000,
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
dvr = LuraDVR(
enabled = true,
mode = LuraDVR.LuraDVRMode.EVENT,
),
startAt = 1710528000.0,
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
startAt: 1710528000,
dvr: .init(
enabled: true,
mode: .event,
),
),
)
player?.setConfig(config)
config = {
content: {
dvr: {
enabled: true
mode: "event"
}
startAt: 1710528000
}
}
player.callFunc("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.
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:
Restart TV does not require a separate play configuration. Restart TV is fully compatible only with server-side ads stitched by Akta.
| Attribute | Type | Description | Updatable |
|---|
| enabled | boolean | When 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 |
| availabilityWindow | number | Duration of the DVR window in seconds. Used when mode is "window". | No |
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.
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
dvr: {
enabled: true,
mode: "window",
availabilityWindow: 7200,
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
dvr = LuraDVR(
enabled = true,
mode = LuraDVR.LuraDVRMode.WINDOW,
availabilityWindow = 7200.0,
),
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
dvr: .init(
enabled: true,
mode: .window,
availabilityWindow: 7200,
),
),
)
player?.setConfig(config)
config = {
content: {
dvr: {
enabled: true
mode: "window"
availabilityWindow: 7200
}
}
}
player.callFunc("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.
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
dvr: {
enabled: true,
mode: "event",
},
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
dvr = LuraDVR(
enabled = true,
mode = LuraDVR.LuraDVRMode.EVENT,
),
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
dvr: .init(
enabled: true,
mode: .event,
),
),
)
player?.setConfig(config)
config = {
content: {
dvr: {
enabled: true
mode: "event"
}
}
}
player.callFunc("setConfig", config)
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.
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.
| Attribute | Type | Required | Description | Updatable |
|---|
| url | string | yes | Content URL of the low-latency source. | No |
| type | string | yes | MIME 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 |
| licenseUrl | string | no | License URL of the content. Only required for DRM-protected low-latency sources. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
- C#
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);
val config = LuraConfiguration(
content = LuraContent(
media = listOf(
LuraMedia(url = "https://example.com/default.m3u8", type = "application/x-mpegURL")
),
lowLatencyMedia = listOf(
LuraMedia(url = "https://example.com/low-latency.m3u8", type = "application/x-mpegURL")
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
media: [
.init(url: "https://example.com/default.m3u8", type: "application/x-mpegURL")
],
lowLatencyMedia: [
.init(url: "https://example.com/low-latency.m3u8", type: "application/x-mpegURL")
]
)
)
player?.setConfig(config)
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"
}
]
}
}
player.callFunc("setConfig", config)
var config = new Configuration
{
Content = new ContentConfiguration
{
Media = new List<ContentMedia>
{
new ContentMedia
{
Url = "https://example.com/default.m3u8",
Type = MediaMimeType.VideoHls
}
},
LowLatencyMedia = new List<ContentMedia>
{
new ContentMedia
{
Url = "https://example.com/low-latency.m3u8",
Type = MediaMimeType.VideoHls
}
}
}
};
await player.SetConfig(config);
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
| Attribute | Type | Required | Description |
|---|
| start | number | yes | Start time in seconds |
| end | number | yes | End time in seconds |
| type | string | yes | Type of the annotation |
| label | string | no | Label of the annotation |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
...
annotations: [
...
{
start: 0,
end: 10,
type: "intro"
}
...
],
...
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
annotations = listOf(
LuraAnnotation(
start = 0.0,
end = 10.0,
type = "intro"
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
annotations: [
.init(
start: 0,
end: 10,
type: "intro"
)
]
)
)
player?.setConfig(config)
config = {
content: {
annotations: [
{
start: 0
end: 10
type: "intro"
}
]
}
}
player.callFunc("setConfig", config)
| Attribute | Type | Required | Description | Updatable |
|---|
| url | string | yes | Content URL | No |
| type | string | yes | MIME type of the content | No |
| licenseUrl | string | no | License 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
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
content = LuraContent(
media = listOf(
LuraMedia(
url = "https://media.example.com/hls.m3u8",
type = "application/x-mpegURL",
licenseUrl = "https://license.example.com"
),
LuraMedia(
url = "https://media.example.com/dash.mpd",
type = "application/dash+xml",
licenseUrl = "https://license.example.com"
),
LuraMedia(
url = "https://media.example.com/mp4.mp4",
type = "video/mp4",
licenseUrl = "https://license.example.com"
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
media: [
.init(
url: "https://media.example.com/hls.m3u8",
type: "application/x-mpegURL",
licenseUrl: "https://license.example.com"
),
.init(
url: "https://media.example.com/dash.mpd",
type: "application/dash+xml",
licenseUrl: "https://license.example.com"
),
.init(
url: "https://media.example.com/mp4.mp4",
type: "video/mp4",
licenseUrl: "https://license.example.com"
)
]
)
)
player?.setConfig(config)
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"
}
]
}
}
player.callFunc("setConfig", config)
DRM Configuration
Widevine and Playready
| Attribute | Type | Required | Description | Updatable |
|---|
| licenseUrl | string | yes | License URL of the content. | No |
- Javascript
- Kotlin
- Brightscript
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);
Widevine
val config = LuraConfiguration(
content = LuraContent(
media = listOf(
LuraMedia(
url = "https://media.example.com/dash.mpd",
type = "application/dash+xml",
licenseUrl = "https://license.example.com"
)
)
)
)
player?.setConfig(config)
Widevine and Playready
config = {
content: {
media: [
{
url: "YOUR_PROTECTED_MEDIA"
type: "application/dash+xml"
licenseUrl: "YOUR_DRM_LICENSE_SERVER_URL"
}
]
}
}
player.callFunc("setConfig", config)
FairPlay
In media item:
| Attribute | Type | Required | Description | Updatable |
|---|
| licenseUrl | string | yes | License URL of the content. | No |
In clientCertificates:
| Attribute | Type | Description | Updatable |
|---|
| data | string | FairPlay certificate data. | No |
| url | string | URL to download the FairPlay certificate data by GET request. | No |
- Javascript
- Swift
- Brightscript
FairPlay
const config = {
...
content: {
media: [
...
{
url: "YOUR_PROTECTED_MEDIA",
type: "application/x-mpegURL",
licenseUrl: "YOUR_DRM_LICENSE_SERVER_URL"
}
...
],
clientCertificates: {
fairplay: {
data: "YOUR_FAIRPLAY_CERTIFICATE_DATA",
url: "https://example.com/path/to/certificate/data"
}
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
FairPlay
let config = LuraPlayerConfiguration(
content: .init(
media: [
.init(
url: "YOUR_PROTECTED_MEDIA",
type: "application/x-mpegURL",
licenseUrl: "YOUR_DRM_LICENSE_SERVER_URL"
)
],
clientCertificates: .init(
fairplay: .init(
data: "YOUR_FAIRPLAY_CERTIFICATE_DATA",
url: URL(string: "https://example.com/path/to/certificate/data")
)
)
)
)
player?.setConfig(config)
FairPlay
config = {
content: {
media: [
{
url: "YOUR_PROTECTED_MEDIA"
type: "application/x-mpegURL"
licenseUrl: "YOUR_DRM_LICENSE_SERVER_URL"
}
]
clientCertificates: {
fairplay: {
data: "YOUR_FAIRPLAY_CERTIFICATE_DATA"
url: "https://example.com/path/to/certificate/data"
}
}
}
}
player.callFunc("setConfig", config)
Preferred DRM Systems
| Attribute | Type | Description | Updatable |
|---|
| preferredDRMSystems | Array<"widevine" | "fairplay" | "playready"> | Preferred DRM Systems. | No |
Sidecar Caption Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| url | string | yes | URL of the caption that will be loaded | No |
| type | string | yes | MIME type of the caption | No |
| language | string | yes | Language of the caption in ISO 639-1 format | No |
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);
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"
}
]
}
}
player.callFunc("setConfig", config)
Captions Display Configuration
Use content.captions.enabled to disable captions for the content.
| Attribute | Type | Description | Updatable |
|---|
| enabled | boolean | Disables captions when set to false. | No |
- Javascript
- Kotlin
- Swift
- C#
- Brightscript
const config = {
...
content: {
captions: {
enabled: false
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
captions = LuraCaptions(
enabled = false
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
captions: .init(
enabled: false
)
)
)
player?.setConfig(config)
var config = new Configuration
{
Content = new ContentConfiguration
{
Captions = new ContentCaptionsConfiguration
{
Enabled = false
}
}
};
await player.SetConfig(config);
config = {
content: {
captions: {
enabled: false
}
}
}
player.callFunc("setConfig", config)
Poster Image Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| url | string | yes | Poster URL of the content. | No |
| type | string | yes | MIME type of the content. | No |
| width | number | no | Width of the content (not required for single poster image) | No |
| height | number | no | Height of the content (not required for single poster image) | No |
Supported MIME types:
- image/jpg
- image/jpeg
- image/webp
- image/apng
- image/avif
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
content = LuraContent(
media = listOf(
LuraMedia(
url = "https://picsum.photos/640/360",
type = "image/jpeg",
width = 640,
height = 360
),
LuraMedia(
url = "https://picsum.photos/1920/1080",
type = "image/jpeg",
width = 1920,
height = 1080
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
media: [
.init(
url: "https://picsum.photos/640/360",
type: "image/jpeg",
width: .int(640),
height: .int(360)
),
.init(
url: "https://picsum.photos/1920/1080",
type: "image/jpeg",
width: .int(1920),
height: .int(1080)
)
]
)
)
player?.setConfig(config)
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
}
]
}
}
player.callFunc("setConfig", config)
Trick Play Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| url | string | yes | Trick play URL of the content. | No |
| type | string | yes | MIME type of the content. | No |
| width | number | no | Width of the content (not required for single trick play image) | No |
| height | number | no | Height of the content (not required for single trick play image) | No |
Supported MIME types:
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
content = LuraContent(
media = listOf(
LuraMedia(
url = "https://example.com/pvw.bif",
type = "image/bif",
width = 640,
height = 360
),
LuraMedia(
url = "https://example.com/pvw2.bif",
type = "image/bif",
width = 1920,
height = 1080
)
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
media: [
.init(
url: "https://example.com/pvw.bif",
type: "image/bif",
width: .int(640),
height: .int(360)
),
.init(
url: "https://example.com/pvw2.bif",
type: "image/bif",
width: .int(1920),
height: .int(1080)
)
]
)
)
player?.setConfig(config)
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
}
]
}
}
player.callFunc("setConfig", config)
Type Configuration
| Attribute | Type | Description | Updatable |
|---|
| 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 |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
content: {
type: "vod"
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
content = LuraContent(
type = LuraVideoType.VOD
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
content: .init(
type: "vod"
)
)
player?.setConfig(config)
config = {
content: {
type: "vod"
}
}
player.callFunc("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.
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | No | Enables or disables analytics collection and transmission. | No |
| host | string | No | HTTPS analytics server endpoint. This value is provided by NXS. | No |
| apiKey | string | No | API key used to authenticate analytics requests. | No |
| period | number | No | Sending period for the analytics payload in seconds. Defaults to 10. | No |
| app | object | No | Application metadata to include with analytics payloads. | No |
| app.id | string | No | Unique application identifier, such as a package name or bundle ID. | No |
| app.name | string | No | User-facing application name. | No |
| app.version | string | No | Application version. | No |
| session | object | No | Session metadata to include with analytics payloads. | No |
| session.data | string | No | Additional session-specific data. Do not include sensitive data. | No |
| session.userId | string | No | User identifier associated with the session, such as a UUID when available. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
- C#
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);
val config = LuraConfiguration(
analytics = LuraAnalyticsConfiguration(
enabled = true,
host = "https://player-analytics.mp.lura.live",
apiKey = "sample-api-key",
period = 20,
app = LuraAnalyticsAppConfiguration(
id = "sample-app-id",
name = "Sample App",
version = "1.0.0"
),
session = LuraAnalyticsSessionConfiguration(
data = "sample-session-data",
userId = "sample-user-id"
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
analytics: .init(
enabled: true,
host: "https://player-analytics.mp.lura.live",
apiKey: "sample-api-key",
period: 20,
app: .init(
id: "sample-app-id",
name: "Sample App",
version: "1.0.0"
),
session: .init(
data: "sample-session-data",
userId: "sample-user-id"
)
)
)
player?.setConfig(config)
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"
}
}
}
player.callFunc("setConfig", config)
var config = new Configuration
{
Analytics = new AnalyticsConfiguration
{
Enabled = true,
Host = "https://player-analytics.mp.lura.live",
ApiKey = "sample-api-key",
Period = 20,
App = new AnalyticsAppConfiguration
{
Id = "sample-app-id",
Name = "Sample App",
Version = "1.0.0"
},
Session = new AnalyticsSessionConfiguration
{
Data = "sample-session-data",
UserId = "sample-user-id"
}
}
};
await 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.
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.
| Attribute | Type | Required | Description | Updatable |
|---|
| allowedModes | object | no | Restricts which latency modes may be exposed. When omitted, all available modes are exposed. | No |
| allowedModes.low | boolean | no | Whether 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 |
- Javascript
- Kotlin
- Swift
- Brightscript
- C#
const config = {
...
latency: {
allowedModes: {
low: false
}
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
latency = LuraLatencyConfiguration(
allowedModes = LuraLatencyAllowedModes(
low = false
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
latency: .init(
allowedModes: .init(
low: false
)
)
)
player?.setConfig(config)
config = {
latency: {
allowedModes: {
low: false
}
}
}
player.callFunc("setConfig", config)
var config = new Configuration
{
Latency = new LatencyConfiguration
{
AllowedModes = new LatencyAllowedModes
{
Low = false
}
}
};
await player.SetConfig(config);
Plugins
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
plugins: {
...
PLUGIN_CONFIG_NAME: {
...
PLUGIN_PARAM : VALUE
...
}
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
plugins = LuraPluginsConfigurations()
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
plugins: .init()
)
player?.setConfig(config)
config = {
plugins: {
PLUGIN_CONFIG_NAME: {
PLUGIN_PARAM: "VALUE"
}
}
}
player.callFunc("setConfig", config)
PAL
To use PAL nonce, please use [LURA_PAL_NONCE] reserved macro in url's under the ads section.
allowStorageConsent is removed from player configuration.
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | No | Enable the plugin. Defaults to false. | No |
| ppid | string | No | Publisher provided identifier. | No |
| descriptionUrl | string | No | Description URL of the content where ads will be played. | No |
| skippablesSupported | boolean | No | Signals skippable ad support to PAL where supported. | No |
| forceLimitedAds | boolean | No | Forces limited ads mode when true. Keep false unless forcing limited ads is explicitly required. | No |
| directedForChildOrUnknownAge | boolean | No | Marks requests as child-directed or unknown-age when set. | No |
| disableLimitedAdsStorage | boolean | No | Disables limited-ads storage in PAL Google Ad Manager settings when true. | No |
| disableFirstPartyIdentifiers | boolean | No | Disables first-party identifiers in PAL Google Ad Manager settings when true. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
Example
val config = LuraConfiguration(
plugins = LuraPluginsConfigurations(
pal = PalConfiguration(
enabled = true,
forceLimitedAds = false,
directedForChildOrUnknownAge = false,
disableLimitedAdsStorage = false,
disableFirstPartyIdentifiers = false,
ppid = "12DJD92J02KXVLS9D817DCJ078S8F1J2",
descriptionUrl = "https://docs4.lura.app/",
skippablesSupported = false
)
),
ads = LuraAdsConfiguration(
clientSide = LuraClientSideConfiguration(
provider = "generic",
generic = LuraGenericConfiguration(
breaks = listOf(
LuraGenericBreak(url = "https://example.com?pal_nonce=[LURA_PAL_NONCE]"),
)
)
)
)
)
player?.setConfig(config)
Example
let config = LuraPlayerConfiguration(
plugins: .init(
palConfiguration: .init(
enabled: true,
ppid: "12DJD92J02KXVLS9D817DCJ078S8F1J2",
descriptionUrl: "https://docs4.lura.app/",
forceLimitedAds: false,
directedForChildOrUnknownAge: false,
disableLimitedAdsStorage: false,
disableFirstPartyIdentifiers: false,
skippablesSupported: false
)
),
ads: .init(
clientSide: .init(
generic: .init(
breaks: [
.init(url: "https://example.com?pal_nonce=[LURA_PAL_NONCE]")
]
)
)
)
)
player?.setConfig(config)
Example
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]"}
]
}
}
}
}
player.callFunc("setConfig", config)
Conviva
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | Yes | Enable the plugin (Defaults to false if no value is given.) | No |
| customerKey | string | Yes | Conviva customer key, it can be test or production key. | No |
| gatewayUrl | string | No | Service URL of your conviva touchstone gateway. Don't fill this parameter in production. | No |
| viewerId | string | No | Viewer ID of the session, if you don't fill this parameter, it will be filled automatically. | No |
| contentInfo | Object<[key: string]: string> | No | The metadata to be sent to the conviva dashboard for current session. | Yes |
| deviceMetadata | Object<[key: string]: string> | No | Device metadata to be sent to the conviva for current session. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
plugins = LuraPluginsConfigurations(
conviva = ConvivaConfiguration(
enabled = true,
customerKey = "CUSTOMER_KEY",
gatewayUrl = "https://test.conviva.com",
viewerId = "test-viewer",
contentInfo = mapOf("key" to "value"),
deviceMetadata = mapOf("key" to "value")
)
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
plugins: .init(
convivaConfiguration: .init(
customerKey: "CUSTOMER_KEY",
gatewayUrl: "https://test.conviva.com",
viewerId: "test-viewer",
contentInfo: ["key": "value"],
enabled: true
)
)
)
player?.setConfig(config)
config = {
plugins: {
conviva: {
enabled: true
customerKey: "CUSTOMER_KEY"
gatewayUrl: "https://test.conviva.com"
viewerId: "test-viewer"
contentInfo: {
key: "value"
}
deviceMetadata: {
key: "value"
}
}
}
}
player.callFunc("setConfig", config)
Nielsen
| Attribute | Type | Required | Description |
|---|
| enabled | boolean | Yes | Enable the plugin (Defaults to false if no value is given.) |
| appId | string | Yes | Unique ID assigned to the player/site and configured by product provided by Nielsen |
| initialization | Object<[key: string]: string> | No | The initialization parameters of the Nielsen SDK. |
| metadata | Object<[key: string]: string> | No | The metadata to be sent to the Nielsen. |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
plugins = LuraPluginsConfigurations(
nielsen = NielsenConfiguration(
enabled = true,
appId = "APP_ID_PROVIDED_BY_NIELSEN",
initialization = mapOf("key" to "value"),
metadata = mapOf("key" to "value")
)
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
plugins: .init(
nielsenPluginConfiguration: .init(
appId: "APP_ID_PROVIDED_BY_NIELSEN",
initialization: ["key": "value"],
metadata: ["key": "value"],
enabled: true
)
)
)
player?.setConfig(config)
config = {
plugins: {
nielsen: {
enabled: true
appId: "APP_ID_PROVIDED_BY_NIELSEN"
initialization: {
key: "value"
}
metadata: {
key: "value"
}
}
}
}
player.callFunc("setConfig", config)
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | No | Enable the plugin (Defaults to false if no value is given.) | No |
| appId | string | Yes | Application id used for configuration. | No |
| griffonUrl | string | No | URL needed for starting assurance and inspect collected data on assurance server | No |
| marketingCloudId | string | Yes | Marketing Cloud ID for getting the visitor. | No |
| publisherId | string | Yes | ID of the publisher. | No |
| trackingServer | string | Yes | AppMeasurement tracking server | No |
| mediaTrackingServer | string | Yes | Media collection server endpoint to which all the media tracking data is sent | No |
| channel | string | Yes | Channel name | No |
| userId | string | Yes | User/Account ID to get app measurement instance. | No |
| pageName | string | Yes | Name of the page. | No |
| playerName | string | No | Name of the media player in use (defaults to Lura Player) | No |
| debugLogging | boolean | No | A boolean to enable debug mode on adobe media analytics sdk | No |
| contentInfo | object | No | Information related to content | No |
| contentInfo.name | string | Yes | Name of the currently playing content | No |
| contentInfo.id | string | Yes | ID of the currently playing content | No |
| contentInfo.length | number | Yes | Length of the currently playing content in seconds | No |
| contentInfo.streamType | "vod" | "live" | Yes | Type of the stream | No |
| contentInfo.mediaType | "video" | "audio" | Yes | Type of the media | No |
| contextData | {[key: string] : string} | No | Metadata that will be passed to adobe media analytics | No |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
plugins: {
...
adobeMediaAnalytics?: {
enabled?: true;
appId?: "APP_ID";
griffonUrl?: "GRIFFON_URL";
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";
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);
val config = LuraConfiguration(
plugins = LuraPluginsConfigurations(
adobeMediaAnalytics = AdobeMediaAnalyticsConfiguration(
enabled = true,
appId = "APP_ID",
griffonUrl = "GRIFFON_URL",
contentInfo = AdobeContentInfo(
name = "NAME",
id = "ID",
length = 0.0,
streamType = "STREAM_TYPE",
mediaType = "MEDIA_TYPE"
),
metadata = mapOf("key" to "value")
)
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
plugins: .init(
adobePluginConfiguration: .init(
enabled: true,
appId: "APP_ID",
griffonUrl: "GRIFFON_URL",
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",
debugLogging: false,
contentInfo: .init(
name: "NAME",
id: "ID",
length: 0,
streamType: "STREAM_TYPE",
mediaType: "MEDIA_TYPE"
),
contextData: ["key": "value"]
)
)
)
player?.setConfig(config)
config = {
plugins: {
adobeMediaAnalytics: {
enabled: true
appId: "APP_ID"
griffonUrl: "GRIFFON_URL"
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"
debugLogging: false
contentInfo: {
name: "NAME"
id: "ID"
length: 0
streamType: "STREAM_TYPE"
mediaType: "MEDIA_TYPE"
}
contextData: {
key: "value"
}
}
}
}
player.callFunc("setConfig", config)
Comscore
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | Yes | Enable the plugin (Defaults to false if no value is given.) | No |
| publisherId | string | Yes | Provide your Publisher ID value. The Publisher ID is often also referred to as the Client ID or c2 value. | No |
| publisherSecret | string | No | Provide a string with your Publisher Secret value. | No |
| userHasConsent | boolean | No | If 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 |
| appName | string | No | Title of the page that your video is playing. (Defaults to HTML title tag.) | No |
| autoUpdateMode | "FOREGROUND_ONLY" | "FOREGROUND_AND_BACKGROUND" | "DISABLED" | No | This setting controls if the library will update application usage times at a regular interval. (Defaults to FOREGROUND_ONLY) | No |
| autoUpdateInterval | number | No | The 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 |
| metadata | Object<[key: string]: string> | No | Metadata to be sent to comscore. | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
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);
val config = LuraConfiguration(
plugins = LuraPluginsConfigurations(
comscore = ComscoreConfiguration(
enabled = true,
publisherId = "PUBLISHER_ID_PROVIDED_BY_COMSCORE",
publisherSecret = "PUBLISHER_SECRET_PROVIDED_BY_COMSCORE",
userHasConsent = true,
appName = "Lura Player Included Application",
autoUpdateMode = 0,
autoUpdateInterval = 60,
metadata = mapOf("key" to "value")
)
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
plugins: .init(
comscorePluginConfiguration: .init(
publisherId: "PUBLISHER_ID_PROVIDED_BY_COMSCORE",
metadata: ["key": "value"],
enabled: true
)
)
)
player?.setConfig(config)
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"
}
}
}
}
player.callFunc("setConfig", config)
Open Measurement
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | Yes | Enable the plugin (Defaults to false if no value is given.) | No |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
plugins: {
...
openMeasurement: {
enabled: true,
},
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
plugins = LuraPluginsConfigurations(
openMeasurement = OpenMeasurementConfiguration()
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
plugins: .init(
openMeasurementConfiguration: .init()
)
)
player?.setConfig(config)
config = {
plugins: {
openMeasurement: {
enabled: true
}
}
}
player.callFunc("setConfig", config)
Oracle Moat
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | No | Enable the plugin (Defaults to false if no value is given.) | No |
| partnerCode | string | No | Partner code | No |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
plugins: {
...
moat: {
enabled: true,
partnerCode: "samplepartnercode123"
}
...
},
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
plugins = LuraPluginsConfigurations(
moat = MoatConfiguration(
enabled = true,
partnerCode = "samplepartnercode123"
)
),
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
plugins: .init(
moat: .init(
enabled: true,
partnerCode: "samplepartnercode123"
)
)
)
player?.setConfig(config)
config = {
plugins: {
moat: {
enabled: true
partnerCode: "samplepartnercode123"
}
}
}
player.callFunc("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
| Attribute | Type | Required | Description | Updatable |
|---|
| preferredBitrate | number | No | Initial 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 |
| abrEnabled | boolean | No | Enable or disable adaptive bitrate streaming. When false, player attempts to maintain preferredBitrate. Only works on platforms that support disabling ABR. (Defaults to true) | No |
| latencyMode | LatencyMode | No | Preferred 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 / Device | Browser / SDK | Supported? | Notes |
|---|
| macOS | Safari | No | Safari HLS player does not support preferred bitrate and abr disabling |
| iOS | Safari | No | Safari HLS player does not support preferred bitrate and abr disabling |
| iOS | Native SDK | No | Swift SDKs do not support abr disabling and preferred bitrate |
| tvOS | Native SDK | No | Swift SDKs do not support abr disabling and preferred bitrate |
| Roku | All | No | Roku player does not support preferred bitrate and abr disabling |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
initialization: {
video: {
preferredBitrate: 1000000,
abrEnabled: true,
latencyMode: "def"
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
initialization = LuraInitializationConfiguration(
video = LuraVideoInitializationConfiguration(
preferredBitrate = 1000000L,
abrEnabled = true,
latencyMode = LuraLatencyMode.DEFAULT
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
initialization: .init(
video: .init(
preferredBitrate: 1000000,
abrEnabled: true,
latencyMode: .DEFAULT
)
)
)
player?.setConfig(config)
config = {
initialization: {
video: {
preferredBitrate: 1000000
abrEnabled: true
latencyMode: "def"
}
}
}
player.callFunc("setConfig", config)
Caption Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | No | Enable or disable caption at initialization. When true, captions in preferredLanguage are displayed if available. (Defaults to false) | No |
| preferredLanguage | string | No | ISO 639-1 language code for preferred caption language (e.g., "en" for English). Player selects caption track matching this code if available. | No |
| source | Array<"manifest" | "sidecar" | "embedded"> | No | Caption sources to use on initialization. Defaults to ["manifest", "embedded"]. Use sidecar to include captions configured outside the media manifest. Web only. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
initialization: {
caption: {
enabled: true,
preferredLanguage: "en",
source: ["manifest", "embedded"]
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
initialization = LuraInitializationConfiguration(
caption = LuraCaptionInitializationConfiguration(
enabled = true,
preferredLanguage = "en"
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
initialization: .init(
captions: .init(
enabled: true,
preferredLanguage: "en"
)
)
)
player?.setConfig(config)
config = {
initialization: {
caption: {
enabled: true
preferredLanguage: "en"
source: ["manifest", "embedded"]
}
}
}
player.callFunc("setConfig", config)
Audio Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| preferredLanguage | string | No | ISO 639-1 language code for preferred audio language (e.g., "en" for English). Player selects audio track matching this code if available. | No |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
initialization: {
audio: {
preferredLanguage: "en"
}
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
initialization = LuraInitializationConfiguration(
audio = LuraAudioInitializationConfiguration(
preferredLanguage = "en"
)
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
initialization: .init(
audio: .init(
preferredLanguage: "en"
)
)
)
player?.setConfig(config)
config = {
initialization: {
audio: {
preferredLanguage: "en"
}
}
}
player.callFunc("setConfig", config)
Teasers Configuration
The teasers configuration allows you to enable the teaser feature from Akta MCP.
| Attribute | Type | Required | Description | Updatable |
|---|
| enabled | boolean | No | Enable the teaser (Defaults to false if no value is given.) | Yes |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
teasers: {
enabled: true
}
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
teasers = LuraTeaserConfiguration(
enabled = true
)
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
teasers: .init(
enabled: true
)
)
player?.setConfig(config)
config = {
teasers: {
enabled: true
}
}
player.callFunc("setConfig", config)
Debug Configuration
| Attribute | Type | Required | Description | Updatable |
|---|
| debug | boolean | No | Enable the debug mode (Defaults to false if no value is given.) | No |
- Javascript
- Kotlin
- Swift
- Brightscript
const config = {
...
debug: true,
...
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
val config = LuraConfiguration(
debug = true
)
player?.setConfig(config)
let config = LuraPlayerConfiguration(
debug: true
)
player?.setConfig(config)
config = {
debug: true
}
player.callFunc("setConfig", config)