1 Reply Latest reply on Feb 6, 2016 6:13 AM by joel_pau

    How do I open and close Vimeo with one click?

    melissah90704608

      Hi,

      How do I make the button open and close the vimeo on click? 

      Also, is there a way to pause the vimeo when it's closed and then start it from where it was paused when it opens?

       

      Here is code importing a vimeo and it's working great:

       

      // insert code for mouse click here

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

      sym.$("vcontainer").append(vimeovid);

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

      vimeovid.attr('width','486');

      vimeovid.attr('height','332');

      vimeovid.attr('src','https://player.vimeo.com/video/154100838?autoplay=1');  // url/Video_Id

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

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

       

      But I added this to show and hide and it's not working. Not sure what to do about pausing it when it's hidden so I have no code for that.

      // Set a toggle to hide or show an element

      if (sym.$("vcontainer").is(":hidden")) {

        sym.$("vcontainer").show();

      } else {

        sym.$("vcontainer").visible();

      }

       

      Any help??