View comments | RSS feed

NetStream.seek()

Availability

Usage

public seek(offset : Number) : Void

Parameters

offset The approximate time value, in seconds, to move to in an FLV file. The playhead moves to the keyframe of the video that is closest to offset.

Returns

Nothing.

Description

Method; seeks the specified number of seconds into the recorded stream that is currently playing, either from the beginning of the stream or from the current position. This method is available only to clients subscribed to the specified stream, not to the stream's publisher.

If you require an accurate return value from seeking, you may need to change the Application.xml file's EnhancedSeek flag on the server.

EnhancedSeek is a Boolean flag in the Application.xml file. By default, this flag is set to false. When a seek occurs, the server seeks to the closest video keyframe possible and starts from that keyframe. For example, if you want to seek to time 15, and there are keyframes only at time 11 and time 17, seeking actually starts from time 17 instead of time 15. This is an approximate seeking method that works well with compressed streams.

If the flag is set to true, some compression is invoked on the server. Using the example above, if the flag is set to true, then the server creates a keyframe--based on the preexisting keyframe at time 11--for each keyframe from 11 through 15. Even though a keyframe does not exist at the seek time, the server generates a keyframe. This, of course, involves some processing time on the server.

For more information about the EnhancedSeek tag, see Application.xml file in Managing Flash Media Server.

See also

NetStream.play(), NetStream.time


Comments


normanhua said on Dec 11, 2006 at 1:58 AM :
By default, value of <EnhancedSeek> node is actually set to true.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000592.html