-
Notifications
You must be signed in to change notification settings - Fork 15
development
Shadowsun™ edited this page Sep 20, 2026
·
1 revision
- Lua (Garry's Mod addon)
-
JavaScript / HTML for browser-based services (
public/and in-panel scripts) - Shared patterns with the original Media Player; Redux adds services, spatial audio, i18n, and maintenance fixes
Authoritative contribution rules: AGENTS.md.
lua/mediaplayer/
players/ MediaPlayer type implementations
services/ Media providers (one folder per service)
controls/ VGUI / DHTML
i18n/ Translations
config/ Client config
sh_*.lua Shared systems (cvars, history, cami, events)
lua/entities/ World entities
lua/weapons/.../stools/ Spatial tool
public/ Static HTML used by browser services
Load order matters: base player and base service must register before dependents (sh_mediaplayer.lua / sh_services.lua).
- Prefer extending
MediaPlayer.Register/MediaPlayer.RegisterServiceover monkey-patching - Keep CLIENT / SERVER files split (
cl_init.lua,init.lua,shared.lua) as in existing services - Validate URLs and privilege before mutating queue state
- Use
MediaPlayer.DEBUG/mediaplayer_debugfor diagnostic logs - Do not enable webpage fallback by default in examples aimed at public servers
- Spawn each TV model; request YouTube + one non-YouTube service
- Second client joins mid-playback — confirm sync
- Spatial tool on a prop — range enter/leave listener behaviour
- Queue lock, skip, seek with and without admin privileges
-
mediaplayer_allow_webpages 0/1behaviour - Dupe a powered TV in Sandbox