How to advance to next slide at end of event video?
I have a responsive Captivate 2017 project and on one slide I have an event video. I'd like for the project to remain on the slide with the video until the video is done playing, then automatically move to the next slide. I always make custom nav buttons for my projects, so the slide has a 'next' button and a 'previous' button on it, that pause the slide after 3 secs (the extent of the slide timeline).
I also have the video hidden on entering the slide, with a custom play button with an action to show the video. The video is set to autoplay and the timing is set to duration of the video.
My on enter action for the slide is an execute javascript action and in the javascript window I have -
cp.hide("introVideo");
document.getElementsByTagName("introVideo")[0].addEventListener('ended',myFunction,false);
function myFunction(e) {
window.parent.window.cpAPIInterface.next();
}
I'm not sure if my function for moving to the next slide is correct. Though, I also tried just writing
cp.nextSlide():
in my function and that did not work either.
Any advice??
Thanks.
