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.JsonableLogo configuration used to set up the player.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLogoConfig.Builderstatic interfaceLogoConfig.LogoPosition
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLOGO_POSITION_BOTTOM_LEFTLogo position: Bottom-Left.static java.lang.StringLOGO_POSITION_BOTTOM_RIGHTLogo position: Bottom-Right.static java.lang.StringLOGO_POSITION_CONTROL_BARLogo position: Control-barstatic java.lang.StringLOGO_POSITION_TOP_LEFTLogo position: Top-Left.static java.lang.StringLOGO_POSITION_TOP_RIGHTLogo 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.StringgetFile()booleangetHide()java.lang.StringgetLink()intgetMargin()java.lang.StringgetPosition()static LogoConfigparseJson(java.lang.String jsonStr)static LogoConfigparseJson(org.json.JSONObject json)voidsetFile(java.lang.String file)voidsetHide(java.lang.Boolean hide)voidsetLink(java.lang.String link)voidsetMargin(java.lang.Integer margin)voidsetPosition(java.lang.String position)org.json.JSONObjecttoJson()
-
-
-
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:
toJsonin 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)
-
-