I have a slideshow that shows videos. It will cycle through the videos just fine. However, when a user clicks on the video, and it starts playing, the slideshow will cycle on to the next item, despite the fact that the video is playing. How can this be fixed?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Matt B’s picture

Version: 5.x-1.0-beta1 » 6.x-1.0-beta2

Same issue on v6.x-1,0-beta2

redndahead’s picture

Version: 6.x-1.0-beta2 » 6.x-2.x-dev

Bumping to 2.x this will need to get looked at. Maybe we can pause the slide show when the slide gets clicked.

codycraven’s picture

I can confirm this for 6.x-2.x.

Pausing the slide show when slide is clicked on sounds like a good option.

Please note that this bug causes the slideshow to be unusable with videos.

redndahead’s picture

Priority: Normal » Critical

Moving to critical as it's imperative to fix this before release.

redndahead’s picture

Here is some jquery for me to look at when I get back to this. If someone wants to test this jquery in firebug to see if it works for you then that would be great. You'll need to match the ID's to your slideshow.

$('#views_slideshow_singleframe_teaser_section_1').click(function() { 
    $('#views_slideshow_singleframe_teaser_section_1').cycle('pause');
    $('#views_slideshow_singleframe_playpause_1').unbind('click');
    $('#views_slideshow_singleframe_playpause_1').click(function() {
      $('#views_slideshow_singleframe_teaser_section_1').cycle('resume');
      $('#views_slideshow_singleframe_playpause_1').text(Drupal.t('Pause'));
      return false;
    });
    $('#views_slideshow_singleframe_playpause_1').text(Drupal.t('Resume'));
});
redndahead’s picture

Status: Active » Needs review
FileSize
6.3 KB

This patch should take care of it. Would love to hear feedback. It required me to completely override the pause on hover functionality in jquery cycle. The problem was if you had pause on hover enabled and you paused the slideshow on click then move your mouse off of the slideshow it would restart the slideshow because you left the hover. So testing is really important on this one.

redndahead’s picture

By the way this adds an option to the settings form to pause on click.

redndahead’s picture

Status: Needs review » Fixed
FileSize
12.65 KB

This patch was committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

reflectiondigital’s picture

Version: 6.x-2.x-dev » 6.x-2.0
Status: Closed (fixed) » Needs work

This still isn't working for me. In Firebug I get 'viewsSlideshowPause(settings) not defined' when I click a slide with Pause on Click turned on. Pause on Hover does work.

redndahead’s picture

Well crap...Simple fix just pissed that it's there.

redndahead’s picture

Status: Needs work » Needs review
FileSize
888 bytes

Here is the patch. Please post if it worked for you.

redndahead’s picture

Status: Needs review » Fixed

This has been committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

reflectiondigital’s picture

Version: 6.x-2.0 » 6.x-2.1

Still got the 'viewsSlideshowPause(settings) not defined' in Firebug until I changed the file contrib/views_slideshow_singleframe/views_slideshow.js on line 109

viewsSlideshowPause(settings);  

should be

viewsSlideshowSingleFramePause(settings);
reflectiondigital’s picture

Status: Closed (fixed) » Active

Also, this fix does not work when using Embedded Media Thumbnail when the video view format is set to "Thumbnail -> Preview/Full size video inline replacement"

I think it may be because when the thumbnail is replaced by the embedded video, it's as if a new slide is loaded so pause on click behavior no longer applies and the next slide loads as the video is playing.

redndahead’s picture

Status: Active » Fixed

ok committed the fix to pause issue. Not sure why it would start up again even if it reloads the slide. It seems there would have to be a call to restart the slideshow somewhere. Can you open a new issue on the Embedded Media Thumbnail issue and post if you have a site that I can look at.

Thank you

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.