public final class

MediaItem.SubtitleConfiguration.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.MediaItem.SubtitleConfiguration.Builder

Overview

Builder for MediaItem.SubtitleConfiguration instances.

Summary

Constructors
publicBuilder(Uri uri)

Constructs an instance.

Methods
public MediaItem.SubtitleConfigurationbuild()

Creates a MediaItem.SubtitleConfiguration from the values of this builder.

public MediaItem.SubtitleConfiguration.BuildersetId(java.lang.String id)

Sets the optional ID for this subtitle track.

public MediaItem.SubtitleConfiguration.BuildersetLabel(java.lang.String label)

Sets the optional label for this subtitle track.

public MediaItem.SubtitleConfiguration.BuildersetLanguage(java.lang.String language)

Sets the optional language of the subtitle file.

public MediaItem.SubtitleConfiguration.BuildersetMimeType(java.lang.String mimeType)

Sets the MIME type.

public MediaItem.SubtitleConfiguration.BuildersetRoleFlags(int roleFlags)

Sets the role flags.

public MediaItem.SubtitleConfiguration.BuildersetSelectionFlags(int selectionFlags)

Sets the flags used for track selection.

public MediaItem.SubtitleConfiguration.BuildersetUri(Uri uri)

Sets the to the subtitle file.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(Uri uri)

Constructs an instance.

Parameters:

uri: The to the subtitle file.

Methods

Sets the to the subtitle file.

public MediaItem.SubtitleConfiguration.Builder setMimeType(java.lang.String mimeType)

Sets the MIME type.

public MediaItem.SubtitleConfiguration.Builder setLanguage(java.lang.String language)

Sets the optional language of the subtitle file.

public MediaItem.SubtitleConfiguration.Builder setSelectionFlags(int selectionFlags)

Sets the flags used for track selection.

public MediaItem.SubtitleConfiguration.Builder setRoleFlags(int roleFlags)

Sets the role flags. These are used for track selection.

public MediaItem.SubtitleConfiguration.Builder setLabel(java.lang.String label)

Sets the optional label for this subtitle track.

public MediaItem.SubtitleConfiguration.Builder setId(java.lang.String id)

Sets the optional ID for this subtitle track.

Creates a MediaItem.SubtitleConfiguration from the values of this builder.