Skip to main content

Getting Started

This section explains the basics of how to use the JavaScript/Typescript 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.

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/latest/loader.js"></script>
<script>
LuraPlayer("player", {
token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2aWQiOiI3MTEyNTMxIiwiaXNzIjoibktrZVlBb2dnSmQ1QlRlMnJMSDFaaVlKTjI1QURhdzEifQ.TNmJaU5lETn6FLVQlHDImxMDVUF_LXIvbuVx9E53P08",
}).then((player) => {
window.player = player;
});
</script>
</body>
</html>