| Package | org.openvideoplayer.net |
| Class | public class OvpNetStream |
| Inheritance | OvpNetStream flash.net.NetStream |
| Subclasses | AkamaiNetStream, OvpDynamicNetStream |
| Property | Defined By | ||
|---|---|---|---|
| bufferPercentage : Number [read-only]
The buffer percentage currently reported by the stream. | OvpNetStream | ||
| bufferTimeout : Number | OvpNetStream | ||
| client : Object [override] [write-only]
Sets the client object for this class, to enable integration into existing players which
like to receive onMetaData, onPlayStatus etc via callback events. | OvpNetStream | ||
| createProgressivePauseEvents : Boolean
Since the Flash player does not dispatch pause and resume events for progressive download files,
setting this property to true, will cause this class to dispatch the proper events when pause or
resume is called. | OvpNetStream | ||
| fastStartMinBufferLength : Number
Added by Will for suppport player
| OvpNetStream | ||
| isBuffering : Boolean [read-only]
Returns the buffering status of the stream. | OvpNetStream | ||
| isLive : Boolean
The isLive flag is a convenience property. | OvpNetStream | ||
| isProgressive : Boolean [read-only]
Informs whether the current connection is progressive or not. | OvpNetStream | ||
| maxBufferLength : Number
The desired buffer length set for the NetStream, in seconds. | OvpNetStream | ||
| netConnection : NetConnection [read-only]
Get the NetConnection object this class is using. | OvpNetStream | ||
| panning : Number
The panning of the current NetStream. | OvpNetStream | ||
| progressInterval : Number
The interval in milliseconds at which the OvpEvent.PROGRESS event is dispatched. | OvpNetStream | ||
| streamLength : Number [read-only]
The stream length for a progressive download. | OvpNetStream | ||
| streamTimeout : Number
The maximum number of seconds the class should wait before timing out while trying to locate a stream
on the network. | OvpNetStream | ||
| timeAsTimeCode : String [read-only]
Returns the current time of the stream, as timecode HH:MM:SS. | OvpNetStream | ||
| useFastStartBuffer : Boolean
Dictates whether a fast start (dual buffer) strategy should be used. | OvpNetStream | ||
| volume : Number
The volume of the NetStream. | OvpNetStream | ||
| Method | Defined By | ||
|---|---|---|---|
OvpNetStream(connection:Object)
Constructor
| OvpNetStream | ||
close():void [override]
Closes the stream. | OvpNetStream | ||
getMp3Id3Info(filename:String):Boolean
Initiates the process of extracting the ID3 information from an MP3 file. | OvpNetStream | ||
pause():void [override] | OvpNetStream | ||
play(... arguments):void [override]
Begins playing content if it exists. | OvpNetStream | ||
resume():void [override] | OvpNetStream | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched if the class receives an AsyncErrorEvent.ASYNC_ERROR event. | OvpNetStream | |||
| Dispatched when a stream from a server is complete. | OvpNetStream | |||
| Dispatched when an embedded cue point is reached while playing a video. | OvpNetStream | |||
| Dispatched when the class has detected, by analyzing the NetStream.netStatus events, the end of the stream. | OvpNetStream | |||
| Dispatched when an OVP error condition has occurred. | OvpNetStream | |||
| Dispatched when the class receives information about ID3 data embedded in an MP3 file. | OvpNetStream | |||
| Dispatched when the class receives an image embedded in a H.264 file. | OvpNetStream | |||
| Dispatched when the class receives descriptive information embedded in the video file being played. | OvpNetStream | |||
| Dispatched if the class' onFI callback is called. | OvpNetStream | |||
| Dispatched when the class has completely played a stream or switches to a different stream in a server-side playlist. | OvpNetStream | |||
| Dispatched repeatedly at the progressInterval once the class begins playing a stream. | OvpNetStream | |||
| Dispatched if metadata matching the name "duration" is received while playing a progressive stream. | OvpNetStream | |||
| Dispatched when the class receives text data embedded in a H.264 file. | OvpNetStream | |||
| Dispatched if the trick timer event onTrickMotion callback is called. | OvpNetStream | |||
| bufferPercentage | property |
bufferPercentage:Number [read-only] The buffer percentage currently reported by the stream. This property will always have an integer value between 0 and 100. The max value is capped at 100 even if the bufferLength exceeds the bufferTime.
public function get bufferPercentage():NumberSee also
| bufferTimeout | property |
bufferTimeout:Number public function get bufferTimeout():Number public function set bufferTimeout(value:Number):void| client | property |
client:Object [write-only] [override] Sets the client object for this class, to enable integration into existing players which like to receive onMetaData, onPlayStatus etc via callback events. Note that the OvpNetStream class makes these same callbacks available as events. These, combined with the OvpEvent.DATA_MESSAGE generic callback catcher, make use of the client object unnecessary.
public function set client(value:Object):void| createProgressivePauseEvents | property |
createProgressivePauseEvents:BooleanSince the Flash player does not dispatch pause and resume events for progressive download files, setting this property to true, will cause this class to dispatch the proper events when pause or resume is called.
public function get createProgressivePauseEvents():Boolean public function set createProgressivePauseEvents(value:Boolean):void| fastStartMinBufferLength | property |
fastStartMinBufferLength:NumberAdded by Will for suppport player
public function get fastStartMinBufferLength():Number public function set fastStartMinBufferLength(value:Number):void| isBuffering | property |
isBuffering:Boolean [read-only]
Returns the buffering status of the stream. This value will be true after NetStream.Play.Start
and before NetStream.Buffer.Full or NetStream.Buffer.Flush and false at all other times.
public function get isBuffering():Boolean| isLive | property |
isLive:BooleanThe isLive flag is a convenience property. This class currently does nothing with this property.
public function get isLive():Boolean public function set isLive(value:Boolean):void| isProgressive | property |
isProgressive:Boolean [read-only] Informs whether the current connection is progressive or not.
public function get isProgressive():BooleanSee also
| maxBufferLength | property |
maxBufferLength:Number
The desired buffer length set for the NetStream, in seconds. If useFastStartBuffer has
been set to false (the default), then this value will be used to set the constant buffer value on the NetStream. If
useFastStartBuffer has been set to true, then the NetStream buffer will alternate between 0.5
(after a NetStream.Play.Start event) and the value set by this property.
The default value is 3.
public function get maxBufferLength():Number public function set maxBufferLength(value:Number):voidSee also
| netConnection | property |
netConnection:NetConnection [read-only] Get the NetConnection object this class is using.
public function get netConnection():NetConnection| panning | property |
panning:NumberThe panning of the current NetStream. Possible volume values lie between -1 (full left) to 1 (full right).
The default value is 0.
public function get panning():Number public function set panning(value:Number):void| progressInterval | property |
progressInterval:Number
The interval in milliseconds at which the OvpEvent.PROGRESS event is dispatched.
This event commences with the first play() request and continues until close()
is called.
The default value is 100.
public function get progressInterval():Number public function set progressInterval(value:Number):voidSee also
| streamLength | property |
streamLength:Number [read-only] The stream length for a progressive download. The value is obtained in the onMetaData event handler, which is called when the Flash Player receives descriptive information embedded in the FLV file being played. Therefore, this property will return 0 until the onMetaData event handler is called. For streaming video, the stream length must be requested via the requestStreamLength method on the OvpConnection class. Note the onMetaData event handler in this class will dispatch an OvpEvent.STREAM_LENGTH event, just as the OvpConnection class does on a requestStreamLength method call on the OvpConnection class.
public function get streamLength():NumberSee also
| streamTimeout | property |
streamTimeout:Number
The maximum number of seconds the class should wait before timing out while trying to locate a stream
on the network. This time begins decrementing the moment a play request is made.
After this master time out has been triggered, the class will issue
an Error event OvpError.STREAM_NOT_FOUND.
The default value is 3600.
public function get streamTimeout():Number public function set streamTimeout(value:Number):void| timeAsTimeCode | property |
timeAsTimeCode:String [read-only] Returns the current time of the stream, as timecode HH:MM:SS. This property will only return a valid value if the NetStream has been established.
public function get timeAsTimeCode():String| useFastStartBuffer | property |
useFastStartBuffer:Boolean
Dictates whether a fast start (dual buffer) strategy should be used. A fast start buffer means that the
NetStream buffer is set to value of 0.5 seconds after a NetStream.Play.Start or NetStream.Buffer.Empty event
and then to maxBufferLength after the NetStream.Buffer.Full event is received.
This gives the advantages of a fast stream start combined with a robust buffer for long-term bandwidth.
Users whose connections are close to the bitrate of the stream may see very rapid stuttering of the stream with
this approach, so it is best deployed in situations in which each users' bandwidth is several multiples
of the streaming files' bitrate.
public function get useFastStartBuffer():Boolean public function set useFastStartBuffer(value:Boolean):voidSee also
| volume | property |
volume:NumberThe volume of the NetStream. Possible volume values lie between 0 (silent) and 1 (full volume).
The default value is 1.
public function get volume():Number public function set volume(value:Number):void| OvpNetStream | () | Constructor |
public function OvpNetStream(connection:Object)Constructor
Parametersconnection:Object — This object can be either an OvpConnection object or a
flash.net.NetConnection object. If an OvpConnection
object is provided, the constructor will use the
flash.net.NetConnection object within it.
|
| close | () | method |
override public function close():voidCloses the stream.
See also
| getMp3Id3Info | () | method |
public function getMp3Id3Info(filename:String):Boolean
Initiates the process of extracting the ID3 information from an MP3 file.
Since this process is asynchronous, the actual ID3 metadata is retrieved
by listening for the OvpEvent.MP3_ID3 and inspecting the info parameter.
Parameters
filename:String |
Boolean — false if the NetConnection has not yet been defined, otherwise true.
|
| pause | () | method |
override public function pause():void| play | () | method |
override public function play(... arguments):voidBegins playing content if it exists. This method supports both streaming and progressive playback.
Parameters
... arguments — name of the stream to play.
|
See also
| resume | () | method |
override public function resume():void| asyncerror | Event |
org.openvideoplayer.events.OvpEventDispatched if the class receives an AsyncErrorEvent.ASYNC_ERROR event.
See also
| complete | Event |
org.openvideoplayer.events.OvpEventDispatched when a stream from a server is complete.
See also
| cuepoint | Event |
org.openvideoplayer.events.OvpEventDispatched when an embedded cue point is reached while playing a video.
See also
| end | Event |
| error | Event |
org.openvideoplayer.events.OvpEventDispatched when an OVP error condition has occurred. The OvpEvent object contains a data property. The contents of the data property will contain the error number and a description.
See also
| id3 | Event |
org.openvideoplayer.events.OvpEventDispatched when the class receives information about ID3 data embedded in an MP3 file.
See also
| imagedata | Event |
org.openvideoplayer.events.OvpEventDispatched when the class receives an image embedded in a H.264 file.
| metadata | Event |
org.openvideoplayer.events.OvpEventDispatched when the class receives descriptive information embedded in the video file being played.
See also
| onfi | Event |
org.openvideoplayer.events.OvpEventDispatched if the class' onFI callback is called.
See also
| playstatus | Event |
org.openvideoplayer.events.OvpEventDispatched when the class has completely played a stream or switches to a different stream in a server-side playlist.
See also
| progress | Event |
org.openvideoplayer.events.OvpEvent
Dispatched repeatedly at the progressInterval once the class begins playing a stream.
Event is halted after close is called.
See also
| streamlength | Event |
org.openvideoplayer.events.OvpEventDispatched if metadata matching the name "duration" is received while playing a progressive stream.
| textdata | Event |
org.openvideoplayer.events.OvpEventDispatched when the class receives text data embedded in a H.264 file.
| trickModeTimerTick | Event |
org.openvideoplayer.events.OvpEventDispatched if the trick timer event onTrickMotion callback is called. Only available in flash player 10.1 or higher.
See also