Web Vuser Functions (WEB) > Alphabetical List of Web Vuser Functions > web_stream_seek

web_stream_seek

Sets the position in a stream.

C Language

int web_stream_seek( "ID=<n>", "TimeOffset=<seconds>" ] | ["RelativeOffset=<+/- seconds>"], LAST );

Example Stream Functions

Argument Description
ID The identifier passed to web_stream_open.
TimeOffset The position to set. This value is time from the beginning of the stream in seconds.
RelativeOffset Position from the current play time to set. This value is time from the current stream position in seconds.
LAST Required marker for the end of the argument list.

Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.

If the live stream does not support seek, returns LR_FAIL.

Parameterization

Standard parameterization is not available for this function.

General Information

The web_stream_seek sets the position in a stream opened with web_stream_open.

Pass either TimeOffset or RelativeOffset but not both.

This function is not recorded. You can insert it manually into your script.

Example

In this example, web_stream_seek sets the position in the movie to 11 seconds.

web_stream_play("ID=1","Duration=10",LAST);
web_stream_seek("ID=1","TimeOffset=11",LAST);

// Play 10 more seconds starting at 11 seconds.
web_stream_play("ID=1","Duration=10",LAST);

In this example, web_stream_seek sets the position to the current position + 90 seconds.

web_stream_seek("ID=1","RelativeOffset=90",LAST);

// Play 10 more seconds starting 90 seconds after the position before the seek.
web_stream_play("ID=1","Duration=10",LAST);