Need Help De-Bugging Studio Project with the Video Player


#1

I’ve created a prototype Studio project and have reached the limits of my coding ability and need some support to make it work as intended.

After users tap the Spark Plug button and then the Intro button, I would like the 30 second video to automatically play. If users tap any navigation button while the video is playing, I want the video to stop.

Currently, I have each scene scripted to be visible and enabled when navigation buttons are tapped, but those scripts do not affect the video player. I also have the video set not to auto play, but I figure that will need to be changed.

Thank you in advance for your insights and support.

I’m having trouble uploading the zpp file and keep getting an error “undefined method `etag=’ for #”


#2

I’ve tried uploading the zpp file as a reply to this thread, but get the same error code. The zpp file is 27MB.

However, I’ve added it to my Dropbox and the file can be accessed at: https://www.dropbox.com/s/sutlusa082bnzj0/3D%20Engine%20with%20parts.zpp?dl=0


#3

Hi @2iteducationsolution,

Thank you for sending across your ZPP file!

I have made an example to help explain how a video can be played, paused and restarted when a button (plane) is touched.

I am using the videoplayer subsymbol much like the experience you have created. This has the Video Url added to the properties along with its visibility property set to false and autoplay set to false.

Next, 2 planes have been added with play/pause images assigned to the material properties and pointer down created. Within the play script, I have dragged in the videoplayer node from the Hierarchy to create a reference of it. Using this reference,the visibility property is set to true and the video is started using the start exported function -

video.player.nodes.control.start();

I do the same for the stop button but instead, set the visibility to false and use the pause exported function to stop the video -

video.player.nodes.control.pause();

The video can also be restarted using the restart exported function -

video.player.nodes.control.restart();

Unfortunately our forum is playing up at the moment so files are unable to be uploaded directly, I have added the file temporarly to WeTransfer until this issue is fixed : https://we.tl/t-pL1xBmGeVI

Hope this helps!
George


#4

Hi,
Your directions and sample were just the support I needed. My AR experience works like a charm!
You should get a raise, or at least a cookie.

Best,
Johnny