Class BrightcoveCaptionFormat

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

public class BrightcoveCaptionFormat extends Object
A class for describing the format options of a caption source.
  • Field Details

  • Method Details

    • type

      public String type()
      The mimetype for this caption object
    • language

      public String language()
      The language code for this caption object
    • label

      public 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
    • getFormattedLabel

      public String getFormattedLabel()
      Get the label or the display language (if the label is a language code or empty).
      Returns:
      The formatted label for the locale.
    • createCaptionFormat

      public static BrightcoveCaptionFormat createCaptionFormat(String type, 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(String type, String language, 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 String toString()
      Overrides:
      toString in class 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(List<? extends android.util.Pair<android.net.Uri,BrightcoveCaptionFormat>> pairList, BrightcoveCaptionFormat brightcoveCaptionFormat)