WebGL video support! Need so bad it hurts!

We’ve made an interactive music video with Unity and it just would be sooooooooooooo much f*cking better if it would be possible to distribute via WebGL!

The unity webplayer is cool and all but having to download and install the plugin is such a huge difference for new users vs WebGL obviously.

Basically we’ve made this interactive music video using greenscreen technologies for real life characters that we filmed, incorporated into the animated world (VR as well). The desktop mac/windows versions are something we’re really proud of, and after many trials and tribulations, we’ve even managed to get an awesome version fully working via unity webplayer, which is something we read many times was not possible (for alpha video), including from the developers of the videotexture plugins we purchased.

So we’re pretty much ready to launch this thing and have people either torrent/download the desktop version or play the unity webplayer version (after installing the damn plugin) but I thought I’d through this out to the community first - is there anyone anywhere who’s found/created/can create any solution for playing a video via WebGL at all??? Yes I am also going to add that it needs to be alpha but we found a very unique workaround for the alpha computation for the webplayer version and I’m thinking the same technique can be applied to the WebGL solution, if the video texture can be played in the first place.

Very interested in any comments so thanks in advance!

Cheers

There is a workaround for playing videos in WebGL. You essentially play the videos in javascript as hidden videos on the page and you copy the contents of the video into your unity Texture2D each frame. The results are surprisingly good.

I think I used a modified version of this GitHub - jtothebell/UnityStreamingMovieTexture: a movie texture extension for Unity 3d that adds support for Web GL. Basically just a wrapper around the extisting MovieTexture class and Jonas Echterhoff's web gl movie texture. I think Jonas here did the first proof of concept versions.

As @crushforth wrote, it is pretty easy to embed html5 video in WebGL content. The results are actually considerably better than Unity’s built-in Video solution, so we currently have no plans to make that available to WebGL in the near future (and also, because the current audio solution used in Unity WebGL would not allow our video code to hook into, so video would be silent).