Skip to content

Instantly share code, notes, and snippets.

@videoMonkey
Last active August 29, 2015 14:14
Show Gist options
  • Save videoMonkey/f4605fc181eecdc53ef5 to your computer and use it in GitHub Desktop.
Save videoMonkey/f4605fc181eecdc53ef5 to your computer and use it in GitHub Desktop.
biblesociety.ma
<div class="video-wrap">
<iframe id="bible-reading" width="950" height="530" border="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="">
</iframe>
<noscript>
<iframe id="bible-reading" src="//player.vimeo.com/video/74715762" width="950" height="530" border="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="">
</iframe>
</noscript>
</div>
<style>
.video-wrap {
position: relative;
width: 100%;
background: #000;
}
.video-wrap:before{
content: "";
display: block;
padding-top: 56.25%;
}
.video-wrap #bible-reading {
border: 0;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
</style>
<script type="text/javascript">
'use strict';
function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; }
var bibleReadings = [
'//player.vimeo.com/video/68753705',
'//player.vimeo.com/video/68751732',
'//player.vimeo.com/video/68751730',
'//player.vimeo.com/video/68689890',
'//player.vimeo.com/video/68675791',
'//player.vimeo.com/video/68675787',
'//player.vimeo.com/video/68675786'
],
rand = getRandomInt(0, bibleReadings.length);
document.getElementById('bible-reading').setAttribute('src',
bibleReadings[rand]);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment