Video is still playing when you scroll down so video is no more visible but is still playing

Mirra _ Posted in Component Development 2 years ago


thank you for this project, it is absolutely awesome!
I would like to discuss new feature.
When I play some video and scroll down or up (so I don't see the video anymore), it still plays.

Please, could you make it like:
When users scroll down or up, (so user will no longer see the content of the video which is playing) it would pause or stop the video?

Thank you for this project, it is absolutely AWESOME. :)

Byelorussian TC TRASH Replied 2 years ago

trouver le fichier js de vos integration iframe youtube vimeo etc et
Ajoutez cette méthode à votre script:

var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe !== null ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
if ( video !== null ) {
Appelez la fonction si nécessaire, en passant l'élément conteneur dans la fonction:

stopVideo( tab );

German Michael Zülsdorff Replied 2 years ago

You may contact
He's the right one for customizing things like that.