0 Replies Latest reply on Apr 4, 2014 12:50 PM by dkgraft

    How to close a video after it plays

    dkgraft Level 1

      Hey people,


      Say you have a video intro that you would like to have dissapear after it plays. Use this code. (place in trigger event)


      var vid = sym.$("bird_holder");

      vid.html('<video width="1022" height="575" id="bird" src="video/Intro_Animation.mp4" controls="controls" type="video/mp4" </video>');


             $("#bird").bind('ended', function(){






      A couple things to address:


      1) My video is housed in a symbol called "intro_animation" which contains the holder for the video. (called "bird_holder" in my example)


      2) If your video is on the main stage, just use sym.getSymbol("holder_name").deleteSymbol(); at the end of your function.


      3) be sure to include id="" in your video tag. and make sure your ready function is referencing that id.


      Hope this helps someone.