Monitor Roku | Mux

Monitor Roku

Connect Mux Data to your Roku application to collect playback performance metrics. Use this guide when your Roku SceneGraph application plays video with a Video node.

In this guide:

  1. Include the Mux Data SDK
    Install mux-analytics into your Roku application.

  2. Setup a new Mux Task
    Define an interface that links your Roku player instance with mux-analytics.

  3. Setup the task to respond to video events
    Create the Mux Task node and pass in your Video node.

  4. Debugging
    Use the debugging attributes in your manifest to see logging output.

  5. Make your data actionable
    Use metadata fields to make the data collected by Mux actionable and useful.

  6. Advertising configuration
    If your player uses advertisements, add the necessary callbacks.

  7. Additional configuration
    A number of options you can configure on MuxTask, which can be used to customize the SDK.


Mux Data collects playback performance metrics from Roku SceneGraph applications. This guide helps you monitor the playback experience of your viewers. You do not need Mux Video to use Mux Data.

Features

The following data can be collected by the Mux Data SDK:

Note: Video Quality metrics are not available.

1. Include the Mux Data SDK

Place the SDK file in your libs folder. The latest version can be found in the Mux Documentation.

2. Setup a new Mux Task

Create a new Task XML named MuxTask.xml inside your components folder. This is used to link the mux-analytics.brs file into your application.

3. Setup the task to respond to video events

Within your main application, create the Mux Task node, and pass the Video node that you are tracking to it. Get your ENV_KEY from the Mux environments dashboard.

Env Key is different than your API token. These are client-side keys used for Mux Data monitoring.

4. Debugging

To help you with the integration, several optional manifest attributes can be used:

mux_debug_events

mux_debug_beacons

mux_base_url

5. Make your data actionable

The Roku SDK supports adding metadata through the muxConfig object that is passed to the Mux Task. Main metadata fields include:

6. Advertising configuration

If advertising is to be used, send the appropriate events to the Mux Task. You can also pass your own ad parameters by setting ctx.mux to an associative array with desired values.

7. Additional configuration

Field Name Type Description
video Node The Video node that is being tracked.
config assocarray Configuration for the Mux task, including env key and additional metadata.
rafEvent assocarray For forwarding RAF events into the Mux SDK.
view String Controls when views start and end directly.
disableAutomaticErrorTracking Boolean Signal errors manually.
error assocarray Used to signal errors manually.
exit Boolean Used to exit tracking directly.
exitType String Controls the mechanism used while exiting tracking.
useRenderStitchedStream Boolean Indicates if renderStitchedStream is used for advertising in your application.
useSSAI Boolean Indicates if server-side ad insertion is used.

Release notes

Current release

v2.8.0

Previous releases

v2.7.0