Forum Discussion
PhilMayor-b4ca0
9 months agoCommunity Member
Play button
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
Nedim
Community Member
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.
PhilMayor-b4ca0
9 months agoCommunity Member
Thanks for this really appreciate it