npm install sound-manager-ts
import { SoundManager, SoundEventsEnum, SoundEvent } from "sound-manager-ts";
const sm: SoundManager = new SoundManager();
sm.addEventListener(SoundEventsEnum.LOADED, (event: SoundEvent) => {
console.log("Loaded:", event.soundId);
});
await sm.loadSounds([{ id: "click", url: "/sounds/click.mp3" }]);
sm.play("click");
Load sounds, control volume, use sprites, adjust panning, and explore all SoundManager features in one interactive demo.
Open DemoOrganize sounds into named groups and control multiple audio channels simultaneously with group-level volume, play, and stop controls.
Open DemoGroup sounds with shared instance limits. See maxInstances enforcement live: when the cap is hit, the oldest instance stops automatically to make room for the new one.
Open DemoSplit a single audio file into multiple named sprite regions. Play jump, power-up, victory, and other game sounds from one MP3 using start-time and duration tuples.
Open DemoTest your surround sound speaker setup. Position audio in 3D space front, back, left, right ideal for TV and home theatre configurations.
Open DemoFull API reference, configuration options, event types, and usage examples for all SoundManager features.
View DocsInstall sound-manager-ts via npm and integrate advanced audio control into your TypeScript or JavaScript project.
Getting started guide, installation instructions, configuration reference, and complete code examples to get up and running fast.
Read Guide