RDE_OXMEDIA DOCS
RED DRAGON ELITE // ECONOMY & GAMEPLAY · ALPHA

YouTube On Any TV.
Zero Database Required.

rde_oxmedia streams YouTube and direct media on any TV, monitor, laptop, cinema screen, or speaker in GTA V — full server-authoritative sync via entity StateBags, 3D proximity audio with room attenuation, and native rde_props integration. No separate DUI resource, no SQL, no Tebex.

01 / Start Here

Overview

Most media scripts are abandoned, bloated, or locked behind Tebex and require a separate DUI resource. rde_oxmedia needs none of that — pure StateBag/GlobalState architecture, zero database footprint.

Core Principle Three distinct entity classes — networked props, non-networked world props, and rde_props entities — route through a single unified menu. Players never see the difference.

Why this over PMMS / generic scripts

PMMS / Generic Scriptsrde_oxmedia
Legacy network eventsEntity StateBags
Flat volumeDistance + room attenuation
No late-join syncCorrected playback position on join
Separate DUI resource requiredNot needed
Database requiredPure StateBag / GlobalState, zero SQL
02 / Start Here

Quick Start

server.cfg
ensure ox_lib
ensure ox_core
ensure ox_target      -- optional, only if Config.UseTarget = true
ensure rde_props      -- optional, only for prop media sync
ensure rde_oxmedia
DUI URL required for YouTube YouTube's IFrame API blocks nui:// origins (Error 163). Set Config.DuiUrl to an HTTPS URL — RDE's hosted copy works out of the box.
03 / Reference

Architecture — Three Entity Classes

ClassKeyWho hears it
Networkednet:<netId>All players
Non-networked (static world)ent:<handle>You only — labelled "Local playback only"
rde_props (client-spawned)prop:<propId>All players via GlobalState
04 / Reference

Configuration

config.lua
Config.DuiUrl = 'https://rd-elite.com/Files/oxmedia-dui/'

Config.EnableAttenuation     = true
Config.EnableRoomAttenuation = true
Config.DiffRoomVolume        = 0.3
Config.MaxRenderDistance     = 50.0
05 / Reference

rde_props Integration

Because rde_props entities are client-spawned and have no NetId, a dedicated GlobalState sync path handles them — fully transparent to the player. Requires rde_props v1.0.1+.

Sync flow
Player opens menu on a placed TV prop
  → entityKey() → exports.rde_props:getPropIdByEntity(entity)
  → GlobalState['oxmedia_prop_<propId>'] = data
  → fires on ALL clients → startDevice(entity, data)
06 / Reference

Exports

ExportSideNotes
startDevice(entity, data)ClientStart media locally
getActiveDevices()BothAll currently active devices
hasPermission(source, 'admin')ServerPermission check
07 / More

Common Pitfalls

Black screen / no video

Config.DuiUrl doesn't point to a live HTTPS URL.

Fix: open the URL in a browser first — if it 404s, the DUI page is missing.

World TV only plays for me

Working as intended — static map props are non-networked GTA entities, labelled "Local playback only".

Fix: use rde_props to spawn the TV for shared playback across all players.

Idle CPU was unexpectedly high (pre-v1.0.5)

The render thread ran Wait(0) unconditionally — 60+ resumes/sec with no media playing whatsoever.

Fix (v1.0.5-alpha): render thread now runs per-frame only while active TVs exist, collapsing to Wait(250) at idle — idle CPU dropped ~84% in resmon testing.

08 / More

FAQ

Is oxmysql required?

No — this resource has zero database footprint. Pure StateBag/GlobalState architecture.

Can I migrate from PMMS?

Yes — comment out pmms/pmms-dui, add rde_oxmedia, set Config.DuiUrl, restart. No data migration needed since StateBags are session-only.

09 / More

Changelog

v1.0.5-a

Performance patch — idle CPU 5.58% → 0.89% (~84% reduction), conditional render thread, removed duplicate ox_target polling.

v1.0.3-a

Hotfix — frozen last-frame image on stop, screen now clears correctly via a 2-frame black-draw before release.

v1.0.0-a

Initial public release — full StateBag + GlobalState sync, 3D proximity audio, 40+ supported prop models.