var au=document.getElementsByTagName("video");
for(var i=0;i<au.length;i++){
    au[i].addEventListener("playing", function(){
        var this1=this;
        this.play();
        for(var b=0;b<au.length;b++){
            var this2=au[b];
            if(this1!==this2){
                this2.pause();
            }
        }
    });
}

 

posted on 2019-02-15 11:46  初见初心  阅读(1227)  评论(0编辑  收藏  举报