What problem does it solve?
Integrating audio and video in Decentraland scenes is complex, requiring correct component usage, texture setup, and permission handling to deliver reliable media playback.
Core Features & Use Cases
- AudioSource supports local files with spatial audio and pitch control for responsive sound effects and ambient music.
- AudioStream enables streaming audio from external URLs with non-spatial playback and state polling for UI feedback.
- VideoPlayer renders video on meshes or GLTF surfaces; it uses a Video Texture mapped to a mesh material.
- VideoState events and AudioStream state monitoring allow reactive scene behavior and UI updates.
- Spatial controls such as spatialMinDistance and spatialMaxDistance customize how media attenuates with distance.
- Permissions pattern for external media: ALLOW_MEDIA_HOSTNAMES and allowed hostnames to securely load remote media.
Quick Start
Configure an AudioSource, AudioStream, or VideoPlayer in your scene by following the usage patterns described.