Facepunch / garrysmod-issues

Garry's Mod issue tracker
138 stars 56 forks source link

Awesomium/In-game-browser HTML5 support #3119

Open johnkeates opened 7 years ago

johnkeates commented 7 years ago

Details

The current in-game GMod browser doesn't do HTML5 video/audio

Steps to reproduce

Use any map, mod or piece of code to open a browser and navigate to any random site that has videos in HTML5

It seems that it does support Adobe Flash or something, but I'm not sure how useful that is in 2017.

Jake3231 commented 7 years ago

I think that Awesomium just needs to be replaced at this point.. This has been a controversial issue for a while.

johnkeates commented 7 years ago

Well, replacement, updates, removal (since it's probably also becoming a security issue at this point), anything is better than the version we're stuck with right now. I'm not sure what the stance on this thing is in general, I've seen topics on Linux/OSX issues regarding Flash, problems with DHTML/opacity etc, buffering/network I/O issues. Maybe CEF is the new go-to?

SharpOB commented 7 years ago

Awesomium is a buggy piece of garbage, and AFAIK, it's not had any updates for a year three years.

Edit: Allow me to elaborate a bit:

And allow me to suggest a modern alternative: https://en.wikipedia.org/wiki/Chromium_Embedded_Framework

mcd1992 commented 7 years ago

CEF has been discussed before, it unfortunately isn't a viable alternative as it doesn't support 32 bit OSX anymore.

johnkeates commented 7 years ago

Then add CEF and keep older Awesomium around for older platforms? As far as I know, older versions of OSX are the only ones that do explicit 32-bit, and are unsupported as of February 25, 2014. That was 10.6 and was released over 7 years ago. I'm not even sure of Steam would work on that OS, as it's only supported on Macs running OS 10.7 or higher, which runs only on x86-64.

So, CEF doesn't work on older versions of Macintosh operating systems, but neither does Steam, and by extension, GMod.

Bo98 commented 7 years ago

The reason 32-bit OS X support is required is because GMod is 32-bit.

johnkeates commented 7 years ago

And why is GMod 32-bit? Is it the source engine requirement, or older OS/Windows/Linux requirement? (Just wondering). Also, is a 32-bit/64-bit compatibility an option, or two versions, or does that break modes based on GMod (or are they all just LUA based?)

If the only technical way to go is the 32-bit way, then CEF is out of the question, but if it's more of a 'porting GMod to be 64-bit is too expensive/hard/time-consuming' issue, then it might be worth checking to see if people that want CEF would be willing to pool resources or money to get it.

Jake3231 commented 7 years ago

I'd agree that a 64-bit transition might be worth it. Doesn't Source 2 fix most of these issues as well? Just to clarify, both Windows and macOS GMod are 32-bit, but only the macOS version presents an issue?

neico commented 7 years ago

Source1 simply wasn't designed with x64 in mind, so more of a limitation then a requirement. There are test builds of Source1 with x64, but they are, only tests. (and limited to hl2 itself)

There is still the possibility to just use a pre-CEF 2272 build for macs to run. But it doesn't end there, CEF requires some tweaks and special licenses to allow patented codecs such as mp3 and x264.

The steam HTMLInterface however solves both cases, it has the licenses covered and since steam runs on mac, it's also able to actually run it's cef instance (for those who don't know, steam uses a slightly modified CEF branch of their own)

GMod as it currently is won't be easily switchable to Source2 ( whenever it's available to be actually used anyway ), so even if Source2 fixes all issues, it's still not happening in the near future.

Also mac poses an issue because apple moved mac to x64 only (as is common nowadays, windows is actually the only modern OS that still supports x86 "natively", all others need some sort of compatibility layer installed first), and google moved most of their stuff to follow that direction, essentially scrapping x86 support on CEF as well.

johnkeates commented 7 years ago

The issue is that CEF (based on Chromium) no longer builds a 32-bit version for Mac OS X / macOS, and since GMod is 32-bit, it can only work with 32-bit CEF. So the issue isn't with GMod not working with CEF, it's CEF not working with macOS.

I can imagine that running GMod on 64-bit exclusively isn't an option since there are plenty of 32-bit Linux and Windows users that would then no longer be able to use it, and maintaining two versions might not be possible either. I'm also not familiar enough with GMod or Source to know how much work it is to do anything about it. I'm not sure what frameworks, engines, languages and build processes are used, or if the compilers even support multiple targets like that, but in a number of projects using C and Lua it wasn't that big of a deal to make 64-bit versions.

Edit: so pretty much what @neico said just a few seconds before me.

I suppose one way to solve it, is by simply not directly linking with CEF. It would make for an extra process and API/streaming method, that would have to be added to GMod, but other than that, it completely disconnects CEF from any Source/GMod architecture/design particularities.

Jake3231 commented 7 years ago

That makes sense. Maybe Steam's solution is the way to go.. If macOS wouldn't allow for a 64-bit CEF, 32-bit GMod, and 64-bit OS, I see how that complicates things a lot..

johnkeates commented 7 years ago

Well, macOS allows for it, it pretty much requires it if you want to use CEF. It's everything else that would then be a problem. It's actually mostly CEF making problems now.

Jake3231 commented 7 years ago

I updated my comment. I mean to say a 32-bit GMod. This isn't my idea, but it may be good to use the latest version of CEF for macOS if required, even if that's kinda old. Would this version of CEF from October 2014 work? It doesn't require a 64-bit OS to build.

Bo98 commented 7 years ago

since steam runs on mac, it's also able to actually run it's cef instance (for those who don't know, steam uses a slightly modified CEF branch of their own)

Just to clarify here: although Steam itself is 32-bit, Steam actually spawns a 64-bit process on macOS for CEF. This is how they get around the 32-bit problem.

Jake3231 commented 7 years ago

Steam actually spawns a 64-bit process on macOS

Thanks for clarifying. Please excuse my lack of knowledge on the topic! Could Garry's Mod do something similar if apparently Steam is able to get away with that?

SharpOB commented 7 years ago

Creating a 64-bit process on a 32-bit system can't work, can it?

johnkeates commented 7 years ago

@SharpOB you don't have to. On macOS, you will, because CEF is only 64-bit in there, and older macOS installations aren't supported by Steam and can't run/update GMod anyway. Even better: when CEF is 'disconnected' (not binary linked) and instead is spawned in a separate process, you can run any version you want as long as it has the correct API to talk to GMod. So you can have 64-bit GMod talking to 32-bit CEF if you wanted to (but why would you...), and 32-bit GMod to 64-bit CEF works too.

Jake3231 commented 7 years ago

and 32-bit GMod to 64-bit CEF works too

Why don't we do this? Is similar behavior possible on Windows?

mcd1992 commented 7 years ago

Because its not 'we' its down to Willox or RBB, and its not exactly a simple solution to implement.

Jake3231 commented 7 years ago

Fair enough. I'd hope then that this is done. HTML5 support would be great.

ghost commented 3 years ago

What's the status on this issue? The foundation of our website is essentially HTML5 now as it's much more lightweight. I can access it as I'm using the Chromium branch on macOS, but my buddy who's on Windows cannot access it as I assume it still uses Awesomium.

FlorianLeChat commented 3 years ago

People on Windows/MacOS can switch to the x86-64 branch to get Chromium and 64-bit.

Jaffies commented 5 days ago

It's been 7 YEARS since this request.