Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Stop nivo-slider while jw-player playing


Hi folks,
I have a site with nivo-slider and a video in jw-player and i need to pause nivo.slider animation while the video is playing.
I can stop the nivo-slider by "jQuery('#slider').data('nivoslider').stop();" and start it again by "jQuery(#slider').data('nivoslider').start()".
The question is: Where do i put these lines to stop nivo slider while video is playing and start it again when video stops?

Thank you very much for any advance.

(the site is testcms.hespro.cz)

3 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

I have not used this specific slider before, but if you want to email me, I used the player in a similar way which does something similar, maybe it will help you – ethan [at] longtailvideo [dot] com

JW Player

User  
0 rated :

Problem solved...

The code i used is:

jQuery(document).ready(function(){jwplayer().onPlay(function() {jQuery('.nivo-slider').data('nivoslider').stop();});});

jQuery(document).ready(function(){jwplayer().onPause(function() {jQuery('.nivo-slider').data('nivoslider').start();});});

jQuery(document).ready(function(){jwplayer().onIdle(function() {jQuery('.nivo-slider').data('nivoslider').start();});});

In drupal it is:

drupal_add_js("jQuery(document).ready(function(){jwplayer().onPlay(function() {jQuery('.nivo-slider').data('nivoslider').stop();});});", array('type' => 'inline', 'weight' => 101));

drupal_add_js("jQuery(document).ready(function(){jwplayer().onPause(function() {jQuery('.nivo-slider').data('nivoslider').start();});});", array('type' => 'inline', 'weight' => 101));

drupal_add_js("jQuery(document).ready(function(){jwplayer().onIdle(function() {jQuery('.nivo-slider').data('nivoslider').start();});});", array('type' => 'inline', 'weight' => 101));

in theme's template.php

Ethan Feldman

JW Player Support Agent  
0 rated :

That you got it, thanks for sharing.

This question has received the maximum number of answers.