How can I use custom labels for audio or subtitle tracks?

In some scenarios, you want more control over the labels for subtitle and audio tracks as they are displayed in the player UI. The default behavior of the Bitmovin Player SDKs is, that the labels are inferred from the DASH or HLS manifest in which the tracks are defined. To be able to override this default behavior, we created the LabelingConfiguration.

The following code snippet shows, how the LabelingConfiguration can be used to override the default labels for subtitle tracks in the Android SDK:

protected void initializePlayer()
    // Create a new source configuration
    SourceConfiguration sourceConfiguration = new SourceConfiguration();
    // Create a SourceItem
    SourceItem sourceItem = new SourceItem("");
    // Add the SubtitleLabeler to the SourceItem
    // Add a new source item to the source configuration
    // load the source using the created source configuration
private SubtitleLabeler subtitleLabeler = new SubtitleLabeler()
    public String getSubtitleLabel(SubtitleTrack subtitleTrack)
        // Return a new label for the SubtitleTrack
        return getLabelForLanguage(subtitleTrack.getLanguage());
private String getLabelForLanguage(String language)
    // Some implementation to determine the label