Getting Started
This section explains the basics of how to use the Roku SDK component of Lura Player. This SDK can be used to enhance the functionality of your video embeds or to implement rich page-level video interactions.
MainScene.xml
<?xml version="1.0" encoding="utf-8"?>
<component name="MainScene" extends="Scene">
<children>
<ComponentLibrary id="lib" uri="https://w4.mp.lura.live/p/[YOUR_PLAYER_ID]/LuraPlayer.pkg" />
</children>
<script type="text/brightscript" uri="MainScene.brs" />
</component>
MainScene.brs
sub init()
m.lib = m.top.findNode("lib")
m.lib.observeField("loadStatus", "onLoadStatusChanged")
end sub
sub onLoadStatusChanged()
if m.lib.loadStatus <> "ready"
return
end if
m.player = CreateObject("roSGNode", "Lura:LuraPlayer")
m.top.appendChild(m.player)
m.player.callFunc("setConfig", {
"lura": {
"appKey": "PqSpQb9pFu1A_v4qrMnRNwcXJGoFMO0B02BwGBQ4Zwa0_uMdXPXrqjnlSbJbkv8duDNk2-c3JbOXq2auBscWP1GyvlWlgFcIzaO6QFG74nY",
"assetId": "5179686",
}
})
m.player.callFunc("play")
m.player.setFocus(true)
end sub