mx.controls.streamingmedia.AbstractPlayer +--mx.controls.streamingmedia.FLVPlayer
IPlayer
FLVPlayer contains the logic to play FLV streaming media files.
_isLoaded
, _listeners
, _mediaUrl
, _momentaryPlayId
, _nc
, _ns
, _sound
, _totalTime
, _video
, _videoHeight
, _videoHolder
, _videoWidth
_playing
, playing
new FLVPlayer()
public _videoHolder:MovieClip
public _video:Video
private _sound:Sound
private _nc:NetConnection
private _ns:PlayerNetStream
private _mediaUrl:String
private _totalTime:Number
private _isLoaded:Boolean
private _listeners:Array
private _momentaryPlayId:Number
private _videoHeight:Number
private _videoWidth:Number
public function broadcastEvent(status:String):Void
The listeners must implement the "handlePlayer" function which takes the current status as a parameter.
private function assignBufferTime():Void
Assign the buffer time of the netstream as a function of the total time.
public function play(startingPoint:Number):Void
Play the media starting at the specified starting point. If the media hasn't yet been loaded, load it.
- Parameters
startingPoint
The number of seconds into the media to start at. This is an optional parameter. If omitted, playing will occur at the current playhead position.
public function getPlayheadTime():Number
- Return
- The playhead position, measued in seconds since the start.
public function getMediaBytesLoaded():Number
- Return
- The number of bytes of the media that has loaded.
public function getMediaBytesTotal():Number
- Return
- The total number of bytes of the media.
public function getTotalTime():Number
- Return
- The total time of the media in seconds. For mp3 files, this is a property of the Sound object. For video, it is a property that is manually set by the author.