1 Reply Latest reply on Dec 17, 2012 2:22 PM by Dam4222

    video You tube

    nestormontoya
      how to embed a YouTube video into a container in Adobe Edge

      thank you very much

        • 1. Re: video You tube
          Dam4222 Level 1

          Hey nestormontoya,

           

          All you need to do is paste the following code into your compositionReady which can be found in the Stage Actions Code Panel:

           

           

          //make sure you have a container named vContainer, also in this case I used the vimeo embed code but it should work for YouTube as well. Just go to YouTube, find the video you want and click the share button then copy the embed code and past it below into your 'src'

           

          // insert code for mouse click here

          var youtubevid = $("<iframe/>");

          sym.$("vContainer").empty().append(youtubevid);

          youtubevid.attr('type','text/html');

          youtubevid.attr('width','600');

          youtubevid.attr('height','338');

          youtubevid.attr('src','http://player.vimeo.com/video/50560219?title=0&byline=0&portrait=0&badge=0" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> <p><a href="http://vimeo.com/50560219">Intro to AT&T AdWorks</a> from <a href="http://vimeo.com/adamperlis">Adam Perlis</a> on <a href="http://vimeo.com">Vimeo</a>.</p>');  // url/Video_Id

          youtubevid.attr('frameborder','0');       // 1 | 0

          youtubevid.attr('allowfullscreen','0');   // 1 | 0

          youtubevid.attr('preload','auto'); 

           

          Adam