Last active
February 22, 2016 00:43
-
-
Save moladukes/be913af35f0fe2add0ad to your computer and use it in GitHub Desktop.
Fullscreen Youtube Background
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
<script src="http://www.youtube.com/player_api"></script> | |
<div id="player"></div> |
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
var player; | |
function onYouTubePlayerAPIReady() { | |
player = new YT.Player('player', { | |
playerVars: { | |
'autoplay': 1, | |
'controls': 0, | |
'autohide': 1, | |
'wmode': 'opaque', | |
'showinfo': 0, | |
'loop': 1, | |
'mute': 1, | |
//'start': 15, | |
//'end': 110, | |
'playlist': 'NQKC24th90U' | |
}, | |
videoId: 'NQKC24th90U', | |
events: { | |
'onReady': onPlayerReady | |
} | |
}); | |
} | |
function onPlayerReady(event) { | |
event.target.mute(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment