Class Caption
- java.lang.Object
-
- com.longtailvideo.jwplayer.media.captions.Caption
-
- All Implemented Interfaces:
com.longtailvideo.jwplayer.utils.Jsonable
public class Caption extends java.lang.Object implements com.longtailvideo.jwplayer.utils.JsonableA caption track.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCaption.BuilderBuilder forCaption.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<Caption>cloneList(java.util.List<Caption> src)booleanequals(java.lang.Object obj)java.lang.StringgetFile()CaptionTypegetKind()java.lang.StringgetLabel()inthashCode()booleanisDefault()static java.util.List<Caption>listFromJson(java.lang.String json)static java.util.List<Caption>listFromJson(org.json.JSONArray json)static CaptionparseJson(java.lang.String json)static CaptionparseJson(org.json.JSONObject json)voidsetDefault(boolean _default)voidsetFile(java.lang.String file)voidsetKind(CaptionType kind)voidsetLabel(java.lang.String label)org.json.JSONObjecttoJson()
-
-
-
Constructor Detail
-
Caption
public Caption(java.lang.String file)
-
Caption
public Caption(java.lang.String file, CaptionType kind, java.lang.String label, java.lang.Boolean defaultTrack)
-
Caption
public Caption()
-
Caption
public Caption(Caption source)
Copy constructor.- Parameters:
source- Caption object to copy.
-
-
Method Detail
-
getFile
@Nullable public java.lang.String getFile()
- Returns:
- URL to the captions, chapters or thumbnails text track file.
-
getKind
@NonNull public CaptionType getKind()
- Returns:
- The kind of text track.
-
getLabel
@Nullable public java.lang.String getLabel()
- Returns:
- Label of the text track. Is only used in setups with multiple captions, where the label is displayed in the CC selection menu.
-
isDefault
public boolean isDefault()
- Returns:
- Only for captions. Set this to true if you want a captions track to display by default
-
setFile
public void setFile(java.lang.String file)
- Parameters:
file- URL to the captions, chapters or thumbnails text track file.
-
setKind
public void setKind(CaptionType kind)
- Parameters:
kind- The kind of text track.
-
setLabel
public void setLabel(java.lang.String label)
- Parameters:
label- Label of the text track. Is only used in setups with multiple captions, where the label is displayed in the CC selection menu.
-
setDefault
public void setDefault(boolean _default)
- Parameters:
_default- Only for captions. Set this to true if you want a captions track to display by default
-
parseJson
public static Caption parseJson(org.json.JSONObject json) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseJson
public static Caption parseJson(java.lang.String json) throws org.json.JSONException
- Throws:
org.json.JSONException
-
listFromJson
public static java.util.List<Caption> listFromJson(org.json.JSONArray json)
-
listFromJson
public static java.util.List<Caption> listFromJson(java.lang.String json)
-
toJson
public org.json.JSONObject toJson()
- Specified by:
toJsonin interfacecom.longtailvideo.jwplayer.utils.Jsonable
-
equals
public boolean equals(@Nullable java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-