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 classRelatedConfig.Builderstatic interfaceRelatedConfig.RelatedDisplayModestatic interfaceRelatedConfig.RelatedOnClickstatic interfaceRelatedConfig.RelatedOnComplete
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRELATED_DISPLAY_MODE_OVERLAYDisplayMode StringDefstatic java.lang.StringRELATED_DISPLAY_MODE_SHELFstatic java.lang.StringRELATED_ON_CLICK_LINKstatic java.lang.StringRELATED_ON_CLICK_PLAYOnClick StringDefstatic java.lang.StringRELATED_ON_COMPLETE_AUTOPLAYstatic java.lang.StringRELATED_ON_COMPLETE_HIDEOnComplete StringDefstatic java.lang.StringRELATED_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.StringgetAutoplayMessage()java.lang.IntegergetAutoPlayTimer()java.lang.StringgetDisplayMode()java.lang.StringgetFile()java.lang.StringgetOnClick()java.lang.StringgetOnComplete()static RelatedConfigparseJson(java.lang.String jsonStr)static RelatedConfigparseJson(org.json.JSONObject json)voidsetAutoPlayMessage(java.lang.String message)voidsetAutoPlayTimer(java.lang.Integer timer)voidsetDisplayMode(java.lang.String displayMode)voidsetFile(java.lang.String file)voidsetOnClick(java.lang.String onClick)voidsetOnComplete(java.lang.String onComplete)org.json.JSONObjecttoJson()java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
toJson
public org.json.JSONObject toJson()
- Specified by:
toJsonin 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)
-
-