HTML and CSS Reference
In-Depth Information
/**
* Creates a new instance of {@link MediaTrack} with the track, kind, and
* label preset.
*
* @param source URL to the VTT text track
* @param kind Kind of text track
* @param label Label of the track (for display)
* @param locale Locale of the VTT text track
*/
public MediaTrack(String source, MediaTrackKind kind, String label, Locale locale) {
this(source, kind, label, locale, false);
}
/**
* Creates a new instance of {@link MediaTrack} with the source, kind,
* label, {@link Locale} and default track preset.
*
* @param source URL to the VTT text track
* @param kind Kind of text track
* @param label Label of the track (for display)
* @param locale Locale of the VTT text track
* @param defaultTrack Is the track the default track?
*/
public MediaTrack(String source, MediaTrackKind kind, String label, Locale locale, boolean
defaultTrack) {
this.source = source;
this.kind = kind;
this.defaultTrack = defaultTrack;
this.label = label;
this.locale = locale;
}
/**
* Determine if the {@link MediaTrack} is the default track to use if the
* browser could not match the appropriate track based on the
* {@link Locale}.
*
* @return {@link Boolean#TRUE} if this is the default track, otherwise
* {@link Boolean#FALSE}
*/
public boolean isDefaultTrack() {
return defaultTrack;
}
/**
* Sets the Default Track indicator of text track.
*
* @param defaultTrack {@link Boolean#TRUE} if this is the default track,
* otherwise {@link Boolean#FALSE}
*/
public void setDefaultTrack(boolean defaultTrack) {
this.defaultTrack = defaultTrack;
}
Search WWH ::




Custom Search