你好,由于某种原因,当我用Jquery无限滚动向下滚动时,下一页的Video.js播放器变成了一个普通的html5播放器。黑莓( http://orgasmal.com/ )
奇怪的是,当播放器单独工作时,它工作得很好。http://orgasmal.com/test/如果有帮助的话,下面是播放器的代码:
<video id="ex2" class="video-js vjs-default-skin"
controls preload="auto"; loop data-setup='{"example_option":true}'>
<source src="http://codmemes.com/video/test.mp4" type='video/mp4' />
</video>
<script>_V_("ex2", {}, function(){
var myPlayer = this;
myPlayer.size(640,600);
myPlayer.play();
});</script>
function custom_infinite_scroll_js() {
if( ! is_singular() ) { ?>
<script>
var infinite_scroll = {
loading: {
img: "http://codmemes.com/wp-content/uploads/2013/03/27-1.gif",
msgText: "<?php _e( 'Loading More People...', 'custom' ); ?>",
finishedMsg: "<?php _e( 'Shit, you just hit the bottom of the internet.', 'custom' ); ?>"
},
"nextSelector":".nav-previous a",
"navSelector":".navigation",
"itemSelector":".box",
"contentSelector":".icontent"
};
jQuery( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll );
</script>
<?php
}
}
add_action( 'wp_footer', 'custom_infinite_scroll_js',100 );发布于 2013-04-03 06:45:56
当通过无限滚动插件插入新视频时,您可能需要重新初始化video.js (我看不到确切的代码,因为它被缩小了)
尝试将video.js代码(如上所示)放在一个命名函数中,并在插入新的滚动内容时调用该函数
https://stackoverflow.com/questions/15775260
复制相似问题