Package | sekati.media |
Class | public class MP3 |
Inheritance | MP3 flash.events.EventDispatcher |
Implements | IProgressiveMedia |
FileTypeValidator.IS_AUDIO
.
var mp3 : MP3 = new MP3( ); mp3.load( "path/to/song.mp3" ); mp3.play( );
See also
Property | Defined by | ||
---|---|---|---|
bufferLength : Number [read-only]
Amount of play-ahead buffer, in seconds.
| MP3 | ||
channel : SoundChannel [read-only]
The
SoundChannel . | MP3 | ||
context : SoundLoaderContext
The
SoundLoaderContext for the Sound . | MP3 | ||
duration : Number [read-only]
The total playback duration, in seconds.
| MP3 | ||
isBuffering : Boolean [read-only]
Buffering status.
| MP3 | ||
isPaused : Boolean [read-only]
Paused status.
| MP3 | ||
isPlaying : Boolean [read-only]
Playing status.
| MP3 | ||
isStopped : Boolean [read-only]
Stopped status.
| MP3 | ||
pan : Number
The
Sound pan. | MP3 | ||
percentLoaded : Number [read-only]
Return the percent loaded (1 based %).
| MP3 | ||
percentPlayed : Number [read-only]
Return the percent played (1 based %).
| MP3 | ||
percentPlayedWithBuffer : Number [read-only]
The percent of the movie that should be currently buffered.
| MP3 | ||
position : Number [read-only]
The position of the playhead, in seconds.
| MP3 | ||
sound : Sound [read-only]
The
Sound . | MP3 | ||
transform : SoundTransform [read-only]
The
SoundTransform . | MP3 | ||
url : String [read-only] The
Sound url. | MP3 | ||
volume : Number
The
Sound volume (0 - 1). | MP3 |
Method | Defined by | ||
---|---|---|---|
MP3()
MP3 Constructor
| MP3 | ||
destroy():void
Stop playback and cleanup.
| MP3 | ||
fastForward(seconds:Number = 2):void
Fast-Forward playback.
| MP3 | ||
load(url:String, buffer:uint = 4):void
Load the audio and begin playback.
| MP3 | ||
pause():void
Pause playback.
| MP3 | ||
play():void
Start playback.
| MP3 | ||
resume():void
Resume playback.
| MP3 | ||
rewind(seconds:Number = 2):void
Rewind playback.
| MP3 | ||
seek(time:Number):void
Seek to a playback time.
| MP3 | ||
seekToPercent(percent:Number):void
Seek to a playback percent (0 - 1).
| MP3 | ||
stop():void
Stop playback.
| MP3 | ||
togglePause():void
Pause/Resume playback toggle.
| MP3 |
Method | Defined by | ||
---|---|---|---|
checkBuffer():void
Handle buffer externally to
ns.bufferTime so we can achieve proper cuePoint timing. | MP3 | ||
errorHandler(e:IOErrorEvent):void
Error handler.
| MP3 | ||
id3Handler(e:Event):void
ID3 tag handler.
| MP3 | ||
loadCompleteHandler(e:Event):void
Load complete handler
| MP3 | ||
playCompleteHandler(e:Event):void
playback complete handler.
| MP3 | ||
progressHandler(e:Event):void
Playback progress handler.
| MP3 |
bufferLength | property |
bufferLength:Number
[read-only]Amount of play-ahead buffer, in seconds.
Implementation public function get bufferLength():Number
channel | property |
channel:SoundChannel
[read-only]
The SoundChannel
.
public function get channel():SoundChannel
context | property |
context:SoundLoaderContext
[read-write]
The SoundLoaderContext
for the Sound
.
public function get context():SoundLoaderContext
public function set context(value:SoundLoaderContext):void
duration | property |
duration:Number
[read-only]The total playback duration, in seconds.
Implementation public function get duration():Number
isBuffering | property |
isBuffering:Boolean
[read-only]Buffering status.
Implementation public function get isBuffering():Boolean
isPaused | property |
isPaused:Boolean
[read-only]Paused status.
Implementation public function get isPaused():Boolean
isPlaying | property |
isPlaying:Boolean
[read-only]Playing status.
Implementation public function get isPlaying():Boolean
isStopped | property |
isStopped:Boolean
[read-only]Stopped status.
Implementation public function get isStopped():Boolean
pan | property |
pan:Number
[read-write]
The Sound
pan. (0 = balanced, -1 = left, 1 = right).
public function get pan():Number
public function set pan(value:Number):void
percentLoaded | property |
percentLoaded:Number
[read-only]Return the percent loaded (1 based %).
Implementation public function get percentLoaded():Number
percentPlayed | property |
percentPlayed:Number
[read-only]Return the percent played (1 based %).
Implementation public function get percentPlayed():Number
percentPlayedWithBuffer | property |
percentPlayedWithBuffer:Number
[read-only]The percent of the movie that should be currently buffered.
Implementation public function get percentPlayedWithBuffer():Number
See also
position | property |
position:Number
[read-only]The position of the playhead, in seconds.
Implementation public function get position():Number
sound | property |
sound:Sound
[read-only]
The Sound
.
public function get sound():Sound
transform | property |
transform:SoundTransform
[read-only]
The SoundTransform
.
public function get transform():SoundTransform
url | property |
url:String
[read-only] The Sound
url.
public function get url():String
volume | property |
volume:Number
[read-write]
The Sound
volume (0 - 1).
public function get volume():Number
public function set volume(value:Number):void
MP3 | () | constructor |
public function MP3()
MP3 Constructor
checkBuffer | () | method |
protected function checkBuffer():void
Handle buffer externally to ns.bufferTime
so we can achieve proper cuePoint timing.
destroy | () | method |
public function destroy():void
Stop playback and cleanup.
errorHandler | () | method |
protected function errorHandler(e:IOErrorEvent):void
Error handler.
Parameterse:IOErrorEvent |
fastForward | () | method |
public function fastForward(seconds:Number = 2):void
Fast-Forward playback.
Parametersseconds:Number (default = 2 ) — to step forward.
|
id3Handler | () | method |
protected function id3Handler(e:Event):void
ID3 tag handler.
Parameterse:Event |
load | () | method |
public function load(url:String, buffer:uint = 4):void
Load the audio and begin playback.
Parametersurl:String — of the audio file.
|
|
buffer:uint (default = 4 ) — in seconds
|
— ArgumentError if url is not audio type.
|
loadCompleteHandler | () | method |
protected function loadCompleteHandler(e:Event):void
Load complete handler
Parameterse:Event |
pause | () | method |
public function pause():void
Pause playback.
play | () | method |
public function play():void
Start playback.
playCompleteHandler | () | method |
protected function playCompleteHandler(e:Event):void
playback complete handler.
Parameterse:Event |
progressHandler | () | method |
protected function progressHandler(e:Event):void
Playback progress handler.
Parameterse:Event |
resume | () | method |
public function resume():void
Resume playback.
rewind | () | method |
public function rewind(seconds:Number = 2):void
Rewind playback.
Parametersseconds:Number (default = 2 ) — to step back.
|
seek | () | method |
public function seek(time:Number):void
Seek to a playback time.
Parameterstime:Number — in playback to seek to.
|
seekToPercent | () | method |
public function seekToPercent(percent:Number):void
Seek to a playback percent (0 - 1).
Parameterspercent:Number — of playback to seek to.
|
stop | () | method |
public function stop():void
Stop playback.
togglePause | () | method |
public function togglePause():void
Pause/Resume playback toggle.