Im trying to set up a virtual expo with some video players on planes showing animations made by students.
The webgl build is hosted on a cors enabled server, and the video players are set to URL with the adress of the files on the server. The files do play when the server adres url is used directly in the browser.
I’ve been reading up on such issues and made sure also a .htaccess file is available in all directories.
There are multiple video players in the game, but most don’t play. Results vary on computers & browsers…
This is the main problem atm.
The only video that seems to work directly is warped as texture around a 3D object. The other 4 videos , being played on a plane object stay blank.
This goes for the hosted version shared above ,as on a firefox webgl build running of my localhost.
This is the error i see in firefox browser console, and it builds up quickly :
Error: WebGL warning: texSubImage2D: Source must not be null.
In chrome i see :
f5c2d259-8b68-45bf-a94e-f819b35a9e67:8 WebGL: INVALID_VALUE: tex(Sub)Image2D: video visible size is empty
[.WebGL-00000200E4BC6230] GL_INVALID_OPERATION: Level of detail outside of range.
Can anyone please have a look at this project ? Thank you so much
Any Luck?? I’ve having the same issue except my video wont play on a webGL build at all no matter the browser. Also downgrading to 2019.2 didnt work for me. I’m a noob, can someone tell me what im doing wrong?
Unity 2019.3.8f1: For the most common problem I was able to get ride of it by forcing the user to click something in order to launch the video. It seams an interaction is needed to let the browser think that the video url request is the result of a user decision. Now for Chrome compatibility I did solve my problem by using Unity 2019.3.15f1 Video.js file instead of 2019.3.8f1 one. A diff reveals a single open GL line modification that is the source of all evils (see attachment).
For me I put my videos on a blob (to make it a direct link) and assign the url to the VideoPlayer during runtime. And then use VideoPlayer.Play() to play it. It works both in editor and WebGL.
VideoPlayer is setup like this:
I also get warnings “WebGL: INVALID_VALUE: tex(Sub)Image2D: video visible size is empty” but the videos play just fine in browser.