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.Jsonable
Captions configuration used to set up the player. Contains options for styling captions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CaptionsConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description static int
CAPTION_DEFAULT_FONT_SIZE
Default caption font size in pixels.static java.lang.String
CAPTION_EDGE_STYLE_DEPRESSED
Edge type value specifying depressed bevel character edges.static java.lang.String
CAPTION_EDGE_STYLE_DROP_SHADOW
Edge type value specifying drop-shadowed character edges.static java.lang.String
CAPTION_EDGE_STYLE_NONE
Edge type value specifying no character edges.static java.lang.String
CAPTION_EDGE_STYLE_RAISED
Edge type value specifying raised bevel character edges.static java.lang.String
CAPTION_EDGE_STYLE_UNIFORM
Edge 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.String
getBackgroundColor()
int
getBackgroundOpacity()
java.lang.String
getColor()
java.lang.String
getEdgeStyle()
java.lang.String
getFontFamily()
int
getFontOpacity()
int
getFontSize()
java.lang.String
getWindowColor()
int
getWindowOpacity()
static CaptionsConfig
parseJson(java.lang.String jsonStr)
static CaptionsConfig
parseJson(org.json.JSONObject json)
void
setBackgroundColor(java.lang.String backgroundColor)
void
setBackgroundOpacity(java.lang.Integer backgroundOpacity)
void
setColor(java.lang.String color)
void
setEdgeStyle(java.lang.String edgeStyle)
void
setFontFamily(java.lang.String fontFamily)
void
setFontOpacity(java.lang.Integer fontOpacity)
void
setFontSize(java.lang.Integer fontSize)
void
setWindowColor(java.lang.String windowColor)
void
setWindowOpacity(java.lang.Integer windowOpacity)
org.json.JSONObject
toJson()
java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
toJson
public org.json.JSONObject toJson()
- Specified by:
toJson
in 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)
-
-