AutoPlay local video in studio


#1

Hi there,

I am struggling to find a way I can have a video autoplay as soon as the tracking image scanned. A function that is similar to that in zapworks design, but however I want to achieve the same thing in studio. If I can zap an image and a video autoplays and as soon as it finishes, it closes back to the track image.

_Brian


#2

Right click on your tracking image. Add script ‘seen’ and add there function to play your video. Like this for example:

parent.on("seen", () => {
	// Runs when seen occurs on the parent node
	
	const Videoplayer = symbol.nodes.Videoplayer;
	Videoplayer.nodes.control.restart();
	Videoplayer.nodes.control.start();
	
});

#3

Hi

Thank you for the help I have tried the above code but it, still is not playing, it could be something im not doing right im not very familiar with coding. but what I have done, which might give you more insight in the file, I have placed a plane above the trigger image, and made the video I want to play the plane’s material. Is that the right way of doing things coz I want the video to play as if the poster is coming alive.