Class RelatedConfig
- java.lang.Object
-
- com.longtailvideo.jwplayer.configuration.RelatedConfig
-
- All Implemented Interfaces:
com.longtailvideo.jwplayer.utils.Jsonable
public final class RelatedConfig extends java.lang.Object implements com.longtailvideo.jwplayer.utils.Jsonable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RelatedConfig.Builder
static interface
RelatedConfig.RelatedDisplayMode
static interface
RelatedConfig.RelatedOnClick
static interface
RelatedConfig.RelatedOnComplete
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RELATED_DISPLAY_MODE_OVERLAY
DisplayMode StringDefstatic java.lang.String
RELATED_DISPLAY_MODE_SHELF
static java.lang.String
RELATED_ON_CLICK_LINK
static java.lang.String
RELATED_ON_CLICK_PLAY
OnClick StringDefstatic java.lang.String
RELATED_ON_COMPLETE_AUTOPLAY
static java.lang.String
RELATED_ON_COMPLETE_HIDE
OnComplete StringDefstatic java.lang.String
RELATED_ON_COMPLETE_SHOW
-
Constructor Summary
Constructors Constructor Description RelatedConfig(RelatedConfig src)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAutoplayMessage()
java.lang.Integer
getAutoPlayTimer()
java.lang.String
getDisplayMode()
java.lang.String
getFile()
java.lang.String
getOnClick()
java.lang.String
getOnComplete()
static RelatedConfig
parseJson(java.lang.String jsonStr)
static RelatedConfig
parseJson(org.json.JSONObject json)
void
setAutoPlayMessage(java.lang.String message)
void
setAutoPlayTimer(java.lang.Integer timer)
void
setDisplayMode(java.lang.String displayMode)
void
setFile(java.lang.String file)
void
setOnClick(java.lang.String onClick)
void
setOnComplete(java.lang.String onComplete)
org.json.JSONObject
toJson()
java.lang.String
toString()
-
-
-
Field Detail
-
RELATED_ON_COMPLETE_HIDE
public static final java.lang.String RELATED_ON_COMPLETE_HIDE
OnComplete StringDef- See Also:
- Constant Field Values
-
RELATED_ON_COMPLETE_SHOW
public static final java.lang.String RELATED_ON_COMPLETE_SHOW
- See Also:
- Constant Field Values
-
RELATED_ON_COMPLETE_AUTOPLAY
public static final java.lang.String RELATED_ON_COMPLETE_AUTOPLAY
- See Also:
- Constant Field Values
-
RELATED_DISPLAY_MODE_OVERLAY
public static final java.lang.String RELATED_DISPLAY_MODE_OVERLAY
DisplayMode StringDef- See Also:
- Constant Field Values
-
RELATED_DISPLAY_MODE_SHELF
public static final java.lang.String RELATED_DISPLAY_MODE_SHELF
- See Also:
- Constant Field Values
-
RELATED_ON_CLICK_PLAY
public static final java.lang.String RELATED_ON_CLICK_PLAY
OnClick StringDef- See Also:
- Constant Field Values
-
RELATED_ON_CLICK_LINK
public static final java.lang.String RELATED_ON_CLICK_LINK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RelatedConfig
public RelatedConfig(RelatedConfig src)
-
-
Method Detail
-
setFile
public void setFile(java.lang.String file)
- Parameters:
file
- (Required) Location of an RSS or JSON file containing a feed of related videos.
-
setDisplayMode
public void setDisplayMode(java.lang.String displayMode)
- Parameters:
displayMode
- Configure the recommendations user interface. Does not apply to manual playlists. Must be one of the RELATED_DISPLAY_MODE_ constants.
-
setOnComplete
public void setOnComplete(java.lang.String onComplete)
- Parameters:
onComplete
- The behavior of our related videos overlay when a single video or playlist is completed. Must be one of the RELATED_DISPLAY_ON_COMPLETE_ constants.
-
setOnClick
public void setOnClick(java.lang.String onClick)
- Parameters:
onClick
- The behavior when a related video is selected. Must be one of the RELATED_DISPLAY_ON_CLICK_ constants.
-
setAutoPlayTimer
public void setAutoPlayTimer(java.lang.Integer timer)
- Parameters:
timer
- The number of seconds to wait before playing the next related video in your content list. Set to 0 to have your next related content to play immediately.
-
setAutoPlayMessage
public void setAutoPlayMessage(java.lang.String message)
- Parameters:
message
- A custom message that appears during autoplay.
-
getFile
public java.lang.String getFile()
- Returns:
- (Required) Location of an RSS or JSON file containing a feed of related videos.
-
getDisplayMode
@NonNull public java.lang.String getDisplayMode()
- Returns:
- Configure the recommendations user interface. Does not apply to manual playlists. Must be one of the RELATED_DISPLAY_MODE_ constants.
-
getOnComplete
@NonNull public java.lang.String getOnComplete()
- Returns:
- The behavior of our related videos overlay when a single video or playlist is completed. Must be one of the RELATED_DISPLAY_ON_COMPLETE_ constants.
-
getOnClick
@NonNull public java.lang.String getOnClick()
- Returns:
- The behavior when a related video is selected. Must be one of the RELATED_DISPLAY_ON_CLICK_ constants.
-
getAutoPlayTimer
@NonNull public java.lang.Integer getAutoPlayTimer()
- Returns:
- The number of seconds to wait before playing the next related video in your content list. Set to 0 to have your next related content to play immediately.
-
getAutoplayMessage
@Nullable public java.lang.String getAutoplayMessage()
- Returns:
- A custom message that appears during autoplay.
-
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 RelatedConfig parseJson(org.json.JSONObject json) throws org.json.JSONException
- Throws:
org.json.JSONException
-
parseJson
public static RelatedConfig parseJson(java.lang.String jsonStr)
-
-