Skip to content

Instantly share code, notes, and snippets.

@darkredz
Created April 8, 2013 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save darkredz/5334409 to your computer and use it in GitHub Desktop.
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
<!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