Skip to the content.

Docs | Android

Profiler

To help Kaltura diagnose and fix playback issues (slow join time, rebufferrings) and to improve overall player performance, PlayKit includes an optional module called Profiler. The Profiler sends detailed player logs to a server for analysis.

To use the profiler, the application has to add it to the build, enable it, and then optionally set experiments.

On this page:

Build

JCenter

Add the profiler to build.gradle:

implementation 'com.kaltura.playkit:playkit-profiler:VERSION'

VERSION should be the same version of PlayKit you use.

JitPack

JitPack publishes all modules together, so the profiler is already included with PlayKit

implementation 'com.kaltura:playkit-android:TAG'

For adding an arbitrary build of the profiler to a pre-existing (but compatible) JCenter build of PlayKit, use the following:

implementation 'com.kaltura.playkit-android:playkit-profiler:TAG', {
    exclude group: 'com.kaltura.playkit', module: 'playkit'
}

Enable

The app calls PlayKitProfiler.init(Context) to enable the profiler. This causes the profiler to download it’s configuration file and configure itself.

After being enabled, the profiler determines if it should activate itself or not. This is done randomally and is based on configuration.

Experiments

If the app initiates some sort of A/B testing related to player configuration, it should signal it to the profiler. The profiler will include the experiment info with the log.

To set an experiment (a key:value pair), the app calls PlayKitProfiler.setExperiment(String key, Object value). The valid types for value are Number, Boolean and String. Any other value is ignored.