ActionScript 2.0 Components Language Reference |
|
|
|
| FLVPlayback Component > FLVPlayback class > FLVPlayback.metadata | |||
Flash Player 8.
Flash Professional 8.
my_FLVPlybk.metadata
Property; an object that is a metadata information packet that is received from a call to the NetSteam.onMetaData() callback function, if available. Read only.
If the FLV file is encoded with the Flash CS3 encoder, the metadata property contains the following information. Older FLV files contain only the height, width, and duration values.
|
Parameter |
Description |
|---|---|
canSeekToEnd
|
A Boolean value that is |
cuePoints
|
An array of objects, one for each cue point embedded in the FLV file. Value is undefined if the FLV file does not contain any cue points. Each object has the following properties:
|
audiocodecid
|
A number that indicates the audio codec (code/decode technique) that was used. |
audiodelay
|
A number that indicates what time in the FLV file "time 0" of the original FLV file exists. The video content needs to be delayed by a small amount to properly synchronize the audio. |
audiodatarate
|
A number that is the kilobytes per second of audio. |
videocodecid
|
A number that is the codec version that was used to encode the video. |
framerate
|
A number that is the frame rate of the FLV file. |
videodatarate
|
A number that is the video data rate of the FLV file. |
height
|
A number that is the height of the FLV file. |
width
|
A number that is the width of the FLV file. |
duration
|
A number that specifies the duration of the FLV file in seconds. |
The following example shows in the Output panel a sampling of metadata values from the FLV file cuepoints.flv. It displays the data when the metadataReceived event occurs.
Drag an FLVPlayback component to the Stage, and give it an instance name of my_FLVPlybk. Then add the following code to the Actions panel on Frame 1 of the Timeline:
/**
Requires:
- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.metadataReceived = function(eventObject:Object):Void {
trace("canSeekToEnd is " + my_FLVPlybk.metadata.canSeekToEnd);
trace("Number of cue points is " + my_FLVPlybk.metadata.cuePoints.length);
trace("Frame rate is " + my_FLVPlybk.metadata.framerate);
trace("Height is " + my_FLVPlybk.metadata.height);
trace("Width is " + my_FLVPlybk.metadata.width);
trace("Duration is " + my_FLVPlybk.metadata.duration + " seconds");
};
my_FLVPlybk.addEventListener("metadataReceived", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/cuepoints.flv";
FLVPlayback.metadataLoaded, FLVPlayback.metadataReceived
|
|
|
|