1 Reply Latest reply on Oct 29, 2012 10:57 AM by loxfear

    Embed videos from Vimeo

    Kirch12

      Hi

       

      I got this code from Russ earlier, and it worked fine:

       

      Create the button and open the code panel for that button.  Create a click action.  Within the code panel, paste this:

       

      var youtubevid = $("<iframe/>");
      sym.$("vcontainer").empty().append(youtubevid);
      youtubevid.attr('type','text/html');
      youtubevid.attr('width','425');
      youtubevid.attr('height','350');
      youtubevid.attr('src','http://www.youtube.com/embed/ykF1y2EJ2nI');  // url/Video_Id
      youtubevid.attr('frameborder','1');       // 1 | 0
      youtubevid.attr('allowfullscreen','0');   // 1 | 0

       

       

      What that does is empty the existing vcontainer, and places a new one with the new youtube video.  You can add this to as many buttons as you like, obviously changing the URL ID for each, and it Should swap the video for you on click.

       

       

      But how would it look like with an embedded Vimeo-player?

       

      Br

       

      Martin