| Package | flash.net |
| Class | public class NetStreamPlayTransitions |
| Inheritance | NetStreamPlayTransitions Object |
| Language Version : | ActionScript 3.0 |
| Player Version : | Flash Player 10 |
NetStreamPlayOptions.transition property. These strings decide the transition
behavior when used to transition to a new stream or the stream play behavior when used for
playing a stream
| Method | Defined By | ||
|---|---|---|---|
| NetStreamPlayTransitions | |||
![]() |
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 | |
![]() |
Sets the availability of a dynamic property for loop operations. | Object | |
![]() |
Returns the string representation of the specified object. | Object | |
![]() |
Returns the primitive value of the specified object. | Object | |
| Constant | Defined By | ||
|---|---|---|---|
| APPEND : * = append [static]
This mode queues up streams into a play list. | NetStreamPlayTransitions | ||
| RESET : * = reset [static]
This is the default mode and provides the default NetStream.play() functionality with the reset set to "true". | NetStreamPlayTransitions | ||
| STOP : * = stop [static]
This mode stops the playlist and is equivalent to NetStream.play(false)
and would stop the playlist and reset the queue
| NetStreamPlayTransitions | ||
| SWAP : * = swap [static]
Like switch, swap replaces NetStreamPlayOptions.oldStreamName with NetStreamPlayOptions.streamName, and keep the rest of the playlist queue the same. | NetStreamPlayTransitions | ||
| SWITCH : * = switch [static]
Switch NetStreamPlayOptions.oldStreamName with NetStreamPlayOptions.streamName seamlessly. | NetStreamPlayTransitions | ||
| NetStreamPlayTransitions | () | Constructor |
public function NetStreamPlayTransitions()| APPEND | Constant |
public static const APPEND:* = append| Language Version : | ActionScript 3.0 |
| Player Version : | Flash Player 10 |
This mode queues up streams into a play list. It has the same functionality as the NetStream.play()
method with the "reset" flag set to "false".
The FMS server would queue up the NetStreamPlayOptions.streamName at the end of the play list
and ignores the NetStreamPlayOptions.oldStreamName parameter
| RESET | Constant |
public static const RESET:* = reset| Language Version : | ActionScript 3.0 |
| Player Version : | Flash Player 10 |
This is the default mode and provides the default NetStream.play() functionality with the reset set to "true".
The currently playing stream is flushed out and NetStreamPlayOptions.streamName starts to play.
NetStreamPlayOptions.oldStreamName parameter is ignored in this case
| STOP | Constant |
public static const STOP:* = stop| Language Version : | ActionScript 3.0 |
| Player Version : | Flash Player 10 |
This mode stops the playlist and is equivalent to NetStream.play(false)
and would stop the playlist and reset the queue
| SWAP | Constant |
public static const SWAP:* = swap| Language Version : | ActionScript 3.0 |
| Player Version : | Flash Player 10 |
Like switch, swap replaces NetStreamPlayOptions.oldStreamName with NetStreamPlayOptions.streamName, and keep the rest of the playlist queue the same.
However in this case the server does not make any assumptions about the content of the streams and treats
them like different content. Hence it will either do the switch at the stream boundary or never, ie. if it has already
started sending the bits for the NetStreamPlayOptions.oldStreamName then it will not switch to NetStreamPlayOptions.streamName and would send a NetStream.Play.Failed event.
If the NetStreamPlayOptions.oldStreamName was still queued up and not sent yet, then the server behaves exactly like the switch case and sends the
bits for the NetStreamPlayOptions.streamName from the beginning. Hence a good use case for this is if the streams are not related to each other and have
different content or lengths. eg. swapping a commercial with another based on user tracking and past commercial viewing statistics.
| SWITCH | Constant |
public static const SWITCH:* = switch| Language Version : | ActionScript 3.0 |
| Player Version : | Flash Player 10 |
Switch NetStreamPlayOptions.oldStreamName with NetStreamPlayOptions.streamName seamlessly.
This mode should be used when switching to a stream with the same content
but with a different bit rate or resolution. The FMS server makes certain assumptions about the relationships between the
NetStreamPlayOptions.oldStreamName and NetStreamPlayOptions.streamName such as that they
pertain to the same content, have same keyframe interval, but could be different resolutions or bit rates and switches smoothly to the new stream
In the case where a playlist has been queued up and NetStreamPlayOptions.oldStreamName is one of the streams in the playlist or is currently playing,
it is replaced by the NetStreamPlayOptions.streamName. In case of NetStreamPlayOptions.oldStreamName being null or undefined or if it not
found in the playlist the FMS server would switch to NetStreamPlayOptions.streamName at the next logical time to ensure a smooth switch assuming NetStreamPlayOptions.oldStreamName and
NetStreamPlayOptions.oldStreamName pertain to the same content and different bit rate or resolution versions of the same content.
If they do not belong to the same content then the RESET mode should be used.
The example use cases for this option is in cases where the app queus up streams in the playlist or is playing a single stream at a particular bit rate but then later realizes the bandwidth availability or the cpu capability is either lower or higher and would want to update the streams or all the queued up streams with their higher or lower bit rate versions.