Playlist Configuration
Attribute | Type | Description |
---|---|---|
lura | object | null | MCP Backend configuration |
lura.appKey | string | null | AppKey generated in MCP based on the pre-adjusted play configuration |
lura.assetId | string | null | Identifier for the MCP feed |
lura.token | string | null | (Optional) When specified the provided token will be used in entitlements requests. |
startingIndex | number | null | Index of the configuration to be loaded when the setConfig is completed. Defaults to 0 |
repeat | boolean | null | Whether the playlist should repeat the videos when it came to the end or not. Defaults to false |
items | Array<lura.unified.Configuration> | null | Lura Player Configuration array for inserting videos manually to the playlist. |
autoSwitch | object | null | Configuration for switching to the next video automatically when the video ends. |
autoSwitch.enabled | boolean | null | Enable automatic switching. |
autoSwitch.duration | number | null | Countdown in seconds for the next video. |
nextPage | string | null | Pagination URL that returns the next batch of configurations with a simple GET request. |
layout | "default" | "shorts" | null | Layout of the playlist |
slideAnimation | object | null | Configuration for slide animation while switching to the next video. |
slideAnimation.enabled | boolean | null | Enable slide animation. |
slideAnimation.duration | number | null | Duration 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);