Flash CS3 Documentation |
|||
| Developing Flash Lite 2.x Applications > Working with Sound, Video, and Images > Using device video > Determining supported video formats | |||
Different devices support different video formats and encodings. Before developing a Flash Lite application that uses video, check the device manufacturers' specifications to determine what video formats are supported by the target devices.
You can also use the System.capabilities.videoMIMETypes property to determine what video formats a device supports. This property contains an array of video MIME types that the device supports. Each item in the array has the following format:
video/video-type
For example, the following code displays in a TextField object named mimeTypes_txt all of the video MIME types that the device supports:
var mimeTypes = System.capabilities.videoMIMETypes; mimeTypes_txt.text = mimeTypes.toString();
The indices for the items contained in the System.capabilities.videoMIMEtypes array are equal to the supported device video MIME types. This provides a quick way to test whether a device supports a particular video format. For example, the following code checks whether the device supports 3GPP video before playing a video file of that type:
if (System.capabilities.videoMIMETypes["video/3gpp"]) {
my_video.play("movie.3gp");
}
Flash CS3