Skip to content

Instantly share code, notes, and snippets.

@pupunzi
Last active November 26, 2015 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pupunzi/02a31481eb7c59490fd1 to your computer and use it in GitHub Desktop.
Save pupunzi/02a31481eb7c59490fd1 to your computer and use it in GitHub Desktop.
Random YTPlayer video
<script>
var videos = ["VuaJAgx0x_4", "3ovA7zeviRo", "u9k1FaMIYTs", "bkCg84XgBUg", "UJQmV8aPNao"];
var rndVideo = videos[Math.floor(Math.random() * videos.length)];
</script>
<div class="player" data-property="{videoURL:rndVideo,containment:'body',autoPlay:true, mute:true, startAt:0,opacity:1,ratio:'4/3', addRaster:true}">My video</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment