Play button

Feb 28, 2024

Is there a way to detect if the play button has been pressed on a video?  I have a play/pause button on the slide as well and want to keep them both in sync

8 Replies
Walt Hamilton

Probably the best way is to use the slide timeline and controls for both. Start the video when the slide timeline starts, and do not allow the video to be controlled independently of the slide. Do that by not showing video controls, and covering the video with a transparent shape (filled with 98% transparency).

That ties the video to the slide timeline, unless of course, it is a web object.

Nedim Ramic

Here you go Phil:

let video = document.getElementsByTagName('video')[0];

video.ontimeupdate = function() { 
    
    if (video.playing) {
        GetPlayer().SetVar('isVideoPlaying', true);
    } else {
        GetPlayer().SetVar('isVideoPlaying', false);
    }
    
};

I also attached the storyline file for reference.