Package | flash.net |
Class | public dynamic class NetStreamPlayOptions |
Inheritance | NetStreamPlayOptions EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
NetStream.play2()
method. You pass a NetStreamPlayOptions object
to play2()
, and the properties of the class specify the various options.
The primary use case for this class is to implement transitions between streams dynamically,
either to switch to streams of different bit rates and sizes or to swap to different content
in a playlist.
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
len : Number
The duration of playback, in seconds, for the stream specified in streamName. | NetStreamPlayOptions | ||
oldStreamName : String
The name of the old stream or the stream to transition from. | NetStreamPlayOptions | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
start : Number
The start time, in seconds, for streamName. | NetStreamPlayOptions | ||
streamName : String
The name of the new stream to transition to or to play. | NetStreamPlayOptions | ||
transition : String
The mode in which streamName is played or transitioned to. | NetStreamPlayOptions |
Method | Defined By | ||
---|---|---|---|
Creates a NetStreamPlayOptions object to specify the options that are passed to the NetStream.play2() method. | NetStreamPlayOptions | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
len | property |
public var len:Number
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The duration of playback, in seconds, for the stream specified in streamName
.
The default value is -1, which means that Flash Player plays a live stream until it is no longer available or plays a recorded stream until it ends.
If you pass 0 for len
, Flash Player plays the single frame that is start
seconds from the beginning of a recorded stream
(assuming that start
is equal to or greater than 0).
If you pass a positive number for len
, Flash Player plays a live stream for len
seconds after it becomes available,
or plays a recorded stream for len
seconds. (If a stream ends before len
seconds, playback ends when the stream ends.)
If you pass a negative number other than -1 for len
, Flash Player interprets the value as if it were -1.
See also
oldStreamName | property |
public var oldStreamName:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The name of the old stream or the stream to transition from.
When NetStream.play2()
is used to simply play a stream (not perform a transition), the value of this property
should be either null or undefined. Otherwise, specify the stream to transition from.
See also
start | property |
public var start:Number
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The start time, in seconds, for streamName
. Valid values are -2, -1, and 0.
The default value for start
is -2, which means that Flash Player first tries to play the live stream specified in streamName
.
If a live stream of that name is not found, Flash Player plays the recorded stream specified in streamName
.
If neither a live nor a recorded stream is found, Flash Player opens a live stream named streamName
, even though no one is
publishing on it. When someone does begin publishing on that stream, Flash Player begins playing it.
If you pass -1 for start
, Flash Player plays only the live stream specified in streamName
. If no live stream is found,
Flash Player waits for it indefinitely if len
is set to -1; if len
is set to a different value,
Flash Player waits for len
seconds before it begins playing the next item in the playlist.
If you pass 0 or a positive number for start
, Flash Player plays only a recorded stream named streamName
,
beginning start
seconds from the beginning of the stream. If no recorded stream is found, Flash Player begins playing the next item
in the playlist immediately.
If you pass a negative number other than -1 or -2 for start
, Flash Player interprets the value as if it were -2.
See also
streamName | property |
public var streamName:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The name of the new stream to transition to or to play. When oldStreamName
is null or undefined, calling
NetStream.play2()
simply starts playback of streamName
. If oldStreamName
is specified, calling NetStream.play2()
transitions oldStreamName
to streamName
using the transition mode specified in the transition
property.
See also
transition | property |
public var transition:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The mode in which streamName
is played or transitioned to. Possible values are constants from the NetStreamPlayTransitions class.
Depending on whether Netstream.play2()
is called to play or transition a stream, the transition mode results in different behaviors.
For more information on the transition modes, see the NetStreamPlayTransitions class.
See also
NetStreamPlayOptions | () | Constructor |
public function NetStreamPlayOptions()
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Creates a NetStreamPlayOptions object to specify the options that are passed to the NetStream.play2()
method.
See also
Fri Mar 19 2010, 02:45 AM -07:00