Restart video from the beginning

Hi,

I cloned the Studio template “Image Targets” and started building my project. I want the video to always restart from the beginning when an image target is found.

Expected behavior:

  • When the target is found → video should always start from the beginning (not loop).
  • When the target is lost → video should pause.
  • When the target is found again → video should restart from the beginning.

Question:

In the Studio “Image Targets” template (using ecs.VideoControls), what is the correct/recommended way to reset the video to the beginning and play again?

Thanks!

Hi, welcome to the forum!

You can use ecs.video.setCurrentTime or ecs.audio.setCurrentTime. Looks like these need to be added to our docs.