pixeltailgames/cinema

Use the YouTube API?

Closed this issue · 3 comments

As of right now, videos are limited to 360p and can lag the heck out of the game because of Gmod's outdated HTML render.

So why not instead use the YT API to get the correct video quality without without the need of using a web player outside of the reaches of Gmod?

I know that people will probably complain about only having YouTube to watch but if they really want other providers they can downgrade and be stuck at 360p.

If you mean using their internal API to try and get video links, it's not as simple as you make it out to be. That part of their API is, again, internal and thus isn't documented anywhere. Which would mean having to reverse engineering it and figure out how it works.

Beyond that, to get seeking/syncing to work correctly, there would have to be more reverse engineering done, and since pretty much every video seeking solution in Flash Player is proprietary to the video service, whoever would be figuring all of this out would then, effectively, have to write their own video player, in Flash, to get everything working, since you couldn't just pop those links into another Flash Video Player.

Effectively, to support YouTube on GMod's Web Framework in its current state, somebody would have to write a 100% custom flash video player that would be based on Internal, Undocumented, and Deprecated code.

I don't think anybody would be willing to do it, and furthermore, it's a better use of Cinema devs' time to push for GMod's Web Framework to be updated/replaced/have an alternative added instead of writing code for an, effectively, dead platform (Flash).

That would probably be a better idea, but having multiple options just in case we get another "No." is always good.

Parts of https://github.com/rg3/youtube-dl/ could potentially be ported to Lua, or it could be used directly either be calling the command line program as installed by the user or by using Cython to compile an executable and using that.

Unfortunately its unclear whether or not Awesomium can play modern formats at all, but if it can then modifying something like http://videojs.com/ could work.

Lets just hope for an updated HTML rendered though.

I have no plans to build and maintain a YouTube video downloader/decoder for this gamemode, sorry.