JS自动播放视频脚本:

var n = 0,j=0;    
 setInterval(function () {
        var video = document.querySelector("#J_prismPlayer").children[0]        
if (video.paused) {
          if (video.currentTime >= video.duration) {
            var next = document.querySelector(".next_button___YGZWZ");
            next.click();
				n++
				console.log('点击了'+n+'次下一节')

          } else {
            var btn = document.querySelector(".ant-btn-primary");
            if (btn) {
              btn.click();
					j++
				   console.log('点击了'+j+'次确定')

            } else {
              video.play();
					console.log('开始了')

            }
          }

        }
      }, 5000)
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐