Set one or more of the following video attributes after the player has already setup.
Set one or more of the following video attributes after the player has already setup.
setConfig({
"repeat": true,
"autostart": "viewable",
"mute": false,
"volume": 25
});
Property | Description | Default |
---|---|---|
aspectratio 8.10.0+ string Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | Maintains proportions when width is a percentage This property will not be used if the player has been configured with fixed dimensions. The value for this property must be entered in ratio x:y format. | - |
autostart string | When true , playback will start automatically on desktop devices or when the player is 50% visible on mobile devices. When set to viewable , playback will start automatically on desktop devices when the player is more than 50% visible in the active tab. | false |
height 8.10.0+ number | Desired height of your video player (in pixels) Should not be used with aspectratio . | 360 |
mute boolean | Toggles the player's mute attribute | false |
repeat boolean | When true , starts playing the first playlist item after the playlist completes | false |
stretching 8.10.0+ string | Resize images and video to fit player dimensions Β Β β’ uniform : Fits JW Player dimensions while maintaining aspect ratioΒ Β β’ exactfit : Fits JW Player dimensions without maintaining aspect ratioΒ Β β’ fill : Zooms and crops video to fill dimensions, maintaining aspect ratioΒ Β β’ none : Displays the actual size of the video file (Black borders) | uniform |
volume number | Sets the volume of the player between 1-100 | - |
width 8.10.0+ number | string | Desired width of your video player (in pixels or percentage) | 640 |