Playing youtube through gmod

I can’t really figure this out and I have tried ways that just didn’t work for me I need some help with this :confused:

Panel:OpenURL?

gui.OpenURL?
Use either of those to open a website such as YouTube, if this is what you mean.

I just want the sound from youtube that I could play with sound.PlayURL. Just cannot find a way to do it

Find an API that can convert it, fetch it with

http.Fetch and use the success function to play the sound if it’s URL is valid.

I would need to useyoutubes api as if i used any other it is against youtubes tos and those “converter” sites change a lot.

YouTube doesn’t have an API for audio only, it’s against their TOS.

So there is no way of doing it without breaking youtube’s tos?

The only other way is to play the video and hide it, which is much easier than using other APIs anyway

Well, I would need to try and make it so that all the players are hearing the music at the same time and also if a player joins they can also hear it at that time and play from there onward. Also, i have to use youtube’s API anyway as I need to get the video data so it can be saved in a database :stuck_out_tongue:

http://www.youtubeinmp3.com/api/

As I said before it’s against youtube’s tos so I won’t be able to use it

Create an awesomium control with YouTube on and use the time var in seconds to define the seek, put it outside the screen and it “works”

Use an invisible DHTML panel with an autoplaying YouTube video

Don’t really know what you mean Lol.

I mean i was just going to use the youtube api get the length of the song and the time that the song started then make it load the song from that time :stuck_out_tongue:
but it might not work :confused:

You don’t need the API at all if you already know when the song started and much it lasts, in case you want to build a music player, hunmm no…I don’t recommend you it due how expensive for clients it is, also forget about spatial sound

It has been requested to me meny of times and i have nothing else better to do so why not.

Whatever, we already told you it’s not possible anyway without requiring to use mp3 sites

It is possible as playx and a lot of other addons have done it.