Class PlayerConfig

java.lang.Object
com.jwplayer.pub.api.configuration.PlayerConfig

public final class PlayerConfig extends Object
Player configuration used to set up the player, contains all basic configuration attributes from XML custom attrs or the builder, along with Playlist and Advertising settings.
  • Field Details

    • STRETCHING_UNIFORM

      public static final String STRETCHING_UNIFORM
      Will fit JW Player dimensions while maintaining aspect ratio.
      See Also:
    • STRETCHING_FILL

      public static final String STRETCHING_FILL
      Will zoom and crop video to fill dimensions, maintaining aspect ratio.
      See Also:
    • STRETCHING_EXACT_FIT

      public static final String STRETCHING_EXACT_FIT
      Will fit JW Player dimensions without maintaining aspect ratio.
      See Also:
    • STRETCHING_NONE

      public static final String STRETCHING_NONE
      Displays the actual size of the video file with black borders.
      See Also:
    • THUMBNAIL_PREVIEW_TEXT

      public static final int THUMBNAIL_PREVIEW_TEXT
      Will display the text in the thumbnail preview
      See Also:
    • THUMBNAIL_PREVIEW_IMAGE

      public static final int THUMBNAIL_PREVIEW_IMAGE
      Will display the image in the thumbnail preview
      See Also:
    • THUMBNAIL_PREVIEW_TEXT_AND_IMAGE

      public static final int THUMBNAIL_PREVIEW_TEXT_AND_IMAGE
      Will display the text and the in the thumbnail preview
      See Also:
    • DEFAULT_ALLOW_CROSS_PROTOCOL_REDIRECTS

      public static final boolean DEFAULT_ALLOW_CROSS_PROTOCOL_REDIRECTS
      Configuration values
      See Also:
    • mMute

      public final Boolean mMute
    • mAutostart

      public final Boolean mAutostart
    • mNextUpOffset

      public final Integer mNextUpOffset
    • mNextUpOffsetPercentage

      public final Integer mNextUpOffsetPercentage
    • mRepeat

      public final Boolean mRepeat
    • mDisplayTitle

      public final Boolean mDisplayTitle
    • mDisplayDescription

      public final Boolean mDisplayDescription
    • mThumbnailPreview

      public final Integer mThumbnailPreview
    • mStretching

      public final String mStretching
    • mPreload

      public final Boolean mPreload
    • mPlaylist

      public final List<PlaylistItem> mPlaylist
    • mPlaylistUrl

      public final String mPlaylistUrl
    • mPlaylistIndex

      public final Integer mPlaylistIndex
    • mPlayerId

      public final String mPlayerId
    • mRelatedConfig

      public final RelatedConfig mRelatedConfig
      Configuration subobjects
    • mAdvertisingConfig

      public final AdvertisingConfig mAdvertisingConfig
    • mUiConfig

      public final UiConfig mUiConfig
    • mLogoConfig

      public final LogoConfig mLogoConfig
    • mPlaybackRates

      public final double[] mPlaybackRates
      Playback Rates
    • mAllowCrossProtocolRedirects

      public final Boolean mAllowCrossProtocolRedirects
      Enables/disables cross-protocol redirects handling within ExoPlayer.
    • mUseTextureView

      public final boolean mUseTextureView
      Enables/disables using TexttureView as the view where video content is rendering.
    • CREATOR

      public static final <any> CREATOR
  • Method Details

    • useTextureView

      public boolean useTextureView()
      Returns:
      whether default view where video content should be rendered is set to android.view.TextureView
    • getPlayerId

      public String getPlayerId()
      Returns:
      Player's identifier.
    • getMute

      public boolean getMute()
      Returns:
      Configures if the player should be muted during playback.
    • getAutostart

      public boolean getAutostart()
      Returns:
      Whether the player will attempt to begin playback automatically when a page is loaded.
    • getNextUpOffset

      public int getNextUpOffset()
      Returns:
      Configures when the Next Up card displays when transitioning between playlist items. A positive value is an offset from the start of the video. A negative number is an offset from the end of the video.
    • getNextUpOffsetPercentage

      public int getNextUpOffsetPercentage()
      Returns:
      Configures when the Next Up card displays during playback based on the percentage of the duration. A positive value is a percentage offset from the start of the video. A negative number is a percentage offset from the end of the video 0 means this property was not set i.e. setting the value to 50 will result in the Next Up card showing when half of the video is played. Setting the value to -25 will result in the Next Up card showing when playback reaches 75% of the video duration. Takes precedence over nextupOffset if both properties are set.
    • getRepeat

      public boolean getRepeat()
      Returns:
      Configures if the player should loop content after a playlist completes.
    • getDisplayTitle

      public boolean getDisplayTitle()
      Returns:
      Configures if the title of a media file should be displayed.
    • getDisplayDescription

      public boolean getDisplayDescription()
      Returns:
      Configures if the description title of a media file should be displayed.
    • getThumbnailPreview

      public Integer getThumbnailPreview()
      Returns:
      Configures if the thumbnail preview above the seekbar when is seeking through a video should be displayed.
    • getStretching

      public String getStretching()
      Returns:
      Resize images and video to fit player dimensions. Must be one of the STRETCHING_ constants.
    • getPreload

      public boolean getPreload()
      Returns:
      Tells the player if content should be loaded prior to playback. Useful for faster playback speed.
    • getPlaylist

      public List<PlaylistItem> getPlaylist()
      Returns:
      The playlist of media to play in your player.
    • getPlaylistUrl

      public String getPlaylistUrl()
      Returns:
      The playlist URL to play in your player.
    • getPlaylistIndex

      public Integer getPlaylistIndex()
      Returns:
      The playlist index configured to start with in your playlist.
    • getRelatedConfig

      public RelatedConfig getRelatedConfig()
      Returns:
      The related plugin configuration to apply to your player.
    • getAdvertisingConfig

      public AdvertisingConfig getAdvertisingConfig()
      Returns:
      The advertising configuration and schedule to apply to your player.
    • getUiConfig

      public UiConfig getUiConfig()
      Returns:
      The uiConfig configuration to apply to your player.
    • getLogoConfig

      public LogoConfig getLogoConfig()
      Returns:
      The logo configuration which is overlayed on the player.
    • getPlaybackRates

      public double[] getPlaybackRates()
      Returns:
      Playback rates values
    • getAllowCrossProtocolRedirects

      public boolean getAllowCrossProtocolRedirects()
    • describeContents

      public int describeContents()
    • writeToParcel

      public void writeToParcel(Parcel dest, int flags)