Flash Media Server |
|||
| Client-Side ActionScript Language Reference for Flash Media Server 2 > Client-Side ActionScript Language Reference > Video class | |||
|
NOTE |
|
In Flash Player 7 and later, Flash Video (FLV) files can be played without the use of Flash Media Server. In Flash Player 8, you can use the On2 VP6 codec and an alpha channel.For more information, see the Video class entry in ActionScript 2.0 Language Reference. |
The Video class lets you display live or recorded streaming video on the Stage without embedding it in your SWF file. The video may be a live video stream being captured with the Camera.get() command, or a live or recorded video stream or MP3 audio stream being displayed through the use of a NetStream.play() command (which requires Flash Media Server).
Flash Player 7 supports Flash Video (FLV) encoded with the Sorenson Spark video codec. Flash Player 8 supports Flash Video (FLV) encoded with either the Sorenson or the On2 VP6 codec and also supports an alpha channel. The On2 VP6 video codec uses less bandwidth than older technologies, and offers additional deblocking and deringing filters.
If your Flash content dynamically loads Flash Video (using either progressive download or Flash Media Server), you can use On2 VP6 video without having to republish your SWF for Flash Player 8, as long as users view your content through Flash Player 8. Only Flash Player 8 supports both publish and playback of On2 VP6 video. By streaming or downloading On2 VP6 video into Flash SWF version 6 or 7, and playing the content using Flash Player 8, you avoid having to recreate your SWF files for use with Flash Player 8.
|
Codec |
Content (SWF) version (publish version) |
Flash Player version (version required for playback) |
|---|---|---|
|
Sorenson Spark |
6 7 |
6, 7, 8 7, 8 |
|
On2 VP6 |
6 7 8 |
8* 8 8 |
A Video object can be used like a movie clip. As with other objects you place on the Stage, you can control various properties of Video objects. For example, you can move the Video object around on the Stage by using its _x and _y properties; you can change its size using its _height and _width properties, and so on.
To display the video stream, first place a Video object on the Stage. Then use Video.attachVideo() to attach the video stream to the Video object.
my_video. (Do not name it Video.) |
NOTE |
|
You can also embed recorded streams (FLV files) using the File > Import or File > Import to Library command. For more information on embedding video files, see Using Flash. |
|
Method |
Description |
|---|---|
|
Specifies a stream to be displayed within the boundaries of the Video object on the Stage. |
|
|
Clears the image currently displayed in the Video object. |
|
Property |
Description |
|---|---|
|
Specifies the behavior for the deblocking filter that the video compressor applies as needed when streaming the video. |
|
|
Read-only; the height in pixels of the video stream. |
|
|
Specifies whether the video should be smoothed (interpolated) when it is scaled. |
|
|
Read-only; the width in pixels of the video stream. |