1 Reply Latest reply on Mar 15, 2015 3:33 PM by smenegassi

    trigger video ended actions

    smenegassi Level 1



      I need some help here.

      I have this video on stage : it is ok.


      var vid = sym.getSymbol("video_content").$("video_holder");

      vid.html('<video id="videosalle0" style="display:block;position: absolute;bottom: 0px; left: 0px; min-width: 100%; min-height: 100%; width: auto; height: auto; overflow: hidden;" webkit-playsinline=""  autoplay="autoplay" controls="controls" poster="images/poster_salle3a.jpg" ><source src="videos/salle3a.mp4" type="video/mp4"><source src="videos/salle3a.webm" type="video/webm"><source src="videos/salle3a.ogv" type="video/ogg"></video>');


      And I have this button alson on stage I want to give different actions, if the video ended or not.


      I do this and it not works ;


      if (($("#videosalle0")[0].ended)== true){




      alert("est true");

      } else {



      sym.$("vitrine_content").animate({"top":"-100%"},1000, function(){$("#videosalle0")[0].play();});

      alert("est false");



      Please, help if you can ! thanks


        • 1. Re: trigger video ended actions
          smenegassi Level 1

          OK I found out.


          The answer is on the fact that "video ended"  means that an audio/video has ended when the playback position IS at the end of the audio/video.

          Somewhere before in my code I was sending the video back at the 0 position after it reached the end therefore the action on my button above could never work...

          I can sleep now


          1 person found this helpful