Created
April 4, 2014 16:45
-
-
Save kixorz/9978508 to your computer and use it in GitHub Desktop.
YouTube API experiment
This file contains hidden or 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></title> | |
<script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="ytapiplayer">You need Flash player 8+ and JavaScript enabled to view this video.</div> | |
<script type="text/javascript"> | |
/* | |
https://developers.google.com/youtube/js_api_reference#EventHandlers | |
*/ | |
function onYouTubePlayerReady( playerId ) { | |
console.log( "youtube loaded", playerId ); | |
}; | |
var videoId = ""; | |
var params = { allowScriptAccess: "always" }; | |
var atts = { id: "bossplayer" }; | |
swfobject.embedSWF( "http://www.youtube.com/v/" + videoId + "?enablejsapi=1&playerapiid=bossplayer&version=3", "ytapiplayer", "425", "356", "8", null, null, params, atts); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment