Search Issue Tracker

Fixed in 2020.2

Fixed in 2019.3, 2020.1

Votes

75

Found in

2019.2.0a9

2019.3.0a1

2019.3.0b5

2020.1.0a1

Issue ID

1188316

Regression

Yes

[WebGL] VideoPlayer is not rendered in WebGL builds when the video is loaded via URL

WebGL

-

How to reproduce:
1. Open the attached project ("case_1188316-Webgl_bug.zip")
2. Open the repro scene ("SampleScene")
3. Switch build target to WebGL
4. Enter Play Mode and notice that the Video starts playing
5. Exit Play Mode
6. Make a WebGL build and run it

Expected results: Video starts playing in the build the same way as in the Editor
Actual results: VideoPlayer window stays completely black, warnings are thrown in the browser's console ("Error: WebGL warning: texSubImage2D: Source must not be null.")

Reproducible with: 2019.2.0a9, 2019.2.8f1, 2019.3.0b6, 2020.1.0a7
Not reproducible with: 2017.4.33f1, 2018.4.10f1, 2019.2.0a6
Couldn't test with 2019.2.0a7, 2019.2.0a8 ("RuntimeError: memory access out of bound" error is thrown on WebGL builds)

Reproduced with browsers: Chrome (77.0.3865.90), Firefox (69.0.2) Opera (63.0.3368.107)
Not reproduced in Edge (44.18362.329.0)

  1. Response avatar

    Resolution Note (fix version 2020.2):

    Fixed in 2020.2.0a12

  2. Response avatar

    Resolution Note (fix version 2020.1):

    Fixed in 2020.1.0b9 (3745)

  3. Response avatar

    Resolution Note (fix version 2019.3):

    Fixed in 2019.3.15f1

Comments (38)

  1. 3490e11df957d624b94d0e796f178a9a?d=mm

    bluesheep4

    May 15, 2020 21:40

    This issue is absolutely infuriating. I even downloaded the Beta 2020.1 bc it says they've fixed it, but it doesnt run there either! Beta isn't even equipped to run in a live server, and even in the localhost build the videos dont work.

    For my project it is imperative that I am able to use video in my WebGL build, and the fact that I see this issue has existed for years, across many versions of Unity is insane. Normally I have compassion for things like this, but the lack of documentation and the fact that the error continues to exist since what i can see 2015, across any number of versions is crazy!

  2. 9713a1a79aa27ce1ce5bea99ef1ef6c1?d=mm

    ismaelnascimentoash

    May 09, 2020 15:00

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

  3. 8697fd145fc52e0eaff29911837e944f?d=mm

    kou8484

    May 08, 2020 14:34

    Using 2019.3.10f1 : I built a scene with the same video played one as "camera far plane" and one as a render-texture applied to a plane. I am playing the videos as urls and uploaded them, so not a streaming-asset. Both videos are roughly the same small size of 5mb and both are mp4s. One of them is the big buck bunny video (the one having more problems).
    In Chrome one video plays most of the time! on both instances (camera far plane and rendertexture/material/plane). Sometimes it doesn't play on the camera far plane and sometimes not on the textured plane. What seems to help, is to manually add a "prepare()" function... most of the times. The other video is never played in chrome.

    In Firefox both videos play most of the time! (not reliable enough to actually ship my project to customers) on both instances, but there is massive stuttering (on an highend-gaming pc the same as on a cheap android phone).

    Would love this to be fixed, as I am relying on this for my current project.

  4. C13f1fe440bdff3738321b195b725d51?d=mm

    chetan-rane

    May 04, 2020 03:36

    this issue persist in 2019.3.12 + URP + WebGL build also.
    just a black screen appears in chrome though audio is working fine.

  5. 375ffa4adc3e7ffd5292165a8baa470d?d=mm

    maxhealth

    Apr 26, 2020 12:04

    @Coopervr - Can you verify the same in 2019.3?

    I still have the issue on Chrome - CORS is configured (2019.3.9).
    In Firefox, the audio is fine but the Video stutters same as @MaskedMouse

    Here is the error I am getting:
    WebGL: INVALID_VALUE: tex(Sub)Image2D: video visible size is empty

  6. 7359ebab0c299af7b6b04d2de7688863?d=mm

    Firewalker

    Apr 24, 2020 19:31

    @COOPERVR which unity version are you using?
    @KAMYKER do you have CORS enabled? what version are you using?

  7. 9c2381ec5cbfa0cb0c262e8a4ad4441b?d=mm

    Kamyker

    Apr 24, 2020 12:40

    @COOPERVR ? It still doesn't work.

  8. 213689c45acdd1f5d612c622a0509e64?d=mm

    Coopervr

    Apr 23, 2020 19:02

    I used AWS to host the video, followed their tutorial on activating AWS as CORS configuration and hosting a video. Now I'm streaming from URL via webgl upload to itch.io.

    I hope this helps someone else. So much relief. Took 5 minutes to implement the solution!

  9. 7359ebab0c299af7b6b04d2de7688863?d=mm

    Firewalker

    Apr 16, 2020 16:39

    Question is will this work with local files inside the folder on Safari in an iFrame?

  10. E87743164c59054407c38ea891874720?d=mm

    yusefkerr

    Apr 09, 2020 15:37

    Same issue in 2019.3.0f5

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.