In Metaio Creator - How would I prevent fullscreenVideo from auto playing?

775 views Asked by At

I'm posting here because the Metaio forums are awful and nobody responds so I figured it can't hurt to try here. Metaio Creator is an augmented reality software program.

I don't want the fullscreen Video to go auto play but wait until I touch a 3D object to trigger that fullscreen function.

Half an answer I found said to export the Creator project and edit the logic.js file by removing "fullscreenVideo1.display();" from the trackable's "onDetected" function.

I'm wondering how to import that edited logic.js file back into my project.

Or better yet, how I could edit the custom arel script from within Metaio Creator's UI.

Here is a link to the half answer:

http://helpdesk.metaio.com/questions/19749/how-to-stop-auto-loading-of-fullscreen-video

Here is what the editable arel script looks like for all fullscreen Videos by default.

// Will be executed when the viewer for this object has been closed.
fullscreenVideo3.onClosed = function () {

};

// Will be executed when this object has been loaded.
// Corresponds to arel.Events.Object.ONREADY event.
fullscreenVideo3.onLoaded = function () {

};

fullscreenVideo3.onDisplayed = function () {

};
2

There are 2 answers

0
jobmo On

Basically, you can change the video to be played using either Metaio Creator or changing the script as you said. If you change it using Metaio Creator, it will do all the work for you, so no changes need to be done.

In the object properties, in the behaviour tab there is an option to enable/disable playing the video on detection.

When the play box is checked, something like the next piece of code is added to the logic.js script by Metaio Creator.

pattern2.onDetected = function () {

        arel.Debug.log(this.objectName + ".onDetected()");

        fullscreenVideo2.display();

};

If it’s not checked, the code shown above is not added to the AREL package, so it won’t be played on detection.

0
Fernando Gallego On

You can edit arel code from Creator, just right click on the object and edit the arel file or in the menu "extras" > "open arel editor"