MediaItem.SubtitleConfiguration.Builder
Artifact: androidx.media3:media3-common
class MediaItem.SubtitleConfiguration.Builder
Builder for SubtitleConfiguration
instances.
Summary
Public constructors
Public functions
build
fun build(): MediaItem.SubtitleConfiguration!
Creates a SubtitleConfiguration
from the values of this builder.
setId
@CanIgnoreReturnValue
fun setId(id: String?): MediaItem.SubtitleConfiguration.Builder!
Sets the optional ID for this subtitle track.
setLabel
@CanIgnoreReturnValue
fun setLabel(label: String?): MediaItem.SubtitleConfiguration.Builder!
Sets the optional label for this subtitle track.
setLanguage
@CanIgnoreReturnValue
fun setLanguage(language: String?): MediaItem.SubtitleConfiguration.Builder!
Sets the optional language of the subtitle file.
setMimeType
@CanIgnoreReturnValue
fun setMimeType(mimeType: String?): MediaItem.SubtitleConfiguration.Builder!
Sets the MIME type.
setRoleFlags
@CanIgnoreReturnValue
fun setRoleFlags(@C.RoleFlags roleFlags: Int): MediaItem.SubtitleConfiguration.Builder!
Sets the role flags. These are used for track selection.
setSelectionFlags
@CanIgnoreReturnValue
fun setSelectionFlags(@C.SelectionFlags selectionFlags: Int): MediaItem.SubtitleConfiguration.Builder!
Sets the flags used for track selection.
setUri
@CanIgnoreReturnValue
fun setUri(uri: Uri!): MediaItem.SubtitleConfiguration.Builder!
Sets the Uri
to the subtitle file.