Created
February 25, 2020 04:04
-
-
Save karx/923401e7ab38753d988ce9accff1257c to your computer and use it in GitHub Desktop.
Document onload then play video. Not recommended ‼
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', function(){ | |
// pushThePlayButton(); | |
setTimeout(pushThePlayButton, 2600); | |
}, false) | |
function pushThePlayButton() { | |
let vids = document.getElementsByClassName("video-autoplay-pusher"); | |
console.log(vids); | |
[...vids].forEach(element => { | |
console.log(element); | |
element.play(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment