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:
Include the Mux Data SDK
Install mux-analytics into your Roku application.Setup a new Mux Task
Define an interface that links your Roku player instance with mux-analytics.Setup the task to respond to video events
Create the Mux Task node and pass in your Video node.Debugging
Use the debugging attributes in your manifest to see logging output.Make your data actionable
Use metadata fields to make the data collected by Mux actionable and useful.Advertising configuration
If your player uses advertisements, add the necessary callbacks.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:
- Engagement metrics
- Quality of Experience Metrics
- Custom Dimensions
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
- Values:
full,partialornone - Description: Outputs the event at the time it occurs; default is
none.
mux_debug_beacons
- Values:
full,partialornone - Description: Outputs the data (full) or event(s) (partial) being sent; default is
none.
mux_base_url
- Values: Protocol + domain name; e.g.,
https://img.litix.io - Description: Controls which domain the data should be sent to. Useful for environmental builds of your project.
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:
- ContentType
- URL
- Live
- StreamFormat
- Length
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
- Added
audiotrackchangeevent, reporting audio track status.
Previous releases
v2.7.0
- Report subtitle changes with new text track change events.