Search Issue Tracker

Fixed in 2020.2.X

Fixed in 2019.3.X, 2020.1.X



Found in





Issue ID




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



How to reproduce:
1. Open the attached project ("")
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 (42)

  1. 26a27a1bde07287c1ebb4933a2217564?d=mm


    Feb 27, 2021 00:52

    still not working with 3.15

  2. 8fa722094ebe190adb1db7ca48f20c2b?d=mm


    Feb 18, 2021 20:47

    The only way I was able to play the unity webgl video on an iPhone was using this browser: https://apps. apple. com/us/app/webxr-viewer/id1295998056 although I know this does not fix the real problem.

  3. E34357349dde1c674c194121bca7fa9f?d=mm


    Nov 20, 2020 15:36

    Still not working on 2020.2.0b11. Tried both render texture, material rendering, far and near plane rendering.

  4. 11e87231a34638486e3342cbad936aa4?d=mm


    Nov 20, 2020 01:49

    Still not working here on Mac Big Sur and 2020.1.14f1. Anyone find work around?

  5. 83e2e0e987db3f84982c901c16feb60b?d=mm


    Oct 21, 2020 05:54

    Issue still here 2020. Webgl videos loading from URL not working on ios devices.

  6. Ec4da1e34eafa4f9fbcb5bf9690d911c?d=mm


    Aug 05, 2020 05:28

    Video rendering in WebGL build issue resolved at my end. This work in Unity 2019.4 LTS versions.

  7. 207239edd2e489ccaae069a211d40429?d=mm


    Jul 29, 2020 15:26

    On 2020.1.0 I'm still seeing "WebGL: INVALID_VALUE: tex(Sub)Image2D: video visible size is empty"

  8. D3ba7561450d34f9054f13419050edd2?d=mm


    Jul 21, 2020 16:09

    URL video stream is still not working on ios 13 webgl for me even in 2020.2.0a18.
    Videos stream plays in firefox chrome, (chrome android) safari edge browsers.
    I copied over the "video.js" from 2020.2.0a18 to currently used 2014.4.4f1
    I added on line 11 after video.src = str;
    video.preload = 'auto';
    video.autoload = true;
    This got rid of the "WebGL: INVALID_VALUE: tex(Sub)Image2D" error for me. not a full solution but a start

  9. Ec4da1e34eafa4f9fbcb5bf9690d911c?d=mm


    Jul 09, 2020 08:50

    Problem reproducing with 2019.3.15f1 Unity version. Kindly do need to check to Unity again.

  10. 10b29e2407443176cd88f400bf75006b?d=mm


    Jun 25, 2020 16:34

    Ok, so I was having the same issue of the video audio playing but screen was just black when running webgl. Solution for me was to not use the rendertexture method and instead use the VideoRenderMode.MaterialOverride instead. Not sure why this works and just targeting a rendertexture does not since it technically creates a rendertexture at runtime. But at least for my setup it works. Hope this helps others there.

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.