Web Dev/JavaScript :: 자바스크립트

JavaScript :: Keep video play

HJPlumtree 2023. 5. 4. 22:46
var videos = document.getElementsByTagName("video");
for (var i = 0; i < videos.length; i++) {
  videos[i].addEventListener("pause", function(event) {
    event.preventDefault();
    this.play();
  });
}