Search Issue Tracker
Fixed in 2020.2.X
Fixed in 2019.3.X, 2020.1.X
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
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)
-
PeteS
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
ProgramFiles\Unity\Hub\Editor\2019.4.4f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\lib
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 -
Virat-Gangurde
Jul 09, 2020 08:50
Problem reproducing with 2019.3.15f1 Unity version. Kindly do need to check to Unity again.
-
threattec
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.
-
MirkoSon
Jun 06, 2020 06:51
PS: To be precise, I'm talking about loading a video from the StreamingAssets folder, assigning URL to System.IO.Path.Combine(Application.streamingAssetsPath, fileName).
-
MirkoSon
Jun 06, 2020 06:46
Tried with 2019.3.15f and 2020.1.0b9 but the issue is still there for me. Had to downgrade to 2019.2.21f, working flawlessly there.
Tried both using render texture and material override but it's just black screen. -
gokdenizcetintr
May 23, 2020 22:00
Same issue on 2019.3.10f1 version. I need a fix asap!!
-
Morbo2
May 22, 2020 16:22
Same issue with 2019.3.13f1
-
simba-mupfunya
May 20, 2020 16:25
@ISMAELNASCIMENTOASH Sweet temp. workaround, thanks!!
-
ismaelnascimentoash
May 20, 2020 12:07
Hello guys,
Link for fix this problem: https://youtu.be/APTruRrdJpQ
Warning: Unity 2019.3.15 and newer this problem fixed too (https://issuetracker.unity3d.com/issues/webgl-videoplayer-is-not-rendered-in-webgl-builds-when-the-video-is-loaded-via-url)
Regards,
-
blabberbytes
May 20, 2020 06:49
It's still not working for me! All I am doing is using the built in Video Player with no scripts . I use URL link it to https://files.myfilesehsekjfb and in unity, bud does not work on ITCH.IO!!! OMG This is so frustrating!
I am not good with code, i am on 2020.1.0b9 which supposedly fixes the issue!! What am I missing?
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
Resolution Note (fix version 2020.2):
Fixed in 2020.2.0a12
Resolution Note (fix version 2020.1):
Fixed in 2020.1.0b9 (3745)
Resolution Note (fix version 2019.3):
Fixed in 2019.3.15f1