Package com.google.android.exoplayer2

## Class MediaItem.Subtitle

- java.lang.Object
- - com.google.android.exoplayer2.MediaItem.Subtitle

- Enclosing class:
    MediaItem

      public static final class MediaItem.Subtitle
      extends Object

  Properties for a text track.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `String` | `label` | The label.
    `String` | `language` | The language.
    `String` | `mimeType` | The MIME type.
    `int` | `roleFlags` | The role flags.
    `int` | `selectionFlags` | The selection flags.
    `Uri` | `uri` | The `Uri` to the subtitle file.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Subtitle​(Uri uri, String mimeType, String language)` | Creates an instance.
    `Subtitle​(Uri uri, String mimeType, String language, int selectionFlags)` | Creates an instance.
    `Subtitle​(Uri uri, String mimeType, String language, int selectionFlags, int roleFlags, String label)` | Creates an instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(Object obj)` |
    `int` | `hashCode()` |

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### uri

          public final Uri uri

      The `Uri` to the subtitle file.

    - #### mimeType

          public final String mimeType

      The MIME type.

    - #### language

          @Nullable
          public final String language

      The language.

    - #### selectionFlags

          @SelectionFlags
          public final int selectionFlags

      The selection flags.

    - #### roleFlags

          @RoleFlags
          public final int roleFlags

      The role flags.

    - #### label

          @Nullable
          public final String label

      The label.

  - ### Constructor Detail

    - #### Subtitle

          public Subtitle​(Uri uri,
                          String mimeType,
                          @Nullable
                          String language)

      Creates an instance.
      Parameters:
        `uri` - The `URI` to the subtitle file.
        `mimeType` - The MIME type.
        `language` - The optional language.

    - #### Subtitle

          public Subtitle​(Uri uri,
                          String mimeType,
                          @Nullable
                          String language,
                          @SelectionFlags
                          int selectionFlags)

      Creates an instance.
      Parameters:
        `uri` - The `URI` to the subtitle file.
        `mimeType` - The MIME type.
        `language` - The optional language.
        `selectionFlags` - The selection flags.

    - #### Subtitle

          public Subtitle​(Uri uri,
                          String mimeType,
                          @Nullable
                          String language,
                          @SelectionFlags
                          int selectionFlags,
                          @RoleFlags
                          int roleFlags,
                          @Nullable
                          String label)

      Creates an instance.
      Parameters:
        `uri` - The `URI` to the subtitle file.
        `mimeType` - The MIME type.
        `language` - The optional language.
        `selectionFlags` - The selection flags.
        `roleFlags` - The role flags.
        `label` - The optional label.

  - ### Method Detail

    - #### equals

          public boolean equals​(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`