-1
我寫了jQuery代碼來暫停和播放視頻。這裏我使用了embed
標籤(而不是video
標籤)。它在Chrome中工作,但不在Firefox中。關於滾動視頻暫停和使用javascript代碼
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");
}
});
});
});
我已經使用WordPress插件,即只使用嵌入標記 – vasudev 2014-10-17 11:27:33