Tagged: video
-
AuthorPosts
-
June 2, 2014 at 12:52 pm #273214
Hi,
I have a full screen slider with an autoplay vimeo video, and all is fine.
However I would like the video to stop when the user scrolls away from it. Is there some way of achieving it?
We could write some JS code for it, but we are not sure what command to use to play/stop the video.
Can you help?
Cheers.June 2, 2014 at 6:10 pm #273379Hey!
You could try something like:
http://stackoverflow.com/questions/6145990/how-to-stop-a-vimeo-video-with-jqueryCheers!
JosueJune 3, 2014 at 1:41 pm #273870Hi,
Thanks for your help.
Where we are struggling is the video source, meaning we do not know what to use as a iframe ID. We have tried all sorts of things, but the console reports it as undefined.
The video is at the top of the following webpage:http://www.loyalzoo.com/business/
Would you be able to help as to what id to use to stop that video? Once we know how to stop it, we can then generate the code to trigger it when the user scrolls down the page.
Thanks.June 3, 2014 at 5:29 pm #274000Hi,
Try:
jQuery("#fullscreen_slider_0 iframe");
Best regards,
JosueJune 4, 2014 at 12:03 pm #274440Thanks! With that command we are now able to stop the video when the user scrolls down the page. The only little issue now is that when we scroll back up, the video doesn’t restart automatically. The user needs to click twice on it to restart it.
Is there a command we could use to just “pause” the video, and one to “resume” it? Do we need to import the Vimeo APIs for that? Or is there an easier way?
Many thanks.June 4, 2014 at 4:48 pm #274552Hey!
I think this post: http://stackoverflow.com/a/12932722 will give you a starting point. Probably you also need to load the froogaloop2.min.js file which contains the api code.
Best regards,
PeterJune 5, 2014 at 4:31 pm #275196Great, thanks for the tip! We made it work as intended!
You can see the result at:http://www.loyalzoo.com/business/
Cheers! ;-)
June 5, 2014 at 4:57 pm #275206Great result, can you share it here if you want :)
Best regards,
JosueJune 5, 2014 at 5:23 pm #275226Done, many thanks Josue.
-
AuthorPosts
- The topic ‘How to auto-stop a vimeo video in the full-screen slider?’ is closed to new replies.
