public class Caption
extends java.lang.Object
implements com.longtailvideo.jwplayer.utils.Jsonable
Modifier and Type | Class and Description |
---|---|
static class |
Caption.Builder
Builder for
Caption . |
Constructor and Description |
---|
Caption() |
Caption(Caption source)
Copy constructor.
|
Caption(java.lang.String file) |
Caption(java.lang.String file,
CaptionType kind,
java.lang.String label,
java.lang.Boolean defaultTrack) |
Modifier and Type | Method and Description |
---|---|
static java.util.List<Caption> |
cloneList(java.util.List<Caption> src) |
java.lang.String |
getFile() |
CaptionType |
getKind() |
java.lang.String |
getLabel() |
boolean |
isDefault() |
static java.util.List<Caption> |
listFromJson(org.json.JSONArray json) |
static java.util.List<Caption> |
listFromJson(java.lang.String json) |
static Caption |
parseJson(org.json.JSONObject json) |
static Caption |
parseJson(java.lang.String json) |
void |
setDefault(boolean _default) |
void |
setFile(java.lang.String file) |
void |
setKind(CaptionType kind) |
void |
setLabel(java.lang.String label) |
org.json.JSONObject |
toJson() |
public Caption(java.lang.String file)
public Caption(java.lang.String file, CaptionType kind, java.lang.String label, java.lang.Boolean defaultTrack)
public Caption()
public Caption(Caption source)
source
- Caption object to copy.@Nullable public java.lang.String getFile()
@NonNull public CaptionType getKind()
@Nullable public java.lang.String getLabel()
public boolean isDefault()
public void setFile(java.lang.String file)
file
- URL to the captions, chapters or thumbnails text track file.public void setKind(CaptionType kind)
kind
- The kind of text track.public void setLabel(java.lang.String label)
label
- Label of the text track. Is only used in setups with multiple captions, where the label is displayed in the CC selection menu.public void setDefault(boolean _default)
_default
- Only for captions. Set this to true if you want a captions track to display by defaultpublic static Caption parseJson(org.json.JSONObject json) throws org.json.JSONException
org.json.JSONException
public static Caption parseJson(java.lang.String json) throws org.json.JSONException
org.json.JSONException
public static java.util.List<Caption> listFromJson(org.json.JSONArray json)
public static java.util.List<Caption> listFromJson(java.lang.String json)
public org.json.JSONObject toJson()
toJson
in interface com.longtailvideo.jwplayer.utils.Jsonable