Garry's Mod

Garry's Mod

Not enough ratings
StreamCore Improved
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Fun
File Size
Posted
Updated
22.626 KB
May 28, 2023 @ 6:11am
Jun 17, 2023 @ 4:16pm
2 Change Notes ( view )

Subscribe to download
StreamCore Improved

Description
ATTENTION: this REPLACES the original StreamCore, keeping the original installed while also using this improved version will cause issues!


A Expression 2 extension that allows you to play audio streams from the internet.

The goal of this "improved" version is to add useful features while still keeping compatibility with the original StreamCore, therefore, existing E2s should still work with this one.

A few key differences between this addon and the original are:
  • Only URLs on the whitelist can be used
  • New functions: streamCreate, streamTime, streamRate, and streamLoop
  • Prints to console the URL and owner name of anybody who starts a stream
  • streamRadius is consistent, no matter if you used streamDisable3D or not (No more global sounds!)
  • Limits how quickly streams can be created/updated (No more abuse!)
  • Configurable limits on how many streams each player can have and max. radius
  • Auto-apply corrections for Dropbox links

Functions
Cost
Function
Description
5
streamDisable3D(number disable)
If set to 1, newly created streams will be played in stereo mode.
5
streamsRemaining()
Returns the remaining number of streams you can create.
5
streamMaxRadius()
Returns the max. allowed distance for streams (in units).
5
streamAdminOnly()
Returns 1 if the StreamCore is admin-only. See the streamc_adminonly server cvar.
5
streamCanStart()
Returns 1 if you are allowed to create a new stream.
10
streamStop(number id)
Stops the stream started earlier with streamStart.
50
entity:streamStart(number id, number volume, string url)
Starts a stream with id, volume, and URL.
50
entity:streamStart(number id, string url, number volume)
Starts a stream with id, URL and a volume.
50
entity:streamStart(number id, string url)
Starts a stream with id, from the URL. The volume is set to 1 by default.
50
entity:streamCreate(number id, string url, number volume)
Creates a stream with id, URL and a volume, but does NOT start playing automatically. Use streamTime to start it.
15
streamVolume(number id, number volume)
Changes the stream volume. This value gets clamped between 0 and 2.
15
streamRadius(number id, number radius)
Changes the stream radius. This value gets clamped between 10 and streamMaxRadius()
15
streamTime(number id, number time)
Sets the time (in seconds) of the stream, and starts playing it from there if it isn't already. Does not work on online radio streams.
15
streamRate(number id, number rate)
Sets the playback rate of the stream. (between 0.1 and 2)
15
streamLoop(number id, number loop)
If set to 1, the stream will loop.
15
admStreamRadius(number id, number radius)
(Admin only) Changes the Nth stream's radius. Unlike streamRadius, there is no limit.

Console commands/variables
Available on
Command
Action
Client
streamc_disabled <number>
Use streamc_disabled 1 to disable StreamCore for yourself
Client
streamc_list
Prints a list of all streams and their authors to console
Client
streamc_stop_id <string>
Stop a stream using its ID
Client
streamc_stop_all
Stops all streams
Server
streamc_adminonly <number>
If set to 1, only admins can use StreamCore
Server
streamc_maxradius <number>
Max. radius players can use on streamRadius
Server
streamc_maxstreams <number>
Max. number of streams each player can have at once
Server
streamc_antispam_seconds <number>
How long (in seconds) players must wait between each time they create a stream

Whitelisted Sites
These are the websites trusted by this addon.
  • Soundcloud
  • Discord
  • Reddit
  • Shoutcast
  • Dropbox
  • Github
  • Gitlab
  • Bitbucket
  • Onedrive
  • Google Drive
  • Google Translate/TTS API
  • calzoneman's aeiou (tts.cyzon.us)
  • Steam (Can we actually host sounds here?)
  • Puu.sh
  • Facepunch

GitHub page[github.com]
3 Comments
Sanders Nov 21, 2024 @ 5:55pm 
[StreamCore] Stream #369-1 by Sanders: http://yp.shoutcast.com/sbin/tunein-station.m3u?id=1615790
[StreamCore] ERROR: Stream #369-1 failed to load: BASS_ERROR_FILEFORM
Sanders Nov 21, 2024 @ 4:59pm 
tried sound cloud and its not whitelisted!
Kanoba Apr 16, 2024 @ 4:38pm 
How do we disable the Whitelist?