Hi all,
Hoping for a little help with the videoplayer symbol defintion.
I’ve basically set it up like the tutorial, pointing to a https://videofile.mp4, which is activated by an onpointerdown event to do this:
videoplayer.nodes.control.restart();
videoplayer.nodes.control.play();
However, when I test the app, I simply get a loading animation for a short time and the video itself doesn’t load. When I switch out my url for the test one in the tutorial .zpp, it works fine.
So I’m wondering whether my video encoding is the issue? Or whether it’s a host-side thing. I’m pretty sure my server permissions allow CORS, but maybe I’ve missed something?
Why would I be getting the circular dots loading animation and then nothing else?
Any help appreciated - cannot work it out.
Andrew
EDIT:
Ok so I’ve also tried embedding videos into the app (I have 3) by setting the mp4 file as a material on another object, which is fine.
Each of the three videos plays correctly onpointerdown from 3 different buttons. However, when I publish the project, while al 3 videos play correctly, there’s no audio on two of them.
I cannot figure out what’s going on. I even tried using the same plane object with 3 materials, and then switching between the materials with skin(video2.mp4), and it switched the videos correctly, but the sound would only play for the first video!
As I said it works perfectly when generating a preview code from Studio, but when published to the web with QR code, it has all these bugs.
What in the world am I doing wrong, or does WebAR just not work???
EDIT 2
OK, I solved the video loading problem through url - it was indeed a CORS issue. Man, this is a really unintuitive fix.
With the audio, I think it’s a bug. I’ve read other posts about iOS muting the audio. I turned on the toolbar at the top of the app, and lo and behold, for some reason, two of the videos start muted. However the ‘unmute’ button does not always appear! Sometimes it does, and sometimes it does not. In the studio preview through zapcode, it always works perfectly.
So my next question is, how do I force unmute on a video clip?