280
edits
No edit summary |
(Autoplay MP4s with autoplay class) |
||
(10 intermediate revisions by one other user not shown) | |||
Line 104: | Line 104: | ||
$( createCollapseButtons ); | $( createCollapseButtons ); | ||
/* Autoplay videos with autoplay class */ | |||
// | var vids = document.getElementsByClassName("autoplay"); | ||
for(var i = 0; i < vids.length; i++){ | |||
vids[i].controls = true; | |||
vids[i].setAttribute("playsinline", ""); | |||
vids[i].muted = true; | |||
vids[i].autoplay = true; | |||
vids[i].loop = true; | |||
vids[i].play(); | |||
} | } |
edits