Package com.brightcove.player.captioning
Class BrightcoveCaptionFormat
java.lang.Object
com.brightcove.player.captioning.BrightcoveCaptionFormat
A class for describing the format options of a caption source.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The Builder interface to store BrightcoveCaptionFormat data. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a new builder for the BrightcoveCaptionFormat class.static android.media.MediaFormat
Converts a BrightcoveCaptionFormat object into a MediaFormat object, for use with the Android 4.4+ caption methods.static BrightcoveCaptionFormat
createCaptionFormat
(String type, String language) Creates a caption object which will encapsulate the formatting data into a BrightcoveCaptionFormat object.static BrightcoveCaptionFormat
createCaptionFormat
(String type, String language, 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
(List<? extends android.util.Pair<android.net.Uri, BrightcoveCaptionFormat>> pairList, BrightcoveCaptionFormat brightcoveCaptionFormat) Get the label or the display language (if the label is a language code or empty).boolean
The in band metadata track dispatch type for this caption objectboolean
Specifies if this caption is set as the defaultlabel()
The label property for this caption objectlanguage()
The language code for this caption objecttoString()
type()
The mimetype for this caption objectvoid
validate()
Validation method for quick error checking against input data.
-
Field Details
-
BRIGHTCOVE_SCHEME
- See Also:
-
-
Method Details
-
type
The mimetype for this caption object -
language
The language code for this caption object -
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
Get the label or the display language (if the label is a language code or empty).- Returns:
- The formatted label for the locale.
-
createCaptionFormat
Creates a caption object which will encapsulate the formatting data into a BrightcoveCaptionFormat object.- Parameters:
type
- the caption mimetypelanguage
- 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 mimetypelanguage
- the caption language codelabel
- the label property- Returns:
- a BrightcoveCaptionFormat with stored type and language information.
-
builder
Creates a new builder for the BrightcoveCaptionFormat class.- Returns:
- a new Builder.
-
toString
-
validate
public void validate()Validation method for quick error checking against input data.
-