SoundManager <Channel, SoundName>
Implements
Index
Constructors
constructor
Type parameters
- Channel: string
- SoundName: string
Parameters
options: SoundManagerOptions<Channel, SoundName>
Returns SoundManager<Channel, SoundName>
Properties
public_muted
publicchannel
Accessors
publicdefaultVolume
Returns number
Parameters
volume: number
Returns void
Methods
public_getEffectiveVolume
Parameters
sound: Sound
Returns number
public_isMuted
Parameters
sound: Sound
Returns boolean
publicaddChannel
publicgetSound
publicgetSounds
Returns readonly Sound[]
publicgetSoundsForChannel
publicgetVolume
Gets the volumn for a sound
Parameters
soundName: SoundName
Returns number
publicmute
Parameters
optionalname: SoundName
Returns void
publicplay
Parameters
soundName: SoundName
volume: number = ...
Returns Promise<void>
publicremoveChannel
publicsetVolume
Parameters
soundname: SoundName
volume: number = ...
Returns void
publicstop
Parameters
optionalname: SoundName
Returns void
publictoggle
Parameters
optionalname: SoundName
Returns void
publictrack
Parameters
name: SoundName | AnyString
soundOrConfig: Sound | SoundConfig<string>
Returns void
publicunmute
Parameters
optionalname: SoundName
Returns void
publicuntrack
Remove the maximum volume for a sound, will be 100% of the source volume
Untracks the Sound in the sound manager
Parameters
soundName: SoundName
Returns void
Manage Sound volume levels without mutating the original Sound objects