Youtube with SWF object


/ Published in: JavaScript
Save to your folder(s)

For dynamic publishing without shitty markup


Copy this code and paste it in your HTML
  1. //Swfobject Youtube Embedded video
  2. var youTubeEmbed = function(){
  3. var atts = {};
  4. atts.id = "vid";
  5. swfobject.embedSWF('http://www.youtube.com/v/'+ytVideoID+"&hl=en&fs=1&rel=0&color1=0x000000&color2=0x2d2d2d&enablejsapi=1&playerapiid=ytplayer",
  6. "vid", "640px", "385px", "8", null, null, atts);
  7. };
  8.  
  9. if(ytVideoID != ''){
  10. youTubeEmbed();
  11. }
  12.  
  13.  
  14.  
  15.  
  16.  
  17. <script>
  18. var ytVideoID = "fzzjgBAaWZw";
  19. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.