Getting Started

The following tutorial will walk you through adding the Bitmovin Player SDK to a new or existing project. If you're migrating from the Roku Native Video Node to Bitmovin Player, check out our migration guide instead.

Before we start...

Creating your own Roku channel

In order to use our Bitmovin Roku Player you will need to have your own custom Roku channel. Check out Roku's Development Overview to get started. There is also a Hello World example available which can be used for this guide.

Once you have your own channel in place you can follow the steps below to add the Bitmovin Roku Player to it.

Step 1: Adding your License Key

Add the Bitmovin License Key to your channels manifest

# License key
bitmovin_player_license_key=YOUR_LICENSE_KEY

Alternatively, you can add the license key to your player config later on. More on the player config down below.

Also check out our licensing tutorial to learn how to allowlist your Roku channel.

Step 2: Add the SDK to your project

Add the player SDK to your project using a component library

m.bitmovinPlayerSDK = CreateObject("roSGNode", "ComponentLibrary")
m.bitmovinPlayerSDK.id = "BitmovinPlayerSDK"
m.bitmovinPlayerSDK.uri = "https://cdn.bitmovin.com/player/roku/1/bitmovinplayer.zip"

Start the download of the component library by adding it to your scene and check for the download being finished by observing the loadStatus field.

Add the player to your project directly

Alternatively, the player SDK can be downloaded and added to your components folder directly.

Step 3: Set up the Player

Create the Player

Once the download of the library is complete you can create an instance of the Player.

if (m.bitmovinPlayerSDK.loadStatus = "ready") then
m.bitmovinPlayer = CreateObject("roSGNode", "BitmovinPlayerSDK:BitmovinPlayer")

Create a Player config

Create a player config to configure the player to your needs.

m.playerConfig = {
  playback: {
    autoplay: true,
    muted: false
  },
  adaptation: {
    preload: true
  },
  key: "YOUR_LICENSE_KEY" ' The license key is only required here if it wasn't added in the manifest as described in step 1.
}

For additional information as well as a list of all available parameters for the player config take a look at the setup method in our documentation.

Configure the Player

Pass the created player config to the player using the setup call.

m.bitmovinPlayer.callFunc("setup", m.playerConfig)

Create Source config

Create a source config consisting of at least a stream url with the corresponding format and a title to be passed to the player.

m.sourceConfig = {
  dash: "https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd",
  title: "My Video"
}

For additional information as well as a list of all available parameters for the source config take a look at the load method in our documentation.

Load the source config

Load the created source config into the player using the load call.

m.bitmovinPlayer.callFunc("load", m.sourceConfig)

Step 4: Final Review

Now that you have learned how to add the player to your project, configure and use it you can start having a look at the API Reference and adapt the player to your needs.

Also check out our Example Repository where you can find a full example of what has been shown here.