Grocel / 3D-Stream-Radio

It is an spawnable scripted entity for Garry's Mod that allows you to play online streams and local files as 3D world sound.
https://steamcommunity.com/sharedfiles/filedetails/?id=246756300
17 stars 4 forks source link

[Suggestion] Stream Audio Files from Server Directory #21

Closed Peekofwar closed 9 months ago

Peekofwar commented 9 months ago

The idea is to create a special directory somewhere in the server/game directory that Stream Radio is allowed to stream audio from.

Usually I use Discord file links to stream some of the files I play in-game, however Discord has since changed their file link system to remove permanent links. I could theoretically make an unlisted addon that puts music files in-game, but something that would be nice is if I could just upload audio files to a special directory on the GMod server that Stream Radio is allowed to stream from. Only the server host would be allowed to use this feature since it requires access to the file system.

It's hard to find file services these days that allow you to use direct file links.

Of course, this raises the question of how do we denote that a URL is for a server file...? Maybe it could just start with SERVER:// or something like that...

Grocel commented 9 months ago

How would you implement it using with sound.PlayURL? Sounds like an impossible request, as the server would have to provide a valid HTTP stream server natively (without third party binary modules) that each client has to be able to access.

At the moment it is a clear "no" to that suggestion, unless it can be proven that it is possible to build it with native Lua API functions without hacks.

As for the file services you could use: Drobbox works quite well with the radio. The addon does auto fix the URL when it is valid, but with bad parameters.