Created
December 18, 2014 21:16
-
-
Save metaColin/891f495b26ffc031fcb7 to your computer and use it in GitHub Desktop.
All your base are belong to us!
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>All Your Base</title> | |
<link rel="stylesheet" href="style.css"> | |
<style type="text/css"> | |
*{ | |
margin: 0; | |
} | |
html, body{ | |
width: 100%; | |
height: 100%; | |
position: relative; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="player" style="position: fixed; z-index: -99; width: 100%; height: 100%"> | |
</div> | |
<script> | |
var video = 'FVsijmCFs50'; // youtube id | |
var tag = document.createElement('script'); | |
tag.src = "http://www.youtube.com/player_api"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | |
var player; | |
function onYouTubePlayerAPIReady() { | |
player = new YT.Player('player', { | |
playerVars: { | |
'autoplay': 1, | |
'controls': 0, | |
'showinfo': 0, | |
'autohide':1, | |
'loop': 1, //requires playlist | |
'playlist': video //required for loop | |
// 'wmode':'opaque' | |
}, | |
videoId: video, | |
events: { | |
'onReady': onPlayerReady} | |
}); | |
} | |
function onPlayerReady(event) { | |
event.target.mute(); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment