Created
April 17, 2014 16:12
-
-
Save calzoneman/10995097 to your computer and use it in GitHub Desktop.
YouTube autohide controls bug
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> | |
<title>YouTube controls autohide bug</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<div id="ytapiplayer"></div> | |
<script src="https://www.youtube.com/iframe_api"></script> | |
<script src="player.js"></script> | |
</body> | |
</html> |
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 onYouTubeIframeAPIReady() { | |
PLAYER = new YT.Player("ytapiplayer", { | |
width: '640', | |
height: '400', | |
videoId: 'Wevh2d7nTUY', | |
playerVars: { | |
autohide: 1, | |
}, | |
events: { | |
onReady: function () { | |
beginTest(); | |
} | |
} | |
}); | |
} | |
function beginTest() { | |
PLAYER.playVideo(); | |
PLAYER.pauseVideo(); | |
setTimeout(function () { | |
PLAYER.playVideo(); | |
}, 3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment