Package | flash.net |
Class | public class NetStreamPlayTransitions |
Inheritance | NetStreamPlayTransitions Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
See also
Constant | Defined By | ||
---|---|---|---|
APPEND : * = append [static]
Adds the stream to a playlist. | NetStreamPlayTransitions | ||
RESET : * = reset [static]
Clears any previous play calls and plays the specified stream immediately. | NetStreamPlayTransitions | ||
STOP : * = stop [static]
Stops playing the streams in a playlist. | NetStreamPlayTransitions | ||
SWAP : * = swap [static]
Replaces a content stream with a different content stream and maintains the rest of the playlist. | NetStreamPlayTransitions | ||
SWITCH : * = switch [static]
Switches from playing one stream to another stream, typically with streams of the same content. | NetStreamPlayTransitions |
APPEND | Constant |
public static const APPEND:* = append
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Adds the stream to a playlist. This mode does the same thing as the NetStream.play()
method with the reset
flag set to false
.
In this mode, Flash Media Server queues up the stream specified in NetStreamPlayOptions.streamName
at the end of the playlist and ignores the NetStreamPlayOptions.oldStreamName
parameter.
RESET | Constant |
public static const RESET:* = reset
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Clears any previous play calls and plays the specified stream immediately.
This mode does the same thing as the NetStream.play()
method with the reset
flag set to true
(the default behavior for NetStream.play()
).
In this mode, the currently playing stream is flushed and the stream specified in NetStreamPlayOptions.streamName
starts to play.
The NetStreamPlayOptions.oldStreamName
parameter is ignored.
STOP | Constant |
public static const STOP:* = stop
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Stops playing the streams in a playlist. This mode does the same thing as calling NetStream.play(false)
.
It stops and resets the playlist.
SWAP | Constant |
public static const SWAP:* = swap
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Replaces a content stream with a different content stream and maintains the rest of the playlist.
Like SWITCH
, this mode replaces the stream specified in NetStreamPlayOptions.oldStreamName
with the stream specified in NetStreamPlayOptions.streamName
. The rest of the playlist is maintained.
In this mode, Flash Media Server does not make assumptions about the content of the streams and treats
them like different content. If oldStreamName
has not yet been sent, the server performs the switch
at the stream boundary and sends the bits for streamName
from the beginning.
If the server has already
started sending the bits for oldStreamName
, it will not switch to streamName
and dispatches a
NetStream.Play.Failed
event.
Use this mode if the streams you want to switch are not related to each other and have different content or lengths. One example is to swap one commercial for another based on user tracking and past commercial-viewing statistics.
SWITCH | Constant |
public static const SWITCH:* = switch
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Switches from playing one stream to another stream, typically with streams of the same content.
Specify the streams to switch in NetStreamPlayOptions.oldStreamName
and NetStreamPlayOptions.streamName
.
Use this mode when you want to switch to a stream that has the same content but is encoded at a different bit rate or resolution. For example, use this mode when the application queues up streams in a playlist or is playing a single stream at a particular bit rate, then calculates that the bandwidth availability or the CPU capability is either lower or higher than the stream requirements. The application can then update the streams with their higher or lower bit rate versions.
In this mode, Flash Media Server makes certain assumptions about the relationship between the
oldStreamName
and streamName
streams.
The server assumes that the streams contain the same content and have the same keyframe interval but have different
resolutions or bit rates.
When a playlist has been queued up and oldStreamName
is one of the streams in the playlist or is currently playing,
oldStreamName
is replaced by streamName
.
If oldStreamName
is null or undefined, or if it is not found in the playlist,
the server switches to streamName
at the next logical point, to ensure a smooth switch.
To switch from one stream to another with different content, use the RESET
mode instead.
Fri Mar 19 2010, 02:45 AM -07:00