web.streamState

Returns the state of the stream.

ExampleStream Functions

Syntax

value = web.streamState( {object} );

JavaScript Object

{  
   id: <string>,
   stateType: <value>
}
Property Name Description
idThe identifier passed to web.streamOpen.
stateType

One of the following enum values:

  • web.CURRENT_TIME (2)
  • web.CURRENT_BUFFERING_TIME (3)
  • web.TOTAL_BUFFERING_TIME (4)
  • web.BUFFERED_TIME (5)
  • web.DURATION (6)

Return Values

Returns the value of the specified parameter.

On failure, returns a value less than 0.

Parameterization

Standard parameterization is not available for this function.

General Information

The web.streamState function returns the state of the open stream.

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

Example

This is an example of a the use of web.streamState:

curTime = web.streamState( {id: 2, stateType: web.CURRENT_TIME} );

dDuration = web.streamState( {id: 2, stateType: web.DURATION} );