Skip to main content

Getting Started

Configuration of the Lura Player is very straight forward and on point. After following the steps shown in Importing the Lura Player, you can start exploring the configuration options.

You can simply put the attributes in the following manner to your config.

{ attribute: value, attribute: value, attribute: value, ... }

To start simple, we will start with the basic attributes to play a video. There are two ways to play a video in Lura Player.

Lura configuration for content playback

This is the most simple way of playing videos. Lura Player will configure itself based on the play configuration you have configured from MCP. To see more details, check out Lura Configuration

AttributeTypeDescription
appKeystringAppKey generated in MCP based on the pre-adjusted play configuration
assetIdstringAssetId of the VOD or the Live Stream
tokenstring(Optional) When specified the provided token will be used in entitlements requests.
m.player = CreateObject("roSGNode", "Lura:LuraPlayer")
m.player.callFunc("setConfig", {
...
lura: {
appKey: "<YOUR_APP_KEY>",
assetId: "<ASSET_ID>"
}
...
})

Manual media configuration for content playback

To manually configure the media, you need to add following media objects and attributes based on your needs.

Here is an example code to play a media with all features.

Single media example
m.player.callFunc("setConfig", {
content: {
title: "Example title",
description: "Example description",
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",
},
{
url: "https://media.example.com/poster.png",
type: "image/png",
}
]
},
})