For those of you who use JW Player with playlists, but are frustrated that a bug in JW6 has broken single finger scrolling on touch devices – I hope you consider this a workable solution.

Jeroen from LongTail Video has indicated that they will be including single-finger scrolling in JW Player 6.5, which by all accounts is slated for June 2013, but in the meantime he suggests you stay with JW 5.10.

JW Player 6.5 was released mid-June 2013 – and it still has no support for single finger scrolling of playlists on touch devices.

Maybe JW 6.6 will finally have it – which is due end-July/early August…

Update: September 2013
JW Player 6.6 does now support single finger scrolling of playlists on touch devices… however, the implementation is a bit strange.
It’s not a smooth scrolling effect. The playlist seems to scroll the height of the playlist viewport for each finger swipe… Which is fine on small playlists, but a nightmare on larger ones. Oh dear!


Whilst I’ve written an HTML Configuration library for JW Player, which includes a fix for single-finger scrolling, I appreciate that this could be considered too much of a deviation from the JavaScript only embed method many people use.

With this in mind, I’ve extracted the “iScroll bit” into a discreet library which provides single-finger scrolling to JS embedders with a minimum of fuss!

How to use

1) Download the touchScroll library.

You can get the touchScroll library here.

2) Load the library after JW player

Include a link to the touchScroll library in your page <HEAD> after the jwplayer.js library, for example:

<!-- JW Player Library -->
<script src="[/path/to/jwplayer]/jwplayer.js"></script>
<!-- touchScroll Library -->
<script src="[/path/to/touch-scroll]/jw6-touchscroll.min.js"></script>

Apply touchScroll to your players

In order to apply the touchScroll feature, you need to make a call to jwplayer.touchScroll(), passing the current player as a variable, but only once the playlist is ready.

This is achieved by attaching an event callback to your JW Player as follows:

var my_player = jwplayer("my_id").setup({...});
my_player.onPlaylist(function(){ jwplayer.touchScroll(this); });

The touchScroll() function takes an optional second argument which is the time to wait (in milliseconds) before trying to hook up touchScroll. This shouldn’t be necessary in the majority of cases, but depending on the number of other events attached to the player you may need to introduce a delay. Half a second delay (500) seems to work in the worst case scenarios.

Comments are closed.