Posted By

dottDesign on 04/02/11


Tagged

textmate mobile iphone YouTube


Versions (?)

iPhone Youtube Embed Code


 / Published in: Other
 

  1. <HEAD>
  2. <script>
  3. var agent=navigator.userAgent.toLowerCase();
  4. var is_iPhone = (agent.indexOf('iphone')!=-1);
  5. </script>
  6. </HEAD>
  7.  
  8.  
  9. <BODY>
  10. <script>
  11. if (is_iPhone){
  12. document.write('<embed src="http://www.youtube.com/v/YOUTUBEID&hl=en&fs=1&rel=0&showinfo=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="50%"></embed>');
  13. }else{
  14. document.write('You must have the Flash plugin to see this content');
  15. }
  16. </script>
  17. </div>
  18. <script>
  19. swfobject.embedSWF("http://www.youtube.com/v/YOUTUBEID&hl=en&fs=1", "youtubeContent", "562", "341", "8");
  20. </script>
  21. </BODY>

Report this snippet  

You need to login to post a comment.