Float on scroll


Keeps the player visible when the original player location is scrolled out of view by minimizing it to a corner of the screen

On devices in portrait orientation, the player becomes fixed to the top of the page using its original dimensions.

When floating, the viewer can drag the player to reposition it. This functionality is disabled during ad playback.

By default, adding an empty floating object enables the floating player functionality and also sets dismissible: true.

Use the following CSS classes to customize the floating player:

You can also use the floating API method to create custom floating timing.

🚧

Important

Float on scroll cannot be used with a player that is embedded in an iframe.

jwplayer("myElement").setup({
  "playlist": "https://cdn.jwplayer.com/v2/playlists/{playlist_id}",
  ...
  "floating": {
    "dismissible": true
  }
});
PropertyDescriptionDefault
dismissible booleanPermits or prohibits closing the floating player

true: The floating player can be closed by a viewer.

false: The floating player cannot be closed by a viewer.
true
mode 8.17.0+ stringTells the player how the floating behavior should operate

Possible values include the following:

notVisible: Begin floating when the player has scrolled off screen and stop floating when it scrolls back onscreen. On mobile devices, floating is not activated if the viewer scrolls above the player on the page (only below it).

never: Never float the player.

always: Always float the player.
notVisible
showTitle booleanDetermines if the video title is displayed with the floating player close (X) button

Possible values:

false: (Default) The video title is not displayed on the external close bar.

true: The video title is displayed on the external close bar.
false