public final class RelatedConfig
extends java.lang.Object
implements com.longtailvideo.jwplayer.utils.Jsonable
Modifier and Type | Class and Description |
---|---|
static class |
RelatedConfig.Builder |
static interface |
RelatedConfig.RelatedDisplayMode |
static interface |
RelatedConfig.RelatedOnClick |
static interface |
RelatedConfig.RelatedOnComplete |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RELATED_DISPLAY_MODE_OVERLAY
DisplayMode StringDef
|
static java.lang.String |
RELATED_DISPLAY_MODE_SHELF |
static java.lang.String |
RELATED_ON_CLICK_LINK |
static java.lang.String |
RELATED_ON_CLICK_PLAY
OnClick StringDef
|
static java.lang.String |
RELATED_ON_COMPLETE_AUTOPLAY |
static java.lang.String |
RELATED_ON_COMPLETE_HIDE
OnComplete StringDef
|
static java.lang.String |
RELATED_ON_COMPLETE_SHOW |
Constructor and Description |
---|
RelatedConfig(RelatedConfig src) |
Modifier and Type | Method and 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(org.json.JSONObject json) |
static RelatedConfig |
parseJson(java.lang.String jsonStr) |
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() |
public static final java.lang.String RELATED_ON_COMPLETE_HIDE
public static final java.lang.String RELATED_ON_COMPLETE_SHOW
public static final java.lang.String RELATED_ON_COMPLETE_AUTOPLAY
public static final java.lang.String RELATED_DISPLAY_MODE_OVERLAY
public static final java.lang.String RELATED_DISPLAY_MODE_SHELF
public static final java.lang.String RELATED_ON_CLICK_PLAY
public static final java.lang.String RELATED_ON_CLICK_LINK
public RelatedConfig(RelatedConfig src)
public void setFile(java.lang.String file)
file
- (Required) Location of an RSS or JSON file containing a feed of related videos.public void setDisplayMode(java.lang.String displayMode)
displayMode
- Configure the recommendations user interface. Does not apply to manual playlists. Must be one of the RELATED_DISPLAY_MODE_ constants.public void setOnComplete(java.lang.String onComplete)
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.public void setOnClick(java.lang.String onClick)
onClick
- The behavior when a related video is selected. Must be one of the RELATED_DISPLAY_ON_CLICK_ constants.public void setAutoPlayTimer(java.lang.Integer timer)
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.public void setAutoPlayMessage(java.lang.String message)
message
- A custom message that appears during autoplay.public java.lang.String getFile()
@NonNull public java.lang.String getDisplayMode()
@NonNull public java.lang.String getOnComplete()
@NonNull public java.lang.String getOnClick()
@NonNull public java.lang.Integer getAutoPlayTimer()
@Nullable public java.lang.String getAutoplayMessage()
public java.lang.String toString()
toString
in class java.lang.Object
public org.json.JSONObject toJson()
toJson
in interface com.longtailvideo.jwplayer.utils.Jsonable
public static RelatedConfig parseJson(org.json.JSONObject json) throws org.json.JSONException
org.json.JSONException
public static RelatedConfig parseJson(java.lang.String jsonStr)