I have written jQuery code to pause and play a video. Here I have used the embed
tag (not the video
tag). It's working in Chrome but not in Firefox.
jQuery( document ).ready(function(){
jQuery( document ).scroll(function() {
jQuery(".entry-content .wonderplugingallery").each(function(index){
var eTop = jQuery('.entry-content .html5gallery-container-'+index).offset().top;
var topy = eTop - jQuery(window).scrollTop();
if(topy>80 && topy<340){
jQuery(".html5gallery-container-"+index+" .html5gallery-video-play-"+index).trigger("click");
jQuery(".html5gallery-container-"+index+" .html5boxPlayPause .html5boxPlay").trigger("click");
}else{
jQuery(".html5gallery-container-"+index+" .html5boxPlayPause .html5boxPause").trigger("click");
}
});
});
});