Embedded movie ready / finish / complete

Hi there,

We are embedding a short video in a Zappar-project by importing a .mp4 into the media library and dragging it into the hierarchy. Now I’d like to know when the video is finished. I’m wondering if this is possible when using an embeded video. I see several examples when using streaming video (videoplayer).

I’ve tried the following:

symbol.nodes.coffee_video_mp4.on("video:finish", ()=> {
    console.log("finish1");
});
symbol.nodes.coffee_video_mp4.on("finish", finishedFunction);

I’ve also added a finish-script to the coffee_video_mp4 (rightclick --> script --> finish) which isn’t working either.

None of these seem to work.

Any ideas?

Ferdy

3 Likes

Hello @dvdkamp,

Well, I’m not sure about this but these events works like this:

If you have a video node in your hierarchy, you should use the “finish” event not the “video:finish”. Just like this:

symbol.nodes.videoInHierarchy.on("finish", ()=>{
    console.log("show finish");
}) 

If you are using the videoplayer symbol, you should use the “video:finish” event, not the “finish”. Just like this:

symbol.nodes.symbolVideoplayer.on("video:finish", ()=>{
    console.log("show finish");
}) 

Here are some articles about it:

https://docs.zap.works/studio/scripting/reference/video/

Hope this helps!

att, Higor.

4 Likes

You are on :fire: today @higor!! Thank you for being so helpful, it is a huge help for our community :+1:.

3 Likes