Packageasgard.net
Classpublic class NetServerStreamClient
InheritanceNetServerStreamClient Inheritance CoreEventDispatcher Inheritance CoreObject
ImplementsINetServerStreamClient

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



Public Properties
 PropertyDefined by
 Inheritedchannel : String
Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
 InheritedisGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
  metadata : FLVMetaData
The flv metadata object.
NetServerStreamClient
  netStream : NetStream
The owner NetStream reference of this object.
NetServerStreamClient
Public Methods
 MethodDefined by
  
NetServerStreamClient(netStream:NetStream = null, bGlobal:Boolean = false, sChannel:String = null)
Creates a new NetServerStreamClient instance.
NetServerStreamClient
 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
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 Inherited
Returns the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreObject
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
  
onCuePoint(info:Object):void
Invoked when an embedded cue point is reached while playing an FLV file.
NetServerStreamClient
  
onImageData(imageData:Object):void
Dispatched when Flash Player receives image data as a byte array embedded in a media file that is playing.
NetServerStreamClient
  
onMetaData(info:Object):void
Dispatched when the application receives descriptive information embedded in the video being played.
NetServerStreamClient
  
onPlayStatus(info:Object):void
Dispatched when the application receives descriptive information embedded in the video being played.
NetServerStreamClient
  
onTextData(textData:Object):void
The onTextData event sends text data through an AMF0 data channel.
NetServerStreamClient
  
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.
NetServerStreamClient
 Inherited
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = 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
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
CoreEventDispatcher
 Inherited
toString():String
Returns the string representation of this instance.
CoreObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:Boolean, useCapture:* = 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
Property detail
metadataproperty
public var metadata:FLVMetaData

The flv metadata object.

netStreamproperty 
netStream:NetStream  [read-write]

The owner NetStream reference of this object.

Implementation
    public function get netStream():NetStream
    public function set netStream(value:NetStream):void
Constructor detail
NetServerStreamClient()constructor
public function NetServerStreamClient(netStream:NetStream = null, bGlobal:Boolean = false, sChannel:String = null)

Creates a new NetServerStreamClient instance.

Parameters
netStream:NetStream (default = null) — The owner NetStream reference of this object.
 
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
 
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
Method detail
onCuePoint()method
public function onCuePoint(info:Object):void

Invoked when an embedded cue point is reached while playing an FLV file. This method can be overrides easily.

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