www说
var cur_video; var setup = function(videoEl, options) { videoEl.bigPlayButton.controlTextEl_.textContent=videoEl.el().getAttribute('duration'); videoEl.on("play",function(){ if(cur_video && cur_video != videoEl)cur_video.pause(); cur_video = videoEl; }) videoEl.on("pause",function(){ if(cur_video==videoEl)cur_video==null; }) }; videojs.hook('setup', setup); var videos = [ videojs('example_video_1'), videojs('example_video_2'), videojs('example_video_3') ]奉上一个demo吧,以后如果有人遇到可以参考。