-
Hi,
I’d like to have 2 videos which play on mouseover and pause when you stop hovering.
Is it possible to do it with Flowplayer?Many thanks,
Kind Regards
Foliovision › Forums › FV Player › How to … › Play video on mouse hover and pause on mouseout
Hello Chenille,
this would be possible. We have done a similar feature for one of our clients, but it’s depending on the page scroll position – the video which is in the center plays, as soon as you scroll away it gets paused.
The key to success here is to have the videos auto preload and then it’s easy to hook in play() action on the right JavaScript event: https://foliovision.com/player/api-programming
We will discuss this feature in our team, perhaps we would like to make it a part of the plugin.
Thanks,
Martin
Hello Teri,
a simple code snippet like this could make this work:
jQuery('.flowplayer').each( function() { var api = jQuery(this).data('flowplayer'); jQuery(this).hover( function() { api.load(); }, function() { api.pause(); }); });
However if loading a single video takes say 2 seconds, then this feature is useless.
So we would have to perfect the video preloading. That would be a problem for Vimeo a bit, it might put a lot more load on the server.
And also, perhaps the videos should be paused and not stopped when hovering to play some other video.
So doing this can quickly get quite difficult.
Thanks,
Martin
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie allow you to log in and download your software or post to forums.
We use the WordPress login cookie and the session cookie.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.
We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.
Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.
Please enable Strictly Necessary Cookies first so that we can save your preferences!