Media Textures on HTML5

Hello,

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?

There is no HTML5 media player yet, sorry. It’s on the to-do list, but I have no ETA at this time. Hopefully next month.

Ah bummer.

Thanks for the quick answer! :slight_smile:

Hi.

@gmpreussner Is there a chance that we will see this feature anytime soon?

Bump, would be a nice thing to have :slight_smile:

Still super low priority, sorry. My guess is 4.15 at the earliest.

@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 :slight_smile:

Is there any way to bypass that? I need it for a client or I will have to go on another engine thing I truly don’t want !! :’(

Is there still no support for Media Player in HTML in 4.16?

Thanks in advance

No, 4.18 at the earliest.

I don’t know of any HTML5 video players for UE4 at this time. The only workaround would be to implement your own.