Package | cv.media |
Class | public class RTMPPlayer |
Inheritance | RTMPPlayer ![]() ![]() |
Implements | IMediaPlayer |
Property | Defined by | ||
---|---|---|---|
![]() | autoRewind : Boolean = false
Will automatically call stop (rewind) after playing complete.
| NetStreamPlayer | |
![]() | autoScale : Boolean = false
Gets or sets whether the video object will be scaled to the metadata given
for video dimensions.
| NetStreamPlayer | |
![]() | autoStart : Boolean
Whether media will play automatically once loaded.
| NetStreamPlayer | |
![]() | buffer : int
Gets or sets how long the NetStreamPlayer should buffer the video before playing, in seconds.
| NetStreamPlayer | |
![]() | currentPercent : uint
Gets the current play progress in terms of percent
| NetStreamPlayer | |
![]() | debug : Boolean = false | NetStreamPlayer | |
![]() | leftToLeft : Number
A value, from 0 (none) to 1 (all), specifying how much of the left input is played in the left speaker.
| NetStreamPlayer | |
![]() | leftToRight : Number
A value, from 0 (none) to 1 (all), specifying how much of the left input is played in the right speaker.
| NetStreamPlayer | |
![]() | loadCurrent : uint
Gets the current load progress in terms of bytes
| NetStreamPlayer | |
![]() | loadTotal : uint
Gets the total size to be loaded in terms of bytes
| NetStreamPlayer | |
![]() | metaData : Object
Gets the metadata if available for the currently playing audio file
| NetStreamPlayer | |
netConnection : NetConnection [read-only]
Returns a reference to the NetConnection if it exists.
| RTMPPlayer | ||
objectEncoding : uint
Gets or sets the object encodeing for use with streaming servers.
| RTMPPlayer | ||
![]() | pan : Number
The left-to-right panning of the sound, ranging from -1 (full pan left) to 1 (full pan right).
| NetStreamPlayer | |
![]() | paused : Boolean
Returns the pause status of the player.
| NetStreamPlayer | |
![]() | rightToLeft : Number
A value, from 0 (none) to 1 (all), specifying how much of the right input is played in the left speaker.
| NetStreamPlayer | |
![]() | rightToRight : Number
A value, from 0 (none) to 1 (all), specifying how much of the right input is played in the right speaker.
| NetStreamPlayer | |
![]() | status : String
Returns the load status of the player.
| NetStreamPlayer | |
streamHost : String
Gets or sets the stream host url for use with streaming media.
| RTMPPlayer | ||
![]() | timeCurrent : Number
Gets the elapsed play time in milliseconds
| NetStreamPlayer | |
![]() | timeLeft : Number
Gets the remaining play time in milliseconds
| NetStreamPlayer | |
![]() | timeTotal : Number
Gets the total play time in milliseconds
| NetStreamPlayer | |
![]() | video : Video
Gets or sets the reference to the display video object.
| NetStreamPlayer | |
![]() | volume : Number
Gets or sets the current volume, from 0 - 1
| NetStreamPlayer |
Method | Defined by | ||
---|---|---|---|
RTMPPlayer | |||
addHeader(operation:String, mustUnderstand:Boolean = false, param:Object = null):void
Adds a context header to the Action Message Format (AMF) packet structure.
| RTMPPlayer | ||
call(command:String, responder:Responder, ... rest):void
Invokes a command or method on Flash Media Server or on an
application server running Flash Remoting.
| RTMPPlayer | ||
isValid(ext:String, url:String):Boolean
| RTMPPlayer | ||
![]() |
load(item:*):void
Loads a new file to be played.
| NetStreamPlayer | |
![]() |
pause(b:Boolean = true):void
Loads a netstream from the BulkLoader to be played.
| NetStreamPlayer | |
![]() |
play(pos:int = 0):void
Plays the media, starting at the given position.
| NetStreamPlayer | |
![]() |
seek(time:*):void
Seeks to time given in the media.
| NetStreamPlayer | |
![]() |
seekPercent(n:Number):void
Seeks to the given percent in the media
| NetStreamPlayer | |
![]() |
stop():void
Stops the media at the specified position.
| NetStreamPlayer | |
![]() |
unload():void
Stops the media, closes the NetConnetion or NetStream, and resets the metadata.
| NetStreamPlayer |
Method | Defined by | ||
---|---|---|---|
![]() |
createConnection(command:String = null):void
| NetStreamPlayer | |
![]() |
createStream(netstream:NetStream = null):void
| NetStreamPlayer | |
![]() |
errorHandler(e:ErrorEvent):void
| NetStreamPlayer | |
![]() |
getEstimatedLength():int
| NetStreamPlayer | |
![]() |
loadTimerHandler(event:TimerEvent):void
| NetStreamPlayer | |
netStatusHandler(e:NetStatusEvent):void
| RTMPPlayer | ||
onBWCheck(... rest):Number
This is required by native bandwidth detection.
| RTMPPlayer | ||
onBWDone(... rest):void
The server calls the onBWDone() function when it finishes measuring
the bandwidth.
| RTMPPlayer | ||
onCaption(cps:String, spk:Number):void
| RTMPPlayer | ||
onCaptionInfo(o:Object):void
| RTMPPlayer | ||
![]() |
onCuePoint(o:Object):void
| NetStreamPlayer | |
onFCSubscribe(o:Object):void
| RTMPPlayer | ||
onImageData(o:Object):void
| RTMPPlayer | ||
onLastSecond(o:Object):void
| RTMPPlayer | ||
![]() |
onMetaData(o:Object):void
Handles the metadata returned.
| NetStreamPlayer | |
onPlayStatus(o:Object):void
| RTMPPlayer | ||
onTextData(o:Object):void
| RTMPPlayer | ||
![]() |
playTimerHandler(event:TimerEvent):void
| NetStreamPlayer | |
RtmpSampleAccess(o:Object):void
| RTMPPlayer | ||
![]() |
setStatus(str:String):void
| NetStreamPlayer | |
![]() |
trace2(... arguements):void
| NetStreamPlayer | |
![]() |
updateProgress():void
| NetStreamPlayer | |
![]() |
updateSoundTransform():void
| NetStreamPlayer |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when onBWDone is called. | RTMPPlayer | |||
Dispatched when onCaption is called. | RTMPPlayer | |||
Dispatched when onCaptionInfo is called. | RTMPPlayer | |||
![]() | Dispatched when a cue point is reached. | NetStreamPlayer | ||
Dispatched when onFCSubscribe is called. | RTMPPlayer | |||
Dispatched when onImageData is called. | RTMPPlayer | |||
Dispatched when onLastSecond is called. | RTMPPlayer | |||
![]() | Dispatched when the media file has completed loading | NetStreamPlayer | ||
![]() | Dispatched as a media file is loaded | NetStreamPlayer | ||
![]() | Dispatched as a media file begins loading | NetStreamPlayer | ||
![]() | Dispatched as metadata is receieved from the media playing | NetStreamPlayer | ||
![]() | Dispatched as a media file finishes playing | NetStreamPlayer | ||
![]() | Dispatched as a media file is playing | NetStreamPlayer | ||
![]() | Dispatched once as a media file first begins to play | NetStreamPlayer | ||
Dispatched when onPlayStatus is called. | RTMPPlayer | |||
Dispatched when RTMPSampleAccess is called. | RTMPPlayer | |||
![]() | Dispatched when isPause or isPlaying has updated. | NetStreamPlayer | ||
Dispatched when onTextData is called. | RTMPPlayer |
Constant | Defined by | ||
---|---|---|---|
VERSION : String = "1.0.0" [static]
The current version
| RTMPPlayer |
netConnection | property |
netConnection:NetConnection
[read-only]Returns a reference to the NetConnection if it exists. This is used instead of having all the same properties in NetStreamPlayer. Note: addHeader() and call() are added to NetStreamPlayer for your convenience.
Implementation public function get netConnection():NetConnection
See also
objectEncoding | property |
objectEncoding:uint
[read-write]Gets or sets the object encodeing for use with streaming servers.
Implementation public function get objectEncoding():uint
public function set objectEncoding(value:uint):void
streamHost | property |
streamHost:String
[read-write]Gets or sets the stream host url for use with streaming media.
Implementation public function get streamHost():String
public function set streamHost(value:String):void
RTMPPlayer | () | constructor |
public function RTMPPlayer()
addHeader | () | method |
public function addHeader(operation:String, mustUnderstand:Boolean = false, param:Object = null):void
Adds a context header to the Action Message Format (AMF) packet structure. This header is sent with every future AMF packet. If you call NetConnection.addHeader() using the same name, the new header replaces the existing header, and the new header persists for the duration of the NetConnection object. You can remove a header by calling NetConnection.addHeader() with the name of the header to remove an undefined object.
Parametersoperation:String — Identifies the header and the ActionScript object
data associated with it.
|
|
mustUnderstand:Boolean (default = false ) — A value of true indicates that the server must
understand and process this header before it handles any of the
following headers or messages.
|
|
param:Object (default = null ) — Any ActionScript object.
|
call | () | method |
public function call(command:String, responder:Responder, ... rest):void
Invokes a command or method on Flash Media Server or on an application server running Flash Remoting.
Parameterscommand:String — A method specified in the form [objectPath/]method.
For example, the someObject/doSomething command tells the remote
server to invoke the clientObject.someObject.doSomething() method,
with all the optional ... arguments parameters. If the object path
is missing, clientObject.doSomething() is invoked on the remote server.
|
|
responder:Responder — An optional object that is used to handle return
values from the server. The Responder object can have two defined
methods to handle the returned result: result and status. If an error
is returned as the result, status is invoked; otherwise, result is
invoked. The Responder object can process errors related to specific
operations, while the NetConnection object responds to errors related
to the connection status.
|
|
... rest — rest Optional arguments that can be of any ActionScript
type, including a reference to another ActionScript object. These
arguments are passed to the method specified in the command parameter
when the method is executed on the remote application server.
|
isValid | () | method |
public override function isValid(ext:String, url:String):Boolean
Parameters
ext:String |
|
url:String |
Boolean |
netStatusHandler | () | method |
protected override function netStatusHandler(e:NetStatusEvent):void
Parameters
e:NetStatusEvent |
onBWCheck | () | method |
protected function onBWCheck(... rest):Number
This is required by native bandwidth detection. It takes an argument, ...rest. The function must return a value, even if the value is 0, to indicate to the server that the client has received the data.
Parameters... rest — rest
|
Number |
onBWDone | () | method |
protected function onBWDone(... rest):void
The server calls the onBWDone() function when it finishes measuring the bandwidth. It takes four arguments. The first argument it returns is the bandwidth measured in Kbps. The second and third arguments are not used. The fourth argument is the latency in milliseconds.
Parameters... rest — rest
|
onCaption | () | method |
protected function onCaption(cps:String, spk:Number):void
Parameters
cps:String |
|
spk:Number |
onCaptionInfo | () | method |
protected function onCaptionInfo(o:Object):void
Parameters
o:Object |
onFCSubscribe | () | method |
protected function onFCSubscribe(o:Object):void
Parameters
o:Object |
onImageData | () | method |
protected function onImageData(o:Object):void
Parameters
o:Object |
onLastSecond | () | method |
protected function onLastSecond(o:Object):void
Parameters
o:Object |
onPlayStatus | () | method |
protected function onPlayStatus(o:Object):void
Parameters
o:Object |
onTextData | () | method |
protected function onTextData(o:Object):void
Parameters
o:Object |
RtmpSampleAccess | () | method |
protected function RtmpSampleAccess(o:Object):void
Parameters
o:Object |
bandwidth | event |
caption | event |
captionInfo | event |
fcSubscribe | event |
imageData | event |
lastSecond | event |
playStatus | event |
RTMPSampleAccess | event |
textData | event |
VERSION | constant |
public static const VERSION:String = "1.0.0"
The current version