Package com.google.android.exoplayer2
Class MediaItem.SubtitleConfiguration.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.MediaItem.SubtitleConfiguration.Builder
-
- Enclosing class:
- MediaItem.SubtitleConfiguration
public static final class MediaItem.SubtitleConfiguration.Builder extends Object
Builder forMediaItem.SubtitleConfiguration
instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaItem.SubtitleConfiguration
build()
Creates aMediaItem.SubtitleConfiguration
from the values of this builder.MediaItem.SubtitleConfiguration.Builder
setId(String id)
Sets the optional ID for this subtitle track.MediaItem.SubtitleConfiguration.Builder
setLabel(String label)
Sets the optional label for this subtitle track.MediaItem.SubtitleConfiguration.Builder
setLanguage(String language)
Sets the optional language of the subtitle file.MediaItem.SubtitleConfiguration.Builder
setMimeType(String mimeType)
Sets the MIME type.MediaItem.SubtitleConfiguration.Builder
setRoleFlags(@com.google.android.exoplayer2.C.RoleFlags int roleFlags)
Sets the role flags.MediaItem.SubtitleConfiguration.Builder
setSelectionFlags(@com.google.android.exoplayer2.C.SelectionFlags int selectionFlags)
Sets the flags used for track selection.MediaItem.SubtitleConfiguration.Builder
setUri(Uri uri)
Sets theUri
to the subtitle file.
-
-
-
Method Detail
-
setUri
@CanIgnoreReturnValue public MediaItem.SubtitleConfiguration.Builder setUri(Uri uri)
Sets theUri
to the subtitle file.
-
setMimeType
@CanIgnoreReturnValue public MediaItem.SubtitleConfiguration.Builder setMimeType(@Nullable String mimeType)
Sets the MIME type.
-
setLanguage
@CanIgnoreReturnValue public MediaItem.SubtitleConfiguration.Builder setLanguage(@Nullable String language)
Sets the optional language of the subtitle file.
-
setSelectionFlags
@CanIgnoreReturnValue public MediaItem.SubtitleConfiguration.Builder setSelectionFlags(@SelectionFlags @com.google.android.exoplayer2.C.SelectionFlags int selectionFlags)
Sets the flags used for track selection.
-
setRoleFlags
@CanIgnoreReturnValue public MediaItem.SubtitleConfiguration.Builder setRoleFlags(@RoleFlags @com.google.android.exoplayer2.C.RoleFlags int roleFlags)
Sets the role flags. These are used for track selection.
-
setLabel
@CanIgnoreReturnValue public MediaItem.SubtitleConfiguration.Builder setLabel(@Nullable String label)
Sets the optional label for this subtitle track.
-
setId
@CanIgnoreReturnValue public MediaItem.SubtitleConfiguration.Builder setId(@Nullable String id)
Sets the optional ID for this subtitle track.
-
build
public MediaItem.SubtitleConfiguration build()
Creates aMediaItem.SubtitleConfiguration
from the values of this builder.
-
-