基本结构
<link href="video-js.css" rel="stylesheet" type="text/css"/> <script src="videojs-ie8.min.js"></script> <script src="video.js"></script> <video id="my-video" class="video-js vjs-default-skin my_video_1-dimensions vjs-fluid vjs-controls-enabled vjs-workinghover vjs-has-started vjs-paused vjs-user-inactive vjs-big-play-centered" controls preload="auto" data-setup="{}"> <source src="url.mp4" type='video/mp4'> </video>
切换源地址
var Player = videojs("video"); //初始化视频 Player.src(url); //重置video的src Player.load(url); //使video重新加载
暂停
player.pause();//js原生方法