ProtectedsongsRegistered audio elements keyed by name. Subclasses read this; mutate via register.
Whether music playback is permitted (inherited from AudioBase).
Flipping from false to true while no music is playing auto-starts a fade-in to a random track.
true while a fade is in progress OR the current track is actively playing.
Cross-fade to name (or a random unplayed track when null) over fadeTime ms. easing.cur controls the outgoing track's volume curve, easing.next the incoming one. Cancels any in-progress fade. No-op when disabled. Throws on fadeTime <= 0, an empty registry, or an unknown name. When the new track ends, the next fade fires automatically — call stop to break the cycle.
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.
Background music with eased cross-fades. Tracks auto-cycle: when the current track ends, the next one fades in. Inherits registration, enable/disable, and volume from AudioBase.
Random track picking excludes the previous two songs to avoid back-to-back repeats. If only one track is registered, it's looped instead of faded.