This was created to satisfy my need for a fairly abstract/dynamic way to deal with JW Player events, in this case stopping it, without writing code in Swipper callbacks everytime I need something like this.
The goal was to be slide targeted and not just call a
jwplayer().stop() that can cause a UX problem by stopping any other player on the page.
How it works
Each time Swiper runs
onSlideChangeStart(), this plugin searches for any jwplayer instance in the previous slide and stops it, without messing with the code specified in the configuration for the
Just include the
swiper.jwplayer.min.js script file in your page after your Swiper script.
JW Player 6, 7
You can download the minified and source code from github https://github.com/codegaze/Swiper-JWPlayer.