Need help with video textures

Hit there. Problem is fairly easy described: Just use the tutorial for video textures:

First of all n desktop this only works on chrome. Safari and Firefox: NOT.

Next i used the editor to store a video. But then i get errors like:

[Error] Failed to load resource: the server responded with a status of 401 (Unauthorized) (invitation.mp4, line 0)

this is a video stored within the editor.

Hope somebody can shad a light.

Hi @marjanp and welcome,

The tutorial example works quite fine for me on desktop/firefox (windows), can’t test currently on mac/safari. Also the example uses a local (editor) file and it works quite ok.

Did you make any changes to your project that broke the example?

This tutorial is working for me on Windows Chrome, Firefox and Edge.

THANKS a lot for your emirate reply.
doset work on mac, Well except chrome.

Do you have any error message in your console?

of course:

Failed to load resource: the server responded with a status of 502 (Bad Gateway)
write — playcanvas-stable.min.js:33:305

or in my project:
[Error] Failed to load resource: the server responded with a status of 401 (Unauthorized) (invitation.mp4, line 0)

hi, on mac os there is no successful loading and or asigning of the videotexture, Project runs but screens stay black. Except for chrome browser.

ok, ok, now it the tutorial seems to work on safari mac. didn’t change anything.

Did you solved your problem?

No i did not. Safari throws the same errors again. I have no clue.

Can you send us a link to your project to investigate this?

well for the beginning it would be the official video texture tutorial.

However i guess i found something.

A. If i open the editor and then hit “play” - no video appearing.
B. If i just hit “play” from the project page - then there is a video texture after some delay.

You may have changed your project since your post but actually, everything work fine with me in both cases (A and B).

on mac and safari?

Case A is interesting as it gets 401 error when it shouldn’t :thinking:

here is what i had to do to get it partially working:

  1. Host all videos on a server with https support
  2. Add a custom html element which receives onclick to start the first video. This is only necessary for videos with audio. before i just used raycast to fetch user input. Doesn’t work. Interaktion with an html element however does work.
  3. export the play canvas project and host it on the same server/url.

Now, there are no error messages any more and i hear the audio of a video file.

Next problem: the video is not being displayed on the target material. ARRRGHHH.

of course this is bad because it defies the purpose of using an editor for quick iterations. As i have to copy everything over from here to there and back and forth.

Super strange that it works fine on Chrome but not Safari :thinking:

that’s correct. firefox also doesn’t work as i remember (and i hope i am right)

There could also be differences on wether you have your video inside the editor or on an external site.