Audio Management (AudioManager)
Estimated reading time: 3 minutesOverview
AudioManager is the framework's audio management system, allowing mod authors to manage background music, sound effects, and other audio resources in-game. It supports multiple audio formats, playlists, playback modes, volume control, and integrates IndexedDB storage for fast loading and caching of audio.
Configuring Audio Import in boot.json
In addition to importing audio via the JavaScript API, the framework supports batch importing audio files through the addonPlugin configuration in the boot.json file.
Configuration Structure
Configuration Options
- Paths to load for audio must be listed in
additionFilein theboot.jsonfile audio: true— Import all audio files from the mod's default path (theaudio/folder)audio: ["path1", "path2"]— Import audio files from the specified paths
Supported File Formats
- MP3 (
.mp3) - WAV (
.wav) - OGG (
.ogg) - M4A (
.m4a) - FLAC (
.flac) - WebM (
.webm)
