Skip to main content

Playlist Configuration

AttributeTypeDescription
luraobject | nullMCP Backend configuration
lura.appKeystring | nullAppKey generated in MCP based on the pre-adjusted play configuration
lura.assetIdstring | nullIdentifier for the MCP feed
lura.tokenstring | null(Optional) When specified the provided token will be used in entitlements requests.
startingIndexnumber | nullIndex of the configuration to be loaded when the setConfig is completed. Defaults to 0
repeatboolean | nullWhether the playlist should repeat the videos when it came to the end or not. Defaults to false
itemsArray<lura.unified.Configuration> | nullLura Player Configuration array for inserting videos manually to the playlist.
autoSwitchobject | nullConfiguration for switching to the next video automatically when the video ends.
autoSwitch.enabledboolean | nullEnable automatic switching.
autoSwitch.durationnumber | nullCountdown in seconds for the next video.
nextPagestring | nullPagination URL that returns the next batch of configurations with a simple GET request.
layout"default" | "shorts" | nullLayout of the playlist
slideAnimationobject | nullConfiguration for slide animation while switching to the next video.
slideAnimation.enabledboolean | nullEnable slide animation.
slideAnimation.durationnumber | nullDuration of the animation.
Sample Playlist Configuration
const config = {
lura: {
appKey: "<YOUR_APP_KEY>",
assetId: "<FEED_ID>",
},
startingIndex: 0,
repeat: false,
items: [],
autoSwitch: {
enabled: true,
duration: 5,
},
layout: “shorts”,
slideAnimation: {
enabled: true,
duration: 0.6,
},
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);