Back to Exoplayer

MediaItem.SubtitleConfiguration (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/MediaItem.SubtitleConfiguration.html

latest6.3 KB
Original Source

Package com.google.android.exoplayer2

Class MediaItem.SubtitleConfiguration

  • java.lang.Object

    • com.google.android.exoplayer2.MediaItem.SubtitleConfiguration
  • All Implemented Interfaces:BundleableDirect Known Subclasses:MediaItem.SubtitleEnclosing class:MediaItem


public static classMediaItem.SubtitleConfigurationextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")

Properties for a text track.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static class | MediaItem.SubtitleConfiguration.Builder | Builder for MediaItem.SubtitleConfiguration instances. |

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable

Bundleable.Creator<T extends Bundleable>

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static Bundleable.Creator<MediaItem.SubtitleConfiguration> | CREATOR | An object that can restore MediaItem.SubtitleConfiguration from a Bundle. | | String | id | The ID of the subtitles. | | String | label | The label. | | String | language | The language. | | String | mimeType | The optional MIME type of the subtitle file, or null if unspecified. | | @com.google.android.exoplayer2.C.RoleFlags int | roleFlags | The role flags. | | @com.google.android.exoplayer2.C.SelectionFlags int | selectionFlags | The selection flags. | | Uri | uri | The Uri to the subtitle file. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | MediaItem.SubtitleConfiguration.Builder | buildUpon() | Returns a MediaItem.SubtitleConfiguration.Builder initialized with the values of this instance. | | boolean | equals​(Object obj) | | | int | hashCode() | | | Bundle | toBundle() | Returns a Bundle representing the information stored in this object. |

- 

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

uri

public final[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri

The Uri to the subtitle file.

- 

mimeType

@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mimeType

The optional MIME type of the subtitle file, or null if unspecified.

- 

language

@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")language

The language.

- 

selectionFlags

[@SelectionFlags](C.SelectionFlags.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.C.SelectionFlags int selectionFlags

The selection flags.

- 

roleFlags

[@RoleFlags](C.RoleFlags.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.C.RoleFlags int roleFlags

The role flags.

- 

label

@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")label

The label.

- 

id

@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")id

The ID of the subtitles. This will be propagated to the Format.id of the subtitle track created from this configuration.

- 

CREATOR

public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[MediaItem.SubtitleConfiguration](MediaItem.SubtitleConfiguration.html "class in com.google.android.exoplayer2")> CREATOR

An object that can restore MediaItem.SubtitleConfiguration from a Bundle.

Method Detail

- 

buildUpon

public[MediaItem.SubtitleConfiguration.Builder](MediaItem.SubtitleConfiguration.Builder.html "class in com.google.android.exoplayer2")buildUpon()

Returns a MediaItem.SubtitleConfiguration.Builder initialized with the values of this instance.

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)

Overrides:equals in class Object

- 

hashCode

public int hashCode()

Overrides:hashCode in class Object

- 

toBundle

public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()

Description copied from interface: Bundleable

Returns a Bundle representing the information stored in this object. Specified by:toBundle in interface Bundleable