ProtectedsongsRegistered audio elements keyed by name. Subclasses read this; mutate via register.
Whether playback is permitted. Setting to false invokes stop immediately.
Play the registered sound name once. Returns a promise that resolves when playback starts (or immediately if enabled is false) and rejects on autoplay/permission errors. Throws synchronously if no sounds are registered or name is unknown. Each call allocates a clone, so concurrent plays of the same name overlap.
Load and register one or more audio files. Each entry may be a bare URL string (the file's basename becomes the name) or a RegisterData object. Per-song volume falls back to defaultVolume. Call once per instance — throws on a second invocation, on non-finite volume, or on volume outside [0, 1]. Load failures are logged to console.error but don't throw.
Stop and forget every currently-playing clone. Also calls the base-class teardown.
One-shot SFX. Each play call clones the registered
HTMLAudioElementso the same sound can overlap itself; stop cuts every in-flight clone. Inherits registration, enable/disable, and volume from AudioBase.