Videoplayer issues - loading symbols shows but not vid

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?

I would start out with the zappar test video.
Use https://ddg67ecygv8rc.cloudfront.net/ZapBoxTutorial/ZapBox1200.mp4
And see if it works for you. If it does that it could be your cors. Are you using the zappar app or WebAR?

Steve

Thanks, yes the zappar vid works fine.

I’m using WebAR.

I just to publish the app. WHen I launch using a zapcode it works perfectly. When I launch using QR code the videos don’t show. Makes no sense!!!

Would be very keen to hear from any Zappar devs as to what they think the prob is! :slight_smile:

SOLVED:

OK there were two problems:

  1. CORS settings incorrect on server. Fixing this allowed for video streaming, still without sound on two videos, however.

  2. I spoke to George from Zappar and turns out the sound issues were caused by a bug in iOS 14 and safari. The way to fix it is to use one blank videoplayer definition for all my videos (i.e. with no url set in the source field in properties), then to switch in and out new source urls, using the source(…) function, called onpointerdown. That fixed the issue of the multiple videos loading in a default mute state.

1 Like

Sorry I wasn’t able to get back to you yesterday. Glad you got it working!!

Steve