Class CaptionsConfig
- java.lang.Object
-
- com.longtailvideo.jwplayer.configuration.CaptionsConfig
-
- All Implemented Interfaces:
com.longtailvideo.jwplayer.utils.Jsonable
public class CaptionsConfig extends java.lang.Object implements com.longtailvideo.jwplayer.utils.JsonableCaptions configuration used to set up the player. Contains options for styling captions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCaptionsConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description static intCAPTION_DEFAULT_FONT_SIZEDefault caption font size in pixels.static java.lang.StringCAPTION_EDGE_STYLE_DEPRESSEDEdge type value specifying depressed bevel character edges.static java.lang.StringCAPTION_EDGE_STYLE_DROP_SHADOWEdge type value specifying drop-shadowed character edges.static java.lang.StringCAPTION_EDGE_STYLE_NONEEdge type value specifying no character edges.static java.lang.StringCAPTION_EDGE_STYLE_RAISEDEdge type value specifying raised bevel character edges.static java.lang.StringCAPTION_EDGE_STYLE_UNIFORMEdge type value specifying uniformly outlined character edges.
-
Constructor Summary
Constructors Constructor Description CaptionsConfig(CaptionsConfig src)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBackgroundColor()intgetBackgroundOpacity()java.lang.StringgetColor()java.lang.StringgetEdgeStyle()java.lang.StringgetFontFamily()intgetFontOpacity()intgetFontSize()java.lang.StringgetWindowColor()intgetWindowOpacity()static CaptionsConfigparseJson(java.lang.String jsonStr)static CaptionsConfigparseJson(org.json.JSONObject json)voidsetBackgroundColor(java.lang.String backgroundColor)voidsetBackgroundOpacity(java.lang.Integer backgroundOpacity)voidsetColor(java.lang.String color)voidsetEdgeStyle(java.lang.String edgeStyle)voidsetFontFamily(java.lang.String fontFamily)voidsetFontOpacity(java.lang.Integer fontOpacity)voidsetFontSize(java.lang.Integer fontSize)voidsetWindowColor(java.lang.String windowColor)voidsetWindowOpacity(java.lang.Integer windowOpacity)org.json.JSONObjecttoJson()java.lang.StringtoString()
-
-
-
Field Detail
-
CAPTION_EDGE_STYLE_NONE
public static final java.lang.String CAPTION_EDGE_STYLE_NONE
Edge type value specifying no character edges.- See Also:
- Constant Field Values
-
CAPTION_EDGE_STYLE_DROP_SHADOW
public static final java.lang.String CAPTION_EDGE_STYLE_DROP_SHADOW
Edge type value specifying drop-shadowed character edges.- See Also:
- Constant Field Values
-
CAPTION_EDGE_STYLE_RAISED
public static final java.lang.String CAPTION_EDGE_STYLE_RAISED
Edge type value specifying raised bevel character edges.- See Also:
- Constant Field Values
-
CAPTION_EDGE_STYLE_DEPRESSED
public static final java.lang.String CAPTION_EDGE_STYLE_DEPRESSED
Edge type value specifying depressed bevel character edges.- See Also:
- Constant Field Values
-
CAPTION_EDGE_STYLE_UNIFORM
public static final java.lang.String CAPTION_EDGE_STYLE_UNIFORM
Edge type value specifying uniformly outlined character edges.- See Also:
- Constant Field Values
-
CAPTION_DEFAULT_FONT_SIZE
public static final int CAPTION_DEFAULT_FONT_SIZE
Default caption font size in pixels.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CaptionsConfig
public CaptionsConfig(CaptionsConfig src)
-
-
Method Detail
-
setColor
public void setColor(java.lang.String color)
- Parameters:
color- Hex color of the captions text.
-
setFontSize
public void setFontSize(java.lang.Integer fontSize)
- Parameters:
fontSize- Size of the captions text (Will not affect text size when rendering captions via browser).
-
setFontFamily
public void setFontFamily(java.lang.String fontFamily)
- Parameters:
fontFamily- Font Family of the captions text.- See Also:
- Font Families
-
setFontOpacity
public void setFontOpacity(java.lang.Integer fontOpacity)
- Parameters:
fontOpacity- Alpha percentage of the captions text.
-
setBackgroundColor
public void setBackgroundColor(java.lang.String backgroundColor)
- Parameters:
backgroundColor- Hex color of the caption characters background.
-
setBackgroundOpacity
public void setBackgroundOpacity(java.lang.Integer backgroundOpacity)
- Parameters:
backgroundOpacity- Alpha percentage of the caption characters background.
-
setEdgeStyle
public void setEdgeStyle(java.lang.String edgeStyle)
- Parameters:
edgeStyle- Method by which the captions characters are separated from their background, must be one of the CAPTION_EDGE_STYLE_ constants.
-
setWindowColor
public void setWindowColor(java.lang.String windowColor)
- Parameters:
windowColor- Hex color of the background of the entire captions area.
-
setWindowOpacity
public void setWindowOpacity(java.lang.Integer windowOpacity)
- Parameters:
windowOpacity- Alpha percentage of the background of the entire captions area.
-
getColor
@NonNull public java.lang.String getColor()
- Returns:
- Hex color of the captions text.
-
getFontSize
public int getFontSize()
- Returns:
- Size of the captions text (Will not affect text size when rendering captions via browser).
-
getFontFamily
@NonNull public java.lang.String getFontFamily()
- Returns:
- Font Family of the captions text.
- See Also:
- Font Families
-
getFontOpacity
public int getFontOpacity()
- Returns:
- Alpha percentage of the captions text.
-
getBackgroundColor
@NonNull public java.lang.String getBackgroundColor()
- Returns:
- Hex color of the caption characters background.
-
getBackgroundOpacity
public int getBackgroundOpacity()
- Returns:
- Alpha percentage of the caption characters background.
-
getEdgeStyle
@NonNull public java.lang.String getEdgeStyle()
- Returns:
- Method by which the captions characters are separated from their background, must be one of the CAPTION_EDGE_STYLE_ constants.
-
getWindowColor
@NonNull public java.lang.String getWindowColor()
- Returns:
- Hex color of the background of the entire captions area.
-
getWindowOpacity
public int getWindowOpacity()
- Returns:
- Alpha percentage of the background of the entire captions area.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toJson
public org.json.JSONObject toJson()
- Specified by:
toJsonin interfacecom.longtailvideo.jwplayer.utils.Jsonable
-
parseJson
public static CaptionsConfig parseJson(org.json.JSONObject json) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseJson
public static CaptionsConfig parseJson(java.lang.String jsonStr)
-
-