Play MP3 files through the Flash SWF built in the DEFT project.
This class is brand new, so there is a lot of functionality not yet available. The initial purpose is for playing "event" sounds like button clicks, and for loading and controlling multiple sounds at once. As of yet, streaming is not supported and polling the sounds for events during playback may still be missing information. Markup is not supported, as it may not be needed.
TODO: Streaming, playback events, crossdomain, CDN support, (alternate SWF location), global volume, ID3 tag, factor out doLater, onLoadStatus needs work, play(position) / seek()
Parameter | Type | Description |
---|---|---|
options | Object |
See the dojox/av/FLAudio reference documentation for more information.
1 2 3 4 5 | new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay: false }); |
From -1 to 1 (-1 is left, 1 is right, 0 is middle) Sets pan for all files unless changed with play or setPan
From 0-1 Sets volume for all files unless changed with doPlay or setVolume
Setting to true tells the SWF to output log messages to Firebug.
How often in milliseconds that the status of the player is checked - both load and play
Checks that path is relative to HTML file or converts it to an absolute path.
Parameter | Type | Description |
---|---|---|
_url | undefined |
Ensures volume is less than one
Parameter | Type | Description |
---|---|---|
vol | number |
helper for subscribing to topics
Parameter | Type | Description |
---|---|---|
topic | undefined | |
method | undefined |
Tell media to play, based on the options passed.
Parameter | Type | Description |
---|---|---|
options | Object |
|
Set media pan, based on identifier in the options passed.
Parameter | Type | Description |
---|---|---|
options | Object | index:Number OR id:String OR url:String. See doPlay(). |
Get the current time.
Parameter | Type | Description |
---|---|---|
options | Object | index:Number OR id:String OR url:String. See doPlay(). |
Get media volume, based on identifier in the options passed.
Parameter | Type | Description |
---|---|---|
options | Object | index:Number OR id:String OR url:String. See doPlay(). |
Adds a media object to the playlist *This can be called repeatedly to add multiple items.
Parameter | Type | Description |
---|---|---|
options | Object |
|
The normalized url, which can be used to identify the audio.
Tell media to pause, based on identifier in the options passed.
Parameter | Type | Description |
---|---|---|
options | Object | index:Number OR id:String OR url:String. See doPlay(). |
Set media pan, based on identifier in the options passed.
Parameter | Type | Description |
---|---|---|
options | Object |
|
Set media volume, based on identifier in the options passed.
Parameter | Type | Description |
---|---|---|
options | Object | volume: Number 0 to 1 index:Number OR id:String OR url:String. See doPlay(). |
Tell media to stop, based on identifier in the options passed.
Parameter | Type | Description |
---|---|---|
options | Object | index:Number OR id:String OR url:String. See doPlay(). |
stub fired
1 2 3 4 5 | new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay: false }); |
Fired at the end of a media file.
Parameter | Type | Description |
---|---|---|
events | Array |
1 2 3 4 5 | new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay: false }); |
stub fired when an error occurs
Parameter | Type | Description |
---|---|---|
msg | undefined |
1 2 3 4 5 | new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay: false }); |
Fired when the ID3 data is received.
Parameter | Type | Description |
---|---|---|
evt | undefined |
1 2 3 4 5 | new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay: false }); |
stub fired when SWF is ready
1 2 3 4 5 | new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay: false }); |
Parameter | Type | Description |
---|---|---|
events | Array |
1 2 3 4 5 | new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay: false }); |
Parameter | Type | Description |
---|---|---|
events | Array |
1 2 3 4 5 | new dojox.av.FLAudio({ initialVolume:.7, initialPan:0, autoPlay: false }); |