A class to store the optional play properties passed in play and play calls.
Optional Play Properties Include:
INTERRUPT_TYPE
constants on the Sound class, with the default defined by defaultInterruptBehavior.var props = new createjs.PlayPropsConfig().set({interrupt: createjs.Sound.INTERRUPT_ANY, loop: -1, volume: 0.5})
createjs.Sound.play("mySound", props);
// OR
mySoundInstance.play(props);
createvalue
Defined in
create:147
Creates a PlayPropsConfig from another PlayPropsConfig or an Object.
value
PlayPropsConfig | Object
The play properties
setprops
Defined in
set:168
Provides a chainable shortcut method for setting a number of properties on the instance.
var PlayPropsConfig = new createjs.PlayPropsConfig().set({loop:-1, volume:0.7});
props
Object
A generic object containing properties to copy to the PlayPropsConfig instance.
Returns the instance the method is called on (useful for chaining calls.)
delay
Defined in
delay:84
The amount of time to delay the start of audio playback, in milliseconds.
Default: null
duration
Defined in
duration:134
Used to create an audio sprite (with startTime), the amount of time to play the clip for, in milliseconds.
Default: null
interrupt
Defined in
interrupt:73
How to interrupt any currently playing instances of audio with the same source,
if the maximum number of instances of the sound are already playing. Values are defined as
INTERRUPT_TYPE constants on the Sound class, with the default defined by
defaultInterruptBehavior.
Default: null
loop
Defined in
loop:100
How many times the audio loops when it reaches the end of playback. The default is 0 (no loops), and -1 can be used for infinite playback.
Default: null
offset
Defined in
offset:92
The offset from the start of the audio to begin playback, in milliseconds.
Default: null
pan
Defined in
pan:118
The left-right pan of the sound (if supported), between -1 (left) and 1 (right).
Default: null
startTime
Defined in
startTime:126
Used to create an audio sprite (with duration), the initial offset to start playback and loop from, in milliseconds.
Default: null
volume
Defined in
volume:109
The volume of the sound, between 0 and 1. Note that the master volume is applied against the individual volume.
Default: null