Forum Discussion
PhilMayor-b4ca0
10 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
10 months agoCommunity 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-b4ca010 months agoCommunity Member
Thanks for this really appreciate it