Packagevegas.net
Classpublic class NetStreamClient
InheritanceNetStreamClient Inheritance CoreEventDispatcher Inheritance Object
Implements INetStreamClient
Subclasses NetStreamExpert

Specifies the advanced object on which callback methods are invoked by a NetStream object.



Public Properties
 PropertyDefined By
  buffer : Number
[read-only] Specifies the unit value of the buffer that is filled (value between 0 and 1).
NetStreamClient
  bufferLength : Number
[read-only] Indicates the number of seconds to save the buffer in memory.
NetStreamClient
  bufferPercent : Number
[read-only] Specifies the percentage of the buffer that is filled (value between 0 and 100).
NetStreamClient
  bufferTime : Number
Indicates the buffer time of the stream.
NetStreamClient
  bytes : Number
[read-only] The unit size value in bytes of the file being loaded into the player (value between 0 and 1).
NetStreamClient
  bytesLoaded : Number
[read-only] The number of bytes of data that have been loaded into the application.
NetStreamClient
  bytesPercent : Number
[read-only] The percentage size in bytes of the file being loaded into the player (value between 0 and 100).
NetStreamClient
  bytesTotal : Number
[read-only] The total size in bytes of the file being loaded into the application.
NetStreamClient
 Inheritedchannel : String
[read-only] Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
  cuePoint : Signaler
[read-only] This signal emit cuepoint informations when an embedded cue point is reached while playing an FLV file.
NetStreamClient
  duration : Number
[read-only] Indicates the duration of the media.
NetStreamClient
  error : Signaler
[read-only] This signal emit when the Flash Player notify an ErrorEvent.
NetStreamClient
  imageData : Signaler
[read-only] This signal emit when Flash Player receives image data as a byte array embedded in a media file that is playing.
NetStreamClient
  meta : Signaler
[read-only] This signal emit metadatas informations when the application receives descriptive information embedded in the video being played.
NetStreamClient
  metadata : FLVMetaData
The flv metadata object.
NetStreamClient
  muteIt : Signaler
This signal emit when the sound is muted.
NetStreamClient
  netStream : NetStream
The owner NetStream reference of this object.
NetStreamClient
  pan : Number
Specifies the left-to-right panning of the sound, ranging from -1 (full pan left) to 1 (full pan right).
NetStreamClient
  playStatus : Signaler
[read-only] This signal emit when the application receives descriptive information embedded in the video being played.
NetStreamClient
  progress : Number
[read-only] Specifies the percentage progress value of the stream.
NetStreamClient
  status : Signaler
[read-only] This signal emit when the application receives descriptive information embedded in the video being played.
NetStreamClient
  textData : Signaler
[read-only] This signal emit when the Flash Player receives text data embedded in a media file that is playing.
NetStreamClient
  time : Number
[read-only] Indicates the time value in seconds of the stream.
NetStreamClient
  unmuteIt : Signaler
This signal emit when the sound is unmuted.
NetStreamClient
  verbose : Boolean
The verbose mode.
NetStreamClient
  video : Video
The Video reference of this expert.
NetStreamClient
  volume : Number
Specifies the volume, ranging from 0 (silent) to 1 (full volume).
NetStreamClient
  xmpData : Signaler
[read-only] This signal emit when receives information specific to Adobe Extensible Metadata Platform (XMP) that is embedded in the Adobe F4V or FLV video file.
NetStreamClient
Public Methods
 MethodDefined By
  
NetStreamClient(netStream:NetStream = null, video:Video = null)
Creates a new NetStreamClient instance.
NetStreamClient
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
CoreEventDispatcher
  
clear():void
Clear the video reference.
NetStreamClient
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
  
dispose():void
Dispose the expert and close all process and remove all dependencies of this object.
NetStreamClient
 Inherited
Returns the internal system.events.EventDispatcher reference.
CoreEventDispatcher
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
isGlobal():Boolean
Indicates if the dispatcher use a global event flow.
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
  
isMuted():Boolean
Returns true if the sound is muted.
NetStreamClient
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
  
mute():void
Mute the sound of the netstream.
NetStreamClient
  
onCuePoint(info:Object):void
Invoked when an embedded cue point is reached while playing an FLV file.
NetStreamClient
  
onImageData(imageData:Object):void
Dispatched when Flash Player receives image data as a byte array embedded in a media file that is playing.
NetStreamClient
  
onMetaData(info:Object):void
Dispatched when the application receives descriptive information embedded in the video being played.
NetStreamClient
  
onPlayStatus(info:Object):void
Dispatched when the application receives descriptive information embedded in the video being played.
NetStreamClient
  
onTextData(textData:Object):void
The onTextData event sends text data through an AMF0 data channel.
NetStreamClient
  
onXMPData(info:Object):void
The onXMPData() callback function receives information specific to Adobe Extensible Metadata Platform (XMP) that is embedded in the Adobe F4V or FLV video file.
NetStreamClient
 Inherited
registerEventListener(type:String, listener:*, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
  
setDuration(duration:Number = 0):void
Sets the duration of the stream video.
NetStreamClient
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global system.events.EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
  
unmute():void
Unmute the sound of the netstream.
NetStreamClient
 Inherited
unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 Inherited
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
CoreEventDispatcher
Protected Methods
 MethodDefined By
  
Invoked when a modification of the expert is success.
NetStreamClient
  
handleError(e:ErrorEvent):void
Invoked when the NetStream notify an ErrorEvent.
NetStreamClient
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
  
netStatus(e:NetStatusEvent):void
Invoked when the NetStream status is changed.
NetStreamClient
Property Detail
bufferproperty
buffer:Number  [read-only]

Specifies the unit value of the buffer that is filled (value between 0 and 1).


Implementation
    public function get buffer():Number
bufferLengthproperty 
bufferLength:Number  [read-only]

Indicates the number of seconds to save the buffer in memory.


Implementation
    public function get bufferLength():Number
bufferPercentproperty 
bufferPercent:Number  [read-only]

Specifies the percentage of the buffer that is filled (value between 0 and 100).


Implementation
    public function get bufferPercent():Number
bufferTimeproperty 
bufferTime:Number

Indicates the buffer time of the stream.


Implementation
    public function get bufferTime():Number
    public function set bufferTime(value:Number):void
bytesproperty 
bytes:Number  [read-only]

The unit size value in bytes of the file being loaded into the player (value between 0 and 1).


Implementation
    public function get bytes():Number
bytesLoadedproperty 
bytesLoaded:Number  [read-only]

The number of bytes of data that have been loaded into the application.


Implementation
    public function get bytesLoaded():Number
bytesPercentproperty 
bytesPercent:Number  [read-only]

The percentage size in bytes of the file being loaded into the player (value between 0 and 100).


Implementation
    public function get bytesPercent():Number
bytesTotalproperty 
bytesTotal:Number  [read-only]

The total size in bytes of the file being loaded into the application.


Implementation
    public function get bytesTotal():Number
cuePointproperty 
cuePoint:Signaler  [read-only]

This signal emit cuepoint informations when an embedded cue point is reached while playing an FLV file.


Implementation
    public function get cuePoint():Signaler
durationproperty 
duration:Number  [read-only]

Indicates the duration of the media. This feature work only if the client property is NetServerStream and the metadaData object is initialize with the duration value, else return 0.


Implementation
    public function get duration():Number
errorproperty 
error:Signaler  [read-only]

This signal emit when the Flash Player notify an ErrorEvent.


Implementation
    public function get error():Signaler
imageDataproperty 
imageData:Signaler  [read-only]

This signal emit when Flash Player receives image data as a byte array embedded in a media file that is playing. The image data can produce either JPEG, PNG or GIF content. Use the flash.display.Loader.loadBytes() method to load the byte array into a display object.


Implementation
    public function get imageData():Signaler
metaproperty 
meta:Signaler  [read-only]

This signal emit metadatas informations when the application receives descriptive information embedded in the video being played.


Implementation
    public function get meta():Signaler
metadataproperty 
public var metadata:FLVMetaData

The flv metadata object.

muteItproperty 
muteIt:Signaler

This signal emit when the sound is muted.


Implementation
    public function get muteIt():Signaler
    public function set muteIt(value:Signaler):void
netStreamproperty 
netStream:NetStream

The owner NetStream reference of this object.


Implementation
    public function get netStream():NetStream
    public function set netStream(value:NetStream):void
panproperty 
pan:Number

Specifies the left-to-right panning of the sound, ranging from -1 (full pan left) to 1 (full pan right). A value of 0 represents no panning (balanced center between right and left).


Implementation
    public function get pan():Number
    public function set pan(value:Number):void
playStatusproperty 
playStatus:Signaler  [read-only]

This signal emit when the application receives descriptive information embedded in the video being played. For information about video file formats supported by Flash Media Server, see the Flash Media Server documentation.


Implementation
    public function get playStatus():Signaler

See also

NetStreamStatus.PLAY_COMPLETE
NetStreamStatus.PLAY_SWITCH
progressproperty 
progress:Number  [read-only]

Specifies the percentage progress value of the stream. Using duration and time properties.


Implementation
    public function get progress():Number
statusproperty 
status:Signaler  [read-only]

This signal emit when the application receives descriptive information embedded in the video being played. For information about video file formats supported by Flash Media Server, see the Flash Media Server documentation.


Implementation
    public function get status():Signaler

See also

NetStreamStatus.PLAY_COMPLETE
NetStreamStatus.PLAY_SWITCH
textDataproperty 
textData:Signaler  [read-only]

This signal emit when the Flash Player receives text data embedded in a media file that is playing.


Implementation
    public function get textData():Signaler
timeproperty 
time:Number  [read-only]

Indicates the time value in seconds of the stream.


Implementation
    public function get time():Number
unmuteItproperty 
unmuteIt:Signaler

This signal emit when the sound is unmuted.


Implementation
    public function get unmuteIt():Signaler
    public function set unmuteIt(value:Signaler):void
verboseproperty 
public var verbose:Boolean

The verbose mode.

videoproperty 
video:Video

The Video reference of this expert.


Implementation
    public function get video():Video
    public function set video(value:Video):void
volumeproperty 
volume:Number

Specifies the volume, ranging from 0 (silent) to 1 (full volume).


Implementation
    public function get volume():Number
    public function set volume(value:Number):void
xmpDataproperty 
xmpData:Signaler  [read-only]

This signal emit when receives information specific to Adobe Extensible Metadata Platform (XMP) that is embedded in the Adobe F4V or FLV video file.

The XMP metadata includes cue points as well as other video metadata. XMP metadata support is introduced with Flash Player 10 and Adobe AIR 1.5 and supported by subsequent versions of Flash Player and AIR.


Implementation
    public function get xmpData():Signaler
Constructor Detail
NetStreamClient()Constructor
public function NetStreamClient(netStream:NetStream = null, video:Video = null)

Creates a new NetStreamClient instance.

Parameters
netStream:NetStream (default = null) — The NetStream reference of this advanced proxy client manager.
 
video:Video (default = null) — The Video reference of this netstream client to register automatickly the stream with the video.
Method Detail
checkForModification()method
protected function checkForModification():void

Invoked when a modification of the expert is success.

clear()method 
public function clear():void

Clear the video reference.

dispose()method 
public function dispose():void

Dispose the expert and close all process and remove all dependencies of this object.

handleError()method 
protected function handleError(e:ErrorEvent):void

Invoked when the NetStream notify an ErrorEvent.

Parameters

e:ErrorEvent

isMuted()method 
public function isMuted():Boolean

Returns true if the sound is muted.

Returns
Booleantrue if the sound is muted.
mute()method 
public function mute():void

Mute the sound of the netstream.

netStatus()method 
protected function netStatus(e:NetStatusEvent):void

Invoked when the NetStream status is changed.

Parameters

e:NetStatusEvent

onCuePoint()method 
public function onCuePoint(info:Object):void

Invoked when an embedded cue point is reached while playing an FLV file.

Parameters

info:Object

onImageData()method 
public function onImageData(imageData:Object):void

Dispatched when Flash Player receives image data as a byte array embedded in a media file that is playing. The image data can produce either JPEG, PNG or GIF content. Use the flash.display.Loader.loadBytes() method to load the byte array into a display object.

Example :

         public function onImageData(imageData:Object):void 
         {
             // display track number
             trace(imageData.trackid);
             var loader:Loader = new Loader();
             //imageData.data is a ByteArray object
             loader.loadBytes(imageData.data);
             addChild(loader);
         } 
         

Parameters

imageData:Object

onMetaData()method 
public function onMetaData(info:Object):void

Dispatched when the application receives descriptive information embedded in the video being played. For information about video file formats supported by Flash Media Server, see the Flash Media Server documentation.

Parameters

info:Object

onPlayStatus()method 
public function onPlayStatus(info:Object):void

Dispatched when the application receives descriptive information embedded in the video being played. For information about video file formats supported by Flash Media Server, see the Flash Media Server documentation.

Parameters

info:Object

See also

NetStreamStatus.PLAY_COMPLETE
NetStreamStatus.PLAY_SWITCH
onTextData()method 
public function onTextData(textData:Object):void

The onTextData event sends text data through an AMF0 data channel. This callback method is invoked when Flash Player receives text data embedded in a media file that is playing.

The text data is in UTF-8 format and can contain information about formatting based on the 3GP timed text specification.

This specification defines a standardized subtitle format. Define an onTextData() callback method to process this information, in the same way that you would define callback methods for onCuePoint or onMetaData. In the following example, the onTextData() method displays the track ID number and corresponding track text.

This special event is intended for use with Flash Media Server; for more information, see the class description. You cannot use the addEventListener() method, or any other EventDispatcher methods, to listen for, or process, this event. Rather, you must define a single callback function and attach it directly to the textData object.

This event is triggered after a call to the NetStream.play() method, but before the video playhead has advanced.

The onTextData event object contains one property for each piece of text data.

Example :

         public function onTextData(textData:Object):void
         {
             // display the track number
             trace( textData.trackid ) ;
             // displays the text, which can be a null string, indicating old text that should be erased
             trace( textData.text ) ;
         }
         

Parameters

textData:Object

onXMPData()method 
public function onXMPData(info:Object):void

The onXMPData() callback function receives information specific to Adobe Extensible Metadata Platform (XMP) that is embedded in the Adobe F4V or FLV video file.

The XMP metadata includes cue points as well as other video metadata. XMP metadata support is introduced with Flash Player 10 and Adobe AIR 1.5 and supported by subsequent versions of Flash Player and AIR.

Parameters

info:Object

setDuration()method 
public function setDuration(duration:Number = 0):void

Sets the duration of the stream video.

Parameters

duration:Number (default = 0)

unmute()method 
public function unmute():void

Unmute the sound of the netstream.