com.brightcove.player.captioning

## Class BrightcoveCaptionFormat

- java.lang.Object
- - com.brightcove.player.captioning.BrightcoveCaptionFormat

-     public class BrightcoveCaptionFormat
      extends java.lang.Object

  A class for describing the format options of a caption source.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BrightcoveCaptionFormat.Builder` The Builder interface to store BrightcoveCaptionFormat data.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `BRIGHTCOVE_SCHEME`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BrightcoveCaptionFormat.Builder` | `builder()` Creates a new builder for the BrightcoveCaptionFormat class.
    `static android.media.MediaFormat` | `convertCaptionFormat(BrightcoveCaptionFormat format)` Converts a BrightcoveCaptionFormat object into a MediaFormat object, for use with the Android 4.4+ caption methods.
    `static BrightcoveCaptionFormat` | `createCaptionFormat(java.lang.String type, java.lang.String language)` Creates a caption object which will encapsulate the formatting data into a BrightcoveCaptionFormat object.
    `static BrightcoveCaptionFormat` | `createCaptionFormat(java.lang.String type, java.lang.String language, java.lang.String label)` Creates a caption object which will encapsulate the formatting data into a BrightcoveCaptionFormat object.
    `static android.util.Pair<android.net.Uri,BrightcoveCaptionFormat>` | `findMatchingLanguageIgnoreMimeType(java.util.List<? extends android.util.Pair<android.net.Uri,BrightcoveCaptionFormat>> pairList, BrightcoveCaptionFormat brightcoveCaptionFormat)`
    `boolean` | `hasInBandMetadataTrackDispatchType()` The in band metadata track dispatch type for this caption object
    `boolean` | `isDefault()` Specifies if this caption is set as the default
    `java.lang.String` | `label()` The label property for this caption object
    `java.lang.String` | `language()` The language code for this caption object
    `java.lang.String` | `toString()`
    `java.lang.String` | `type()` The mimetype for this caption object
    `void` | `validate()` Validation method for quick error checking against input data.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### BRIGHTCOVE_SCHEME

          public static final java.lang.String BRIGHTCOVE_SCHEME

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### type

          public java.lang.String type()

      The mimetype for this caption object

    - #### language

          public java.lang.String language()

      The language code for this caption object

    - #### label

          public java.lang.String label()

      The label property for this caption object

    - #### hasInBandMetadataTrackDispatchType

          public boolean hasInBandMetadataTrackDispatchType()

      The in band metadata track dispatch type for this caption object

    - #### isDefault

          public boolean isDefault()

      Specifies if this caption is set as the default

    - #### createCaptionFormat

          public static BrightcoveCaptionFormat createCaptionFormat(java.lang.String type,
                                                                    java.lang.String language)

      Creates a caption object which will encapsulate the formatting data into a BrightcoveCaptionFormat object.
      Parameters:
        `type` - the caption mimetype
        `language` - the caption language code
      Returns:
        a BrightcoveCaptionFormat with stored type and language information.

    - #### createCaptionFormat

          public static BrightcoveCaptionFormat createCaptionFormat(java.lang.String type,
                                                                    java.lang.String language,
                                                                    java.lang.String label)

      Creates a caption object which will encapsulate the formatting data into a BrightcoveCaptionFormat object.
      Parameters:
        `type` - the caption mimetype
        `language` - the caption language code
        `label` - the label property
      Returns:
        a BrightcoveCaptionFormat with stored type and language information.

    - #### convertCaptionFormat

          public static android.media.MediaFormat convertCaptionFormat(BrightcoveCaptionFormat format)

      Converts a BrightcoveCaptionFormat object into a MediaFormat object, for use with the Android 4.4+ caption methods.
      Parameters:
        `format` - a BrightcoveCaptionFormat object with formatting data.
      Returns:
        a MediaFormat object for use with Android 4.4 caption methods.

    - #### builder

          public static BrightcoveCaptionFormat.Builder builder()

      Creates a new builder for the BrightcoveCaptionFormat class.
      Returns:
        a new Builder.

    - #### toString

          @NonNull
          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### validate

          public void validate()

      Validation method for quick error checking against input data.

    - #### findMatchingLanguageIgnoreMimeType

          @Nullable
          public static android.util.Pair<android.net.Uri,BrightcoveCaptionFormat> findMatchingLanguageIgnoreMimeType(java.util.List<? extends android.util.Pair<android.net.Uri,BrightcoveCaptionFormat>> pairList,
                                                                                                                                BrightcoveCaptionFormat brightcoveCaptionFormat)