FLVPlayback.isLive

Availability

Flash Player 8.

Edition

Flash Professional 8.

Usage

my_FLVPlybk.isLive

Description

Property; a Boolean value that is true if the video stream is live. This property is effective only when streaming from a FMS or FVSS. The value of this property is ignored for an HTTP download.

If you set this property between loading new FLV files, it has no effect until the contentPath parameter is set for the new FLV file.

Example

The following example assumes playing a live stream from a FMS. When the playing event occurs, the example shows the value of the isLive property.

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. In the statement that loads the contentPath property, replace the italicized text with the name and location of an FLV file on your FMS.

/**
 Requires:
  - FLVPlayback component on the Stage with an instance name of my_FLVPlybk
*/
import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.playing = function(eventObject:Object) {
    trace("The isLive property is " + my_FLVPlybk.isLive);
};
my_FLVPlybk.addEventListener("playing", listenerObject);
my_FLVPlybk.contentPath = "rtmp://my_servername/my_application/stream.flv";

See also

FLVPlayback.contentPath, FLVPlayback.load()