I’ve been trying to put some videos in the game I’m making for html5.
I got it working and when I build for windows it still works. If I build for html5 tho all I get is a black texture.
I read that it’s working on some mobiles but I couldn’t find anything for html5.
So has anyone made a video run in an html5 build before?
@gmpreussner if there is a way for accessing the texture id (via blueprint or c++), you can add/connect the function to emcc module. for playing video on webgl, you only need the texture id, remaining is a simple shader program…
I’ve attached a js file for how texture is used in webgl for playing a video. Download it and paste the whole code into a console, while an HTML5 UE4 game is active in the browser. A test javascript file
Simply run the code by calling:
new VideoPlayerTest();
You can use Q and W keys to move between available textures. If a UV is defined on any texture, the video will be visible and play, else colors might jumble.
There is also a part in the js file that I’ve disabled which will play on every texture available in the context. Enable if you want to demo it too, but it will use all textures so some glitches may occur.
Hope this can change that priority at least a little bit