是)我有的 :
<script>
function stopvideos()
{
$(".video-js")[0].player.pause();
//$("#example_video_0").pause();
//$("#example_video_0").get(0).pause();
//jQuery(".video-js")[0].player.pause();
//$("#example_video_0").trigger("pause");
//$("#example_video_0").player.pause();
// $('#example_video_1').remove();
/*VideoJS.DOMReady(function(){
var myPlayer = VideoJS.setup("example_video_0");
myPlayer.pause();
});
*/
}
</script>
<div id="animation-reel">
<a class="bClose" onclick="stopvideos();">x<a/>
<video id="example_video_0" class="video-js vjs-default-skin" controls preload="none" width="210" height="118"
poster="videos/video-js_poster.jpg"
data-setup="{}">
<source src="videos/animation.m4v" type='video/mp4' />
<!--<source src="peo_v10.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="videos/captions.vtt" srclang="en" label="English" />-->
</video>
</div>
我尝试了什么:
1. $(".video-js")[0].player.pause();
2. $("#example_video_0").pause();
3. $("#example_video_0").get(0).pause();
4. jQuery(".video-js")[0].player.pause();
5. $("#example_video_0").trigger("pause");
6. $("#example_video_0").player.pause();
7. $('#example_video_1').remove();
8. VideoJS.DOMReady(function(){
var myPlayer = VideoJS.setup("example_video_0");
myPlayer.pause();
});
我想要的是 :
暂停视频点击模型关闭链接<a class="bClose" onclick="stopvideos();">x<a/>
提前致谢