Monitor Bitmovin Player Android | Mux

Monitor Bitmovin Player Android

Connect Mux Data to the Bitmovin Player Android SDK to collect playback performance metrics. Use this guide when your Android application plays video with Bitmovin Player.

In this guide:

Features

The features supported by Mux Data for this player.

1 Install the Mux Data SDK

Download the version of the SDK that matches your version of Bitmovin Player.

2 Initialize the monitor with your Bitmovin Player instance

The Mux monitor attaches to your Bitmovin Player instance.

3 Add Metadata

All metadata details except for envKey are optional, however you'll be able to compare and see more interesting results as you include more details.

4 Advanced

Depending on the details of your implementation, you may want to leverage some of the advanced options of MuxStatsSDKBitmovinPlayer.

Mux Data collects playback performance metrics from Bitmovin Player. Use this guide when your Android application plays video with Bitmovin Player and you want to monitor the playback experience of your viewers. You do not need Mux Video to use Mux Data.

This documents integration instructions for Bitmovin's Bitmovin Player library, version 3.x and 2.x.

The Mux integration with Bitmovin Player is built on top of Mux's core Java SDK, and the full code can be seen here: muxinc/mux-stats-sdk-bitmovin-android.

Features

The following data can be collected by the Mux Data SDK when you use the Bitmovin Player Android SDK:

Supported Features:

1 Install the Mux Data SDK

Add Gradle dependency on the Mux Bitmovin Player SDK

Add the Mux Maven repository to your Gradle file:

Next, add a dependency on the Mux Data Bitmovin Player SDK. We support both minapi16 and minapi21 as separate artifacts.

The current version is v0.5.1. Additional releases can be found on our releases page.

Bitmovin Player support

We support version 3.11.1 of Bitmovin Player. Support for additional versions is planned.

2 Initialize the monitor with your Bitmovin Player instance

Get your ENV_KEY from the Mux environments dashboard.

ENV_KEY is a client-side key used for Mux Data monitoring.

First, create the CustomerPlayerData and CustomerVideoData objects as appropriate for your current playback, and be sure to set your ENV_KEY.

Code:

Next, create the MuxStatsSDKBitmovinPlayer object by passing your Android Context, a Bitmovin PlayerView instance, a player name, and the customer data objects.

Code:

Finally, when you are destroying the player, call the MuxStatsSDKBitmovinPlayer.release() function.

After you've integrated, start playing a video in your player. A few minutes after you stop watching, you'll see the results in your Mux data dashboard.

3 Add Metadata

In the Java SDK, options are provided via the objects within the CustomerData object.

This gives you more metrics and metadata about video streaming, and allows you to search and filter on important fields like the player version, CDN, and video title.

4 Advanced

Changing the video

There are two cases where the underlying tracking of the video view need to be reset:

New source

When you change to a new video (in the same player) you need to update the information that Mux knows about the current video.

New program (in single stream)

In some cases, you may have the program change within a stream, and you may want to track each program as a view on its own.

Error tracking

By default, Mux's integration with Bitmovin Player automatically tracks fatal errors as thrown by Bitmovin Player. If a fatal error happens outside the context of Bitmovin Player you can call muxStatsBitmovinPlayer.error.