Last active
March 15, 2017 13:51
-
-
Save soulflyman/4d84fb2b16b3e7bc0657e650e9cc18c3 to your computer and use it in GitHub Desktop.
soup.io videos autoplay
This file contains hidden or 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
function videoAutoplay() | |
{ | |
var videos = document.getElementsByTagName('video'); | |
for(var i = 0; i < videos.length ; i++) | |
{ | |
videos[i].muted = true; | |
videos[i].autoplay = true; | |
videos[i].loop = true; | |
} | |
} | |
document.addEventListener("DOMContentLoaded",function() | |
{ | |
videoAutoplay(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment