Play from per javascript


i would like to play a movie always from the start per javascript although its timestamp is not on the start (becuase the movie already was played a little bit).
This does not work: doc.getElement(‘movie’).play(0);

What can i do?

Thanks very much, Anke

Hi schenkan,

You can use seek(0) then play():

var movie = doc.getElement('movie');
if (movie) {;;


Thank you very much, I guess I just made an embarrassing typo, oh dear.

I have another question: is there a trigger at the end of the movie so that other functions can be triggered?

Hi schenkan,

Saola Animate doesn’t have a trigger at the end of the movie yet, but you can handle the native movie event:

var movie = doc.getElement('movie');
movie.mediaDom.addEventListener('ended', function() {
  // movie is ended, do something here


ah, so slowly i understand the logic and connection to the “rest of the world”.
i would like to thank you for the very quick and helpful answers. it makes the work and the pondering much easier. :smiling_face: