Main Page | Packages | Class Tree | Index | Help

mx.controls.streamingmedia

class RTMPPlayer

Object
  |
  +--mx.controls.streamingmedia.AbstractPlayer
        |
        +--mx.controls.streamingmedia.RTMPPlayer

Implemented Interfaces: IPlayer

class RTMPPlayer
extends AbstractPlayer

RTMPPlayer contains the logic to play FLV streaming media files from Flash Communication Server.


Author:
Stephen Cheng


Field Summary

public
_video: Video
Embedded video object used to display video

public
_videoHolder: MovieClip
Holds the video.

Fields inherited from class Object

__proto__, constructor, prototype

Properties inherited from class mx.controls.streamingmedia.AbstractPlayer

playing

Constructor

public
RTMPPlayer ( aMediaUrl: String, aMediaType: String, aVideoHolder: MovieClip, aTotalTime: Number)
Constructor.

Method Summary

public
addListener ( aListener: Object ): Void


public
broadcastEvent ( status: String ): Void
The listeners must implement the "handlePlayer" function which takes the current status as a parameter.

public
bufferIsFull ( ): Void


public
checkComplete ( ): Void


public
close ( ): Void
Close the player

public
connectRtmpt ( ): Void
This is called if we are not getting a successful rtmp connection after 3 seconds stream if play is pending

public
doneUpdateFrame ( ): Void
Stop the playback.

public
getMediaBytesLoaded ( ): Number


public
getMediaBytesTotal ( ): Number


public
getMediaUrl ( ): String


public
getPlayheadTime ( ): Number


public
getTotalTime ( ): Number


public
getVolume ( ): Number


public
isSizeChange ( ): Boolean


public
isSizeSet ( ): Boolean


public
load ( ): Void
Make connection to the server and load the media without playing it.

public
logError ( error: String ): Void
Log error from FlashCom server

public
mediaLoaded ( ): Void
Called when the media is completely loaded.

public
onConnectTimeOut ( ): Void
This is called when connection timeout.

public
pause ( ): Void
Stop playback of the media without moving the playhead.

public
play ( startingPoint: Number ): Void
Play the media starting at the specified starting point.

public
playStopped ( ): Void


public
removeAllListeners ( ): Void


public
resizeVideo ( ): Void


public
setMediaUrl ( aUrl: String ): Void


public
setPlayheadTime ( position: Number ): Void


public
setSeeking ( isSeeking: Boolean ): Void


public
setTotalTime ( aTime: Number ): Void


public
setVolume ( aVol: Number ): Void


public
stop ( ): Void
Stop playback of the media and reset the playhead to zero.

public
toString ( ): String


Methods inherited from class mx.controls.streamingmedia.AbstractPlayer

isPlaying, setPlaying

Methods inherited from class Object

addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toLocaleString, toString, unwatch, valueOf, watch



Field Documentation

_video

public var _video: Video
Embedded video object used to display video

_videoHolder

public var _videoHolder: MovieClip
Holds the video.

Also used to control volume


Constructor Documentation

RTMPPlayer

public function RTMPPlayer(aMediaUrl: String,
 aMediaType: String,
 aVideoHolder: MovieClip,
 aTotalTime: Number)
Constructor.


Method Documentation

addListener

public function addListener(aListener: Object): Void
Specified by:
addListener in interface IPlayer

broadcastEvent

public function broadcastEvent(status: String): Void
The listeners must implement the "handlePlayer" function which takes the current status as a parameter.

bufferIsFull

public function bufferIsFull(): Void
Specified by:
bufferIsFull in interface IPlayer

checkComplete

public function checkComplete(): Void

close

public function close(): Void
Close the player

Specified by:
close in interface IPlayer

connectRtmpt

public function connectRtmpt(): Void
This is called if we are not getting a successful rtmp connection after 3 seconds stream if play is pending

doneUpdateFrame

public function doneUpdateFrame(): Void
Stop the playback.

getMediaBytesLoaded

public function getMediaBytesLoaded(): Number
Specified by:

Returns:
The number of bytes of the media that has loaded.

getMediaBytesTotal

public function getMediaBytesTotal(): Number
Specified by:

Returns:
The total number of bytes of the media.

getMediaUrl

public function getMediaUrl(): String
Specified by:
getMediaUrl in interface IPlayer

getPlayheadTime

public function getPlayheadTime(): Number
Specified by:

Returns:
The playhead position, measued in seconds since the start.

getTotalTime

public function getTotalTime(): Number
Specified by:
getTotalTime in interface IPlayer

Returns:
The total time of the media in seconds. It is a property that is manually set by the author.

getVolume

public function getVolume(): Number
Specified by:
getVolume in interface IPlayer

isSizeChange

public function isSizeChange(): Boolean
Specified by:
isSizeChange in interface IPlayer

isSizeSet

public function isSizeSet(): Boolean
Specified by:
isSizeSet in interface IPlayer

load

public function load(): Void
Make connection to the server and load the media without playing it.

Specified by:
load in interface IPlayer

logError

public function logError(error: String): Void
Log error from FlashCom server

Specified by:
logError in interface IPlayer

mediaLoaded

public function mediaLoaded(): Void
Called when the media is completely loaded.

Specified by:
mediaLoaded in interface IPlayer

onConnectTimeOut

public function onConnectTimeOut(): Void
This is called when connection timeout.

pause

public function pause(): Void
Stop playback of the media without moving the playhead.

Specified by:
pause in interface IPlayer

play

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.

Specified by:
play in interface IPlayer

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.

playStopped

public function playStopped(): Void
Specified by:
playStopped in interface IPlayer

removeAllListeners

public function removeAllListeners(): Void
Specified by:

resizeVideo

public function resizeVideo(): Void
Specified by:
resizeVideo in interface IPlayer

setMediaUrl

public function setMediaUrl(aUrl: String): Void
Specified by:
setMediaUrl in interface IPlayer

setPlayheadTime

public function setPlayheadTime(position: Number): Void
Specified by:

setSeeking

public function setSeeking(isSeeking: Boolean): Void
Specified by:
setSeeking in interface IPlayer

setTotalTime

public function setTotalTime(aTime: Number): Void

setVolume

public function setVolume(aVol: Number): Void
Specified by:
setVolume in interface IPlayer

stop

public function stop(): Void
Stop playback of the media and reset the playhead to zero.

Specified by:
stop in interface IPlayer

toString

public function toString(): String
Overrides:

Returns:
A string representation of this player.


The documentation was generated from the following file:


Copyright © 1997-2005 Macromedia, Inc. All rights reserved. Generated with AS2Doc