Flash Lite 2.x and 3.0 ActionScript Language Reference

Video

Object
    |
    +-Video

public class Video
extends Object

The Video class enables you to display video content that is embedded in your SWF file, stored locally on the host device, or streamed in from a remote location.

Note: The player for Flash Lite 2.0 handles video differently than Flash Player 7 does. These are the major differences:

  • Flash Player 7 directly renders the video data (embedded or streaming). The player for Flash Lite 2.0 does not render the video data; instead it hands the data off to the mobile device. The player for Flash Lite 3.0 supports the rendering of Flash Video (FLV) directly by Flash Lite.
  • Flash Player 7 supports many video formats in addition to FLV. Flash Lite 2.0 supports video playback in the following cases: video embedded in a SWF file; video that resides in a separate file on the host device; and video data that is streamed in over the network (in real time). The player for Flash Lite 2.0 supports only those video formats that a specific mobile device supports, while the player for Flash Lite 3.0 supports the rendering of FLV natively.
  • Flash Player 7 lets you bundle the data in a SWF file or stream it by using the Video object and assigning either a NetStream object or Camera object as the source of the video information. However, the player for Flash Lite 2.0 does not support the NetStream and Camera objects. Instead, Flash Lite 2.0 uses a new library symbol type called Video to embed source video data and to stream video for mobile devices. Because Flash Lite 2.0 does not support the NetStream object, you use the methods and properties of the Video class to control the video playback. The player for Flash Lite 3.0 does support the NetStream and NetConnection objects, and you use the methods and properties of these classes to control FLV playback. Flash Lite 3.0 also supports a new property in the Video class, attachVideo, that specifies a video stream to be displayed within the Video object on the Stage. Flash Lite 3.0 does not support the Camera object.

Because of the requirements of mobile devices (smaller processor speeds, memory restrictions, and proprietary encoding formats), Flash Lite 2.0 cannot render the video information directly. The supported file formats for video depend on the mobile device manufacturer. For more information about supported video formats, check the hardware platforms on which you plan to deploy your application. In contrast, Flash Lite 3.0 does render Flash video directly.

Flash Lite 2.0 does not support the following Flash Player 7 features:

  • Streaming of video data from a Flash Media Server
  • Recording video

Flash Lite 3.0 adds support the following Flash Player 7 features:

  • Flash video rendered directly by the player using versions of the On2 and Sorenson codecs optimized for mobile devices
  • Streaming of video data over an RTMP connection to a Flash Media Server (RTMPT and RTMPS connections are not supported, nor are multiple connections)

Flash Lite 3.0 does not support the following Flash Player 7 features:

  • Recording video
  • Camera object

Property summary

Properties inherited from class Object

constructor (Object.constructor property), __proto__ (Object.__proto__ property), prototype (Object.prototype property), __resolve (Object.__resolve property)

Event summary

Event

Description

onStatus = function(infoObject:Object) {}

Callback handler that can be invoked by the device to indicate status or error conditions.

Method summary

Modifiers

Signature

Description

 

close() : Void

Stops playback of the video, frees the memory associated with this Video object, and clears the video area onscreen.

 

pause() : Void

Stops playback of the video and continues to render the current frame onscreen.

 

play() : Boolean

Calling this method opens a video source and begins playback of a video.

 

resume() : Void

Calling this method resumes playback of the video.

 

stop() : Void

Stops playback of the video and continues to render the current frame onscreen.

Methods inherited from class Object

addProperty (Object.addProperty method), hasOwnProperty (Object.hasOwnProperty method), isPropertyEnumerable (Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf method), registerClass (Object.registerClass method), toString (Object.toString method), unwatch (Object.unwatch method), valueOf (Object.valueOf method), watch (Object.watch method)