MusicLibrary
Summary
Built-in music library.Signature
Methods
load
Register a music track under a unique key.mute
Toggle the muted state of all loaded music tracks.play
Stop the currently playing track and start the requested one.Remarks
Manages a collection of namedHTMLAudioElement instances and ensures only one track plays at a time. Load tracks with load and start playback with play. Register with the application: Access in game code: