@patomation/sound

1.0.0 • Public • Published

Sound

a JavaScript sound manager library

A way to play multiple sounds at once, the ability to stop them from playing. Nice sound fade out when stopping instead of abruptly ending.

Installation

npm install @patomation/sound

or

yarn install @patomation/sound

Usage

import sound from '@patomation/sound'

sound.add('mysoundID', 'pathToSound/mysound.mp3')

sound.player.play('mysoundID')

Stopping the sound

sound.player.stop('mysoundID')

Setting master volume

sound.player.volume(0.6)

Removing a sound

sound.remove('mysoundID')

Package Sidebar

Install

npm i @patomation/sound

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

11.4 kB

Total Files

16

Last publish

Collaborators

  • patomation