HTML and CSS Reference
In-Depth Information
public void setType(String type) {
this.type = type;
}
}
Listing 8-10. MediaTrack.java Is a Simple Data Transfer Object for Keeping Details About a Text Track
package com.apress.projsf2html5.components.media;
import java.util.Locale;
/**
* {@linkplain MediaTrack Text track } used to provide the
* {@link UIMediaComponent} with localized text tracks for captioning, metadata,
* subtitles, etc.
*/
public class MediaTrack {
private String source;
private MediaTrackKind kind;
private boolean defaultTrack;
private String label;
private Locale locale;
/**
* Creates a new instance of {@link MediaTrack} with no details set.
*/
public MediaTrack() {
this("", null);
}
/**
* Creates a new instance of {@link MediaTrack} with the track and kind
* preset.
*
* @param source URL to the VTT text track
* @param kind Kind of text track
*/
public MediaTrack(String source, MediaTrackKind kind) {
this(source, kind, "", null, false);
}
/**
* 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)
*/
public MediaTrack(String source, MediaTrackKind kind, String label) {
this(source, kind, label, null, false);
}
Search WWH ::




Custom Search