Setup Options

These are the options for configuring the layout and playback behavior of a player. Each is placed directly into the setup of the player.


Appearance

Property Description
aspectratio string Maintains proportions when width is a percentage

This value will not be used if the player is a static size. Must be entered in ratio x:y format.
controls boolean Whether to display the video controls (control bar and display icons)

Default: true
displaydescription boolean Configures if the description title of a media file should be displayed

Default: true
displayHeading 8.6.0+ boolean (Outstream only) Controls if heading above the outstream player is displayed

Possible values:
  • false: (Default) No heading is shown
  • true: Heading is shown with default text, Advertisement
Use intl.{lang}.displayHeading to customize or localize text.
displayPlaybackLabel 8.6.0+ boolean Enables call-to-action text beneath the play button on the player idle screen

When set to true, you can potentially see up to a 5% increase in the number of times viewers click the play button to watch a video.

The default call-to-action text is Play. You can also localize this message for your viewers.

Default: false
displaytitle boolean Configures if the title of a media file should be displayed

Default: true
height number Desired height of the video player (in pixels)

This property should be omitted when aspectratio is defined.

Default: 360
horizontalVolumeSlider 8.18.4+ boolean Displays the volume slider horizontally within the control bar

If the player is in audio mode, a horizontal slider will always be displayed.

By default, the volume slider is displayed as a vertical slider above the control bar.

Default: false
nextUpDisplay boolean Configures whether the Next Up modal is displayed
qualityLabels array By default, the JW Player will set video quality levels using information from the manifest files. Use this configuration option to apply a custom quality label to a desired bandwidth in kbps, works for HLS and DASH.

Example:
qualityLabels:{"2500":"High","1000":"Medium"}
renderCaptionsNatively 8.0.1+ boolean (Chrome and Safari only) Determines if the renderer of the browser or of the player is used to display captions

Possible values:
  • true: (Safari default) Captions render using the renderer of the browser.
  • false: (Chrome default) Captions render using the renderer of the player.
See also: captions
stretching string Resize images and video to fit player dimensions

Possible values:
  • uniform: (Default) Fits JWP player dimensions while maintaining aspect ratio
  • exactfit: Will fit JWP player dimensions without maintaining aspect ratio
  • fill: Will zoom and crop videoΒ to fill dimensions,Β maintaining aspect ratio
  • none: Displays the actual size of the video file with black borders
width number | string Desired width of your video player (in pixels or percentage)

Default: 640


Behavior

Property Description
aboutlink stringCustom URL to link to when clicking the right-click menu

Default: https://www.jwplayer.com/learn-more
abouttext stringCustom text to display in the right-click menu
allowFullscreen boolean 8.22.0+When set to false, disables fullscreen functionality in the player including tapping, clicking, keyboard shortcuts, and API access

To re-enable, use setAllowFullscreen(allowFullscreen).

Default: true
autostart boolean | stringDetermines whether the player attempts to begin playback automatically when a page is loaded

Possible Values:
  • false: (Default) Autostart disabled
  • true: Autostart enabled
  • viewable: Autostart when 50% of the player is viewable
defaultBandwidthEstimate number 8.3.0+When set, suggests an initial bandwidth estimate (in bits per second) which overrides the default bandwidth estimate of the player for new viewers to your site

Use case: New users to your site may experience low-quality video for several seconds before the quality adapts to the connection speed at which content is delivered. This speed may be limited by their connection speed. In this case, you would want to confirm that the majority of your viewers have fast connections.

🚧

Since this property sacrifices player performance for video quality, it is strongly recommended not to set this property. The player is optimized to select the best bandwidth after several seconds.


Default: 50000
fullscreenOrientationLock string 8.28.0+(Android) Enables player to rotate in a mobile web view as a viewer rotates a mobile device

Possible Values:
  • landscape: (Default) Locks to a landscape orientation, readjusting at a 180ΒΊ turn of the device
  • none: Adapts orientation to fullscreen based on the device's position
  • portrait: Locks to portrait orientation, readjusting at 180ΒΊ turn of the device
generateSEOMetadata boolean 8.26.1+Enables Google SEO Optimization

Default: false
liveSyncDuration number 8.12.0+Defines the distance from the live edge in seconds in the following scenarios:
  • The player attempts to start a live or DVR stream.
  • A user clicks the Live button to return to the live content of the stream.

This property can accept any value between 5-30. Leave blank in 8.19.0+ for the player to determine target latency based on the stream.

Default: 25 <8.19.0
mute boolean Defines if the player should be muted during playback

If a user overrides this property, the user's action will persist for the duration of the user session. For example, if all players are configured with mute: true and a user unmutes a player, each subsequent player that the user encounters will start unmuted.

Default: false
nextupoffset number | string 8.9.0+Configures when the Next Up card displays during playback

A positive value is an offset from the start of the video. A negative value is an offset from the end of the video. This property can be defined either as a number (-10) or a percentage as a string ("-2%")

Default: -10
pipIcon string 8.21.0+Controls the Picture in Picture icon

Possible values:
  • enabled: (Default) Adds a Picture in Picture icon and right click menu options to supported desktop browsers only
  • disabled: Removes the icon

The icon can also be hidden with CSS

Default: enabled
playbackRateControls boolean Whether to display a settings menu to adjust playback speed

When true, the menu is displayed with predefined options of 0.5x, 1x, 1.25x, and 2x. An array can be passed to customize the menu options using playbackRates.

πŸ“˜

This feature is not currently supported in Android with HLS streams.

Default: false
playbackRates array 8.0.0+Custom playback rate options to display in the settings menu

Default: [0.25, 0.75, 1, 1.25]
playlist array | string Media to play in the player

See: Playlists
playlistIndex number 8.15.0+Index of the item within a playlist to start playback

Within the playlist, the first index is 0.

If the playlistIndex value is negative, the index starts counting from the end of the playlist. A negative value cannot exceed the absolute number of playlist items. For example, in a playlist of 5 items, "playlistIndex": -5 is the lowest acceptable negative number.

This property applies to JSON, RSS, and array playlists.
repeat boolean Determines if the player loops content after a playlist completes

Default: false


Rendering and Loading

Property Description
base stringConfigures an alternate base path for skins and providers

Default: /
flashplayer < 8.19.0 string
As per Adobe, Flash Player is no longer supported.
Specifies an alternate directory of jwplayer.flash.swf

Default: /
hlsjsdefault booleanMakes HLSjs the default provider when using Chrome for Android

Disable this property to use the browser's default provider.

Default: true
liveTimeout 8.1.9+ numberConfigures how a stalled live manifest is handled

This property accepts a positive number in seconds, but values between 1-10 are ignored. Set this property to 0 to configure a stream to never time out.

The player will continue requesting manifests until it times out. If a live manifest does not update after being requested for longer than liveTimeout, the stream will end with an error event. If you want a stream to end immediately, include an end tag in the manifest.

This configuration option only handles stalled manifests, not issues with segment loading. A chunk that results in a 404, for example, will still error out.

Default:
  • liveTimeout defaults to a value equal to three times (3x) the targetDuration value defined in the manifest.

    πŸ“˜

    For more information on targetDuration, see the HLS spec.

  • For Safari,liveTimeout defaults to 30.
loadAndParseHlsMetadata booleanTo enable HLS playback in Safari to trigger the same metadata events that are triggered during HLS playback in Chrome, the player will make additional requests to HLS playlists provided they contain PROGRAM-DATE-TIME tags that the player can use to embed timed metadata.

Possible values:
  • true: (Default) The player loads and parses the playlist manifest as it is loaded by Safari and synchronizes the results with media playback. This will also result in multiple manifest requests.
  • false: Prevents the player from sideloading live HLS manifests to parse out-of-band manifest metadata that Safari does not expose like DATERANGE, CUE-OUT, CUE-IN, and DISCONTINUITY tags.
preload stringTells the player if content should be loaded prior to playback

This is useful for faster playback speed or if certain metadata should be loaded prior to playback.

Possible values:
  • metadata: (Default) Loads the manifest and buffers a maximum of one segment of media for HLS and Dash streams
  • auto: Loads the manifest and buffers approximately 30 seconds worth of media segments
  • none: No content preloaded. This option is recommended if you are concerned about excess content usage.
showUIWhen 8.32.0+ stringTells the player when to show the player UI

Possible values:
  • onReady: (Default) Show the UI when the player is loaded
  • onContent: Hide the player UI until ad or video content is ready to play