EZ Web Audio / stopAll
Function: stopAll()
stopAll(
sounds):Promise<void>
Defined in: utils/collections.ts:45
Stops all playable sounds in the provided array. Supports nested arrays which are recursively flattened. Uses best-effort error handling - attempts to stop all sounds even if some fail.
Parameters
sounds
NestedArray<Playable>
Array of Playable instances or nested arrays of Playables
Returns
Promise<void>
Throws
CollectionError if any sounds fail to stop
Example
typescript
const sounds = [sound1, sound2, [sound3, sound4]]
await stopAll(sounds)