Javascript Video.js播放器不使用Jquery无限滚动

Javascript Video.js播放器不使用Jquery无限滚动,javascript,jquery,Javascript,Jquery,不知什么原因,当我使用Jquery无限滚动向下滚动时,下一页的Video.js播放器会变成普通的html 5播放器。(SFW) 奇怪的是,当玩家独自一人时,它的工作状态很好。(SFW)以下是玩家的代码,如果有帮助: <video id="ex2" class="video-js vjs-default-skin" controls preload="auto"; loop data-setup='{"example_option":true}'> <source src

不知什么原因,当我使用Jquery无限滚动向下滚动时,下一页的Video.js播放器会变成普通的html 5播放器。(SFW)
奇怪的是,当玩家独自一人时,它的工作状态很好。(SFW)以下是玩家的代码,如果有帮助:

 <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 );

_V_2;(“ex2”,{},函数(){
var myPlayer=this;
myPlayer.size(640600);
myPlayer.play();
});
函数自定义_无限_滚动_js(){
如果(!is_singular()){?>
变量无限滚动={
装载:{
img:“http://codmemes.com/wp-content/uploads/2013/03/27-1.gif",
msgText:“”,
finishedMsg:“
},
“下一个选择器”:“.nav上一个a”,
“导航选择器”:“.navigation”,
“项目选择器”:“.box”,
“内容选择器”:“.icontent”
};
jQuery(无限滚动.contentSelector).infinitescroll(无限滚动);

当通过无限滚动插件插入新视频时,您可能需要重新初始化video.js(我看不到确切的代码,因为它已缩小)


尝试将video.js代码(如上所示)放在一个命名函数中,并在插入新的滚动内容时调用该函数

嘿,谢谢你的建议,我尝试将播放器包装进去,但仍然没有骰子……我将在上面发布无限滚动代码,也许会有所帮助。