Created
April 8, 2013 05:26
-
-
Save darkredz/5334409 to your computer and use it in GitHub Desktop.
Play Youtube Video Inline within webpage (iOS iPhone) using UIWebView ANE for Adobe AIR
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> | |
<body> | |
<div id="player"></div> | |
<script> | |
var tag = document.createElement('script'); | |
tag.src = "//www.youtube.com/iframe_api"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | |
var player; | |
function onYouTubeIframeAPIReady() { | |
player = new YT.Player('player', { | |
height: '390', | |
width: '640', | |
videoId: 'u1zgFlCw8Aw', | |
playerVars: { | |
playsinline: 1 | |
} | |
}); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment