MediaItem.SubtitleConfiguration.Builder


public final class MediaItem.SubtitleConfiguration.Builder


Builder for SubtitleConfiguration instances.

Summary

Public constructors

Builder(Uri uri)

Constructs an instance.

Public methods

MediaItem.SubtitleConfiguration

Creates a SubtitleConfiguration from the values of this builder.

MediaItem.SubtitleConfiguration.Builder

Sets the optional ID for this subtitle track.

MediaItem.SubtitleConfiguration.Builder

Sets the optional label for this subtitle track.

MediaItem.SubtitleConfiguration.Builder

Sets the optional language of the subtitle file.

MediaItem.SubtitleConfiguration.Builder

Sets the MIME type.

MediaItem.SubtitleConfiguration.Builder

Sets the role flags.

MediaItem.SubtitleConfiguration.Builder

Sets the flags used for track selection.

MediaItem.SubtitleConfiguration.Builder

Sets the Uri to the subtitle file.

Public constructors

Builder

public Builder(Uri uri)

Constructs an instance.

Parameters
Uri uri

The Uri to the subtitle file.

Public methods

build

public MediaItem.SubtitleConfiguration build()

Creates a SubtitleConfiguration from the values of this builder.

setId

@CanIgnoreReturnValue
public MediaItem.SubtitleConfiguration.Builder setId(@Nullable String id)

Sets the optional ID for this subtitle track.

setLabel

@CanIgnoreReturnValue
public MediaItem.SubtitleConfiguration.Builder setLabel(@Nullable String label)

Sets the optional label for this subtitle track.

setLanguage

@CanIgnoreReturnValue
public MediaItem.SubtitleConfiguration.Builder setLanguage(@Nullable String language)

Sets the optional language of the subtitle file.

setMimeType

@CanIgnoreReturnValue
public MediaItem.SubtitleConfiguration.Builder setMimeType(@Nullable String mimeType)

Sets the MIME type.

setRoleFlags

@CanIgnoreReturnValue
public MediaItem.SubtitleConfiguration.Builder setRoleFlags(@C.RoleFlags int roleFlags)

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

setSelectionFlags

@CanIgnoreReturnValue
public MediaItem.SubtitleConfiguration.Builder setSelectionFlags(@C.SelectionFlags int selectionFlags)

Sets the flags used for track selection.

setUri

@CanIgnoreReturnValue
public MediaItem.SubtitleConfiguration.Builder setUri(Uri uri)

Sets the Uri to the subtitle file.