Control a Click Sequence via video

Hello,

in the linked project file I´ve add three slides where a click sequence is started via a video. The problem is that if you click in the image (red marked area) the sequence also start. Is it possible that the sequence start only by start the video (green area)?

It would be absolutely fantastic if it´s possible to pause and resume the click sequence while click the video. (But just a dream..)

https://drive.google.com/file/d/18MX4htBMuy-Nk_V0n6MruTHsB–iejYC/view?usp=drivesdk

Hi Oliver,

Please refer to slide 1 in your project for a working example of this setup:

  • Add a circle shape covering the green area, and set Opacity = 0%
  • Move all actions from the video’s On Click event to this shape
  • In the shape’s On Click event, add the following JavaScript as the first action:
var video = prez.object("Leadframe Process_720p").node.querySelector("video");
if (video) {
  if (video.paused || video.ended) video.play();
  else video.pause();
}

This way, clicking the green area will play the video first and then trigger the sequence.
Question about Click Sequence.approj (9.5 MB)

Hope this helps,
Hoa

Hello Hoa,

good idea to lay a shape over the video and manage the functions with this. Only the video will not play, also not with the Java Script. Just try you file which you upload. Here is the video also not playing.

Hi,

Sorry, my mistake there.

I’ve updated the JavaScript and re-uploaded the project file. Could you please check it again on your side and see if it works now?

Thanks for your patience :slightly_smiling_face:

1 Like

Hello Hoa,

Thank you so much for solving my problem. The Atomi team always comes up with good, simple solutions. Unfortunately, I can’t write JavaScript myself. So thank you so, so much. Now it’s working perfectly. :star_struck:

1 Like