Class RelatedConfig

  • All Implemented Interfaces:
    com.longtailvideo.jwplayer.utils.Jsonable

    public final class RelatedConfig
    extends java.lang.Object
    implements com.longtailvideo.jwplayer.utils.Jsonable
    • 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

    • 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 class java.lang.Object
      • toJson

        public org.json.JSONObject toJson()
        Specified by:
        toJson in interface com.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)