NOTICEThis addon is broken because I haven't updated it for GMod 13, and I'm sorry to say that I've dropped development on it.YouTube music player by RynO-SauruSThis ULX module allows players to play music from YouTube (the audio from any YouTube video) on the server.
Features:Client-side GUI player controls (Volume, mute/unmute, shows current time in song/song length):
Note: the button with the arrows does nothing. UPDATE 1.1: The button with the arrows AND the pause/play button have been removed.
(this is so different clients' position in the song will stay synced with each other, and to keep the player from being auto-hidden before the song is over)
Also updated with 1.1, the controls are no longer visible when a video isn't playing, and it fades in and out, nice and pretty.Play videos with a ULX command (<url> argument should be a link to any YouTube video, command is by default admin-only):
Console: ulx playvid <url>
Chat: !playvid <url>
New with 1.1: Play videos
client-side with a ULX command (<url> argument should be a link to any YouTube video, and by default, anyone can use this):
Console: ulx playvidcl <url>
Chat: !playvidcl <url>
Automatically plays in HD (high quality) if the video supports it UPDATE 1.1: You can now set the quality manually. (see CVars section) Works with videos that have embedding disabled
Prints the URL and title of the YouTube video in the chat when you play it
Command to stop the video that's playing for all clients (by default, admin-only):
Console: ulx stopvid Chat: !stopvid UPDATE 1.1 (changed command name!): Console: ulx stopvidall
Chat: !stopvidall
Command to stop the video client-side (for the player who types it), if a player doesn't want to hear the video (by default, anyone can use this):
Console: ulx stop Chat: !stop UPDATE 1.1 (changed command name!): Console: ulx stopvid
Chat: !stopvid
New with 1.1:Playlist, allows you to save videos to the server and play them later, with a nice little music menu.
Image:
"music" command:
Console: ulx music
Chat: !music
Opens the music menu, allowing you to play videos saved on the server.
"savevid" command:
Console: ulx savevid <url>
Chat: !savevid <url>
Saves the specified video to the server's playlist.
"savecurvid" command:
Console: ulx savecurvid
Chat: !savecurvid
Saves the currently playing video to the server's playlist.
"removevid" command:
Console: ulx removevid <url>
Chat: !removevid <url>
Removes a video on the server's playlist.
"renamevid" command:
Console: ulx renamevid <url> <new title>
Chat: !renamevid <url> <new title>
Renames a video on the server's playlist.
CVars:
CVar "ulx_songplayer_enable", enabled/disables the music player client-side. (default = "1", enabled)
CVar "ulx_songplayer_quality", sets the quality of videos client-side. (default = "large", 480p)
Possible values: "small" = 240p, "medium" = 360p, "large" = 480p, "hd720" = 720p, "hd1080" = 1080p, "highres" = highest quality
Requirements:Latest ULX and ULib (SVN versions!)
Installation (Scroll down for SVN!):Extract the attached .rar file to garrysmod/addons.
Changelog:
UPDATE 1.41:
-Removed: Debug messages ("Status:", etc.).. Sorry for that.
UPDATE 1.4:
=Fixed: Again, videos not playing since a YouTube update.. and it shouldn't break this time!
UPDATE 1.3:
=Fixed: Videos not playing since the YouTube interface update.. Sorry this took so long!
UPDATE 1.2:
+Addition: "Play for all" and "Play client-side" options to the playlist right-click menu.
*Change: Changed some file names to reflect the current official name of this addon (it was initially called "ULX SongPlayer"). IMPORTANT: This means you MUST remove the folder for the old version before installing this one!
*Change: The shared code is a LOT more clean and efficient, thanks to Megiddo's new logging system.
UPDATE 1.1:
+Addition: A playlist feature has been added! Save a video to the server's playlist with "ulx savevid <url>" (console) or "!savevid <url>" (chat), or save the currently playing video with "ulx savecurvid" (console) or "!savecurvid" (chat), and play saved music by opening the music menu with "ulx music" (console) or "!music" (chat).
+Addition: Added a new ULX command, "ulx playvidcl <url>" (console), "!playvidcl <url>" (chat), plays a video CLIENT-SIDE. By default, anyone can use this.
+Addition: Added 2 client-side CVars, "ulx_songplayer_enable" (enables/disables the music player client-side), and "ulx_songplayer_quality" (sets the quality of videos client-side)
Possible values: "small" = 240p, "medium" = 360p, "large" = 480p, "hd720" = 720p, "hd1080" = 1080p, "highres" = highest quality
*Change: The player controls now automatically hides itself when a video is not playing, with a nice fade in/out.
*Change: Changed the "stop" command (stops video client-side) to "stopvid", and therefore changed the old "stopvid" (stops video for everyone) to "stopvidall".
=Semi-fix: DRASTICALLY reduced the frequency of client crashes (almost never crashes now) when playing or stopping a video.
UPDATE June 26th, 2012 - SVN created. Checkout link:
http://ulx-youtube-jukebox.googlecode.com/svn/trunk/ (EDIT:
link fixed, sorry)
Installation instructions:
Install Tortoise SVN (
Download) if you haven't already, create a folder in your "garrysmod/garrysmod/addons" folder named "ULX_YouTube_Jukebox" or whatever you want, then right-click the new folder and select "SVN Checkout...", paste the checkout link I've posted above, and click OK.
Special thanks to:Megiddo, for answering various questions of mine through Steam PM.
HellFox, for his advice/assistance on this, and giving me some ideas for things, including the "video debug" feature.