Skip to main content

Getting Started

This section explains the basics of how to use the JavaScript/Typescript API component of Lura Player. This API can be used to enhance the functionality of your video embeds or to implement rich page-level video interactions.

To get started, copy the following code in an index.html file and start exploring in the console.

<!DOCTYPE html>
<html lang="en">
<head>
<title>Lura Player Test</title>
</head>

<body>
<div id="player" style="width: 640px; height: 360px"></div>
<script src="https://w3.mp.lura.live/lura-player/web/latest/lura-player.js"></script>
<script>
const config = {
lura: {
appKey:
"PqSpQb9pFu1A_v4qrMnRNwcXJGoFMO0B02BwGBQ4Zwa0_uMdXPXrqjnlSbJbkv8duDNk2-c3JbOXq2auBscWP1GyvlWlgFcIzaO6QFG74nY",
assetId: "5179686",
},
};
const player = new lura.Player(document.getElementById("player"));
player.setConfig(config);
</script>
</body>
</html>