Class LogoConfig
- java.lang.Object
-
- com.longtailvideo.jwplayer.configuration.LogoConfig
-
- All Implemented Interfaces:
com.longtailvideo.jwplayer.utils.Jsonable
public class LogoConfig extends java.lang.Object implements com.longtailvideo.jwplayer.utils.Jsonable
Logo configuration used to set up the player.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LogoConfig.Builder
static interface
LogoConfig.LogoPosition
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LOGO_POSITION_BOTTOM_LEFT
Logo position: Bottom-Left.static java.lang.String
LOGO_POSITION_BOTTOM_RIGHT
Logo position: Bottom-Right.static java.lang.String
LOGO_POSITION_CONTROL_BAR
Logo position: Control-barstatic java.lang.String
LOGO_POSITION_TOP_LEFT
Logo position: Top-Left.static java.lang.String
LOGO_POSITION_TOP_RIGHT
Logo position: Top-Right.
-
Constructor Summary
Constructors Constructor Description LogoConfig(LogoConfig src)
LogoConfig(LogoConfig.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFile()
boolean
getHide()
java.lang.String
getLink()
int
getMargin()
java.lang.String
getPosition()
static LogoConfig
parseJson(java.lang.String jsonStr)
static LogoConfig
parseJson(org.json.JSONObject json)
void
setFile(java.lang.String file)
void
setHide(java.lang.Boolean hide)
void
setLink(java.lang.String link)
void
setMargin(java.lang.Integer margin)
void
setPosition(java.lang.String position)
org.json.JSONObject
toJson()
-
-
-
Field Detail
-
LOGO_POSITION_TOP_RIGHT
public static final java.lang.String LOGO_POSITION_TOP_RIGHT
Logo position: Top-Right.- See Also:
- Constant Field Values
-
LOGO_POSITION_TOP_LEFT
public static final java.lang.String LOGO_POSITION_TOP_LEFT
Logo position: Top-Left.- See Also:
- Constant Field Values
-
LOGO_POSITION_BOTTOM_RIGHT
public static final java.lang.String LOGO_POSITION_BOTTOM_RIGHT
Logo position: Bottom-Right.- See Also:
- Constant Field Values
-
LOGO_POSITION_BOTTOM_LEFT
public static final java.lang.String LOGO_POSITION_BOTTOM_LEFT
Logo position: Bottom-Left.- See Also:
- Constant Field Values
-
LOGO_POSITION_CONTROL_BAR
public static final java.lang.String LOGO_POSITION_CONTROL_BAR
Logo position: Control-bar- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LogoConfig
public LogoConfig(LogoConfig src)
-
LogoConfig
public LogoConfig(LogoConfig.Builder builder)
-
-
Method Detail
-
setFile
public void setFile(java.lang.String file)
- Parameters:
file
- The URL of an external JPG, PNG or GIF image to be used as watermark (e.g. /assets/logo.png). We recommend using 24 bit PNG images with transparency.
-
setHide
public void setHide(java.lang.Boolean hide)
- Parameters:
hide
- When this option is set to true, the logo will automatically show and hide along with the other player controls.
-
setLink
public void setLink(java.lang.String link)
- Parameters:
link
- The URL to visit when the watermark image is clicked. Clicking a logo will have no affect unless this is configured.
-
setMargin
public void setMargin(java.lang.Integer margin)
- Parameters:
margin
- The distance, in pixels, of the logo from the edges of the display.
-
setPosition
public void setPosition(java.lang.String position)
- Parameters:
position
- This sets the corner in which to display the watermark. Must be one of the LOGO_POSITION_ constants.
-
getFile
@Nullable public java.lang.String getFile()
- Returns:
- The URL of an external JPG, PNG or GIF image to be used as watermark (e.g. /assets/logo.png). We recommend using 24 bit PNG images with transparency.
-
getHide
public boolean getHide()
- Returns:
- When this option is set to true, the logo will automatically show and hide along with the other player controls.
-
getLink
@Nullable public java.lang.String getLink()
- Returns:
- The URL to visit when the watermark image is clicked. Clicking a logo will have no affect unless this is configured.
-
getMargin
public int getMargin()
- Returns:
- The distance, in pixels, of the logo from the edges of the display.
-
getPosition
@NonNull public java.lang.String getPosition()
- Returns:
- The corner in which to display the watermark.
-
toJson
public org.json.JSONObject toJson()
- Specified by:
toJson
in interfacecom.longtailvideo.jwplayer.utils.Jsonable
-
parseJson
public static LogoConfig parseJson(org.json.JSONObject json) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseJson
public static LogoConfig parseJson(java.lang.String jsonStr)
-
-