[Regression][1188316] Webgl - VideoPlayer doesn't work on Android and Windows Chrome

Vote up: https://issuetracker.unity3d.com/is…webgl-builds-when-the-video-is-loaded-via-url

Hi, I’ve upgraded my project to unity 2019.3 (from 2019.2) as hdpi screens got fixed but unfortunately videos stopped working.

WebGL: INVALID_VALUE: tex(Sub)Image2D: video visible size is empty

I’ve tried both RenderTexture and Camera plane as VideoPlayer target. Loading video with url and starting to play it with prepareCompleted event.

I’ve checked Windows and Android platforms.

Happens on GLctx.texImage2D(GLctx.TEXTURE_2D, 0, GLctx.RGBA, GLctx.RGBA, GLctx.UNSIGNED_BYTE, v); in:

        function _JS_Video_UpdateToTexture(video, tex) {
            var v = videoInstances[video];
            if (!(v.videoWidth > 0 && v.videoHeight > 0))
                return false;
            if (v.lastUpdateTextureTime === v.currentTime)
                return false;
            v.lastUpdateTextureTime = v.currentTime;
            GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true);
            if (v.previousUploadedWidth != v.videoWidth || v.previousUploadedHeight != v.videoHeight) {
                GLctx.deleteTexture(GL.textures[tex]);
                var t = GLctx.createTexture();
                t.name = tex;
                GL.textures[tex] = t;
                GLctx.bindTexture(GLctx.TEXTURE_2D, t);
                GLctx.texParameteri(GLctx.TEXTURE_2D, GLctx.TEXTURE_WRAP_S, GLctx.CLAMP_TO_EDGE);
                GLctx.texParameteri(GLctx.TEXTURE_2D, GLctx.TEXTURE_WRAP_T, GLctx.CLAMP_TO_EDGE);
                GLctx.texParameteri(GLctx.TEXTURE_2D, GLctx.TEXTURE_MIN_FILTER, GLctx.LINEAR);
                GLctx.texImage2D(GLctx.TEXTURE_2D, 0, GLctx.RGBA, GLctx.RGBA, GLctx.UNSIGNED_BYTE, v);
                v.previousUploadedWidth = v.videoWidth;
                v.previousUploadedHeight = v.videoHeight
            } else {
                GLctx.bindTexture(GLctx.TEXTURE_2D, GL.textures[tex]);
                GLctx.texSubImage2D(GLctx.TEXTURE_2D, 0, 0, 0, GLctx.RGBA, GLctx.UNSIGNED_BYTE, v)
            }
            GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, false);
            return true
        }
1 Like

If you can reproduce this issue, please submit a bug-report as described in this document:

It’s important that you report these issues together with a reproduction project if you want them to get fixed. If you don’t do it, it might be a long time until someone else reports them or until Unity Technologies find them.

After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. Please post the Case number (number only, not the link) in this forum thread for Unity staff to pick up.

Didn’t receive the email., bug report is called the same as this thread

Weird as I did receive email about other bug submitted a week ago

Still in 2019.3.0b5, reuploaded bug report, case 1188316

Edit
Bug reproduced by Unity QA and sent to devs.

2 Likes

Any update of the issue? Been almost 6 months…

+1 having same issue here WebGL video player issues

I thinks it’s this one, vote up Unity Issue Tracker - [WebGL] VideoPlayer is not rendered in WebGL builds when the video is loaded via URL

did downgrade work for you ? ill try it soon

From what I remember it works fine in 2019.2 but there’s another bug that makes screen blurry on high density screens (all mobiles) ;/

Yeah, downgrade worked (actually the team is on 2019.3 and I’m working and building on 2019.2 - without any real issues…) but after the downgrade remote addressable assets in editor don’t work properly and report being built by wrong unity version. However… they work in actual build without issues. Fortunately simulate mode works. Still - not fun

The issue is being investigated by the devs. Stay tuned.

Exactly same link, hope to see it fixed finally.

This bug is keeping me from releasing a new important feature for our product.
Using Unity 2019.3.7, going back to 2019.2.21 is not an option
It seems to work on Edge
It plays with stuttering on Firefox
It doesn’t render but does play audio on Chrome
and I haven’t tested Safari

1 Like

I encountered the same issue. It displays a black blank screen on Chrome. It works well on Edge and Firefox though.

Update:

I’ve found forums reports of this being broken going back almost a year, and yet there’s still no resolution.

Is there at least a workaround that we can apply to our own projects?

It appears to be something wrong in the JS Unity is generating - no other platform has this problem - can we at least do a search/replace on Unity web builds as a patch to be able to carry on developing while Unity waits to eventually patch it in their own code?

On my case, just not works in the last version of Google Chrome.
I tested with Unity 2019.3.13

I logged a bug against it > 2 weeks ago, still waiting to hear back. I believe the QA team hasn’t even opened it yet, and the dev team that actually works on VideoPlayer won’t see it until after the QA team has confirmed, so … could be a long time yet.

1 Like

What? I recommend reading whole thread before commenting… I’ve reported it in beta 2019.3, no reason to duplicate.

I was replying to the previous poster. I had already commented on this thread separately.

It’s great that a bug was logged last year, and hasn’t been fixed, and nothing has happened, and there are no workarounds … no, wait. It’s a disaster. Unity has been sitting on this for a ridiculous amount of time. I’ll keep encouraging people to report it until Unity either fixes it or gives some public explanaation of A) how much longer they plan to delay it and B) what they expect us to do in the meantime.