Search code examples
javascriptjqueryvideo.js

Open video automatically when the first ends ( video.js , shadowbox.js )


I used shadowbox.js and video.js files for my mobile site. I like work on the box feature. I have a video in the first box and a text in the second one. I need when the video in the first box ends the second one open autoamtically. It's javascript code so I just need to know the right strings code so I could replace the file.

Thank you very much .


Solution

  • you should use ended event like:

    videojs("example_video_1").on("ended", function(){
        // do stuff
    });
    

    demo: http://jsfiddle.net/U989U/1/