JavaScript Functions > Alphabetical Listing of Web Functions > web.streamSetParamInt

web.streamSetParamInt

Sets the value of a stream parameter.

Example Stream Functions

Syntax

            
            web.streamSetParamInt
            ( id, stateType, stateValue );
Property Name Description
id The identifier passed to web.streamOpen.
stateType The code for any stream parameter with an integer value, such as web.BANDWIDTH (11) or web.BUFFERING_TIMEOUT (12). Numeric value.
stateValue The new integer value for the stream parameter. Numeric value.

Return Values

Not applicable

Parameterization

Standard parameterization is not available for this function.

General Information

The web.streamSetParamInt function sets the a value of a parameter of the open stream.

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

Example

This is an example of a web streaming script:

The following examples implement the basic streaming flow skeleton:Play the movie from the beginning (the entire movie duration is XXX).
web.streamPlay( { id : n, playingDuration : XXX } );Pause the movie.
web.streamPause( { id : n, pausingDuration : XXX } );Stop the movie.
web.streamStop( { id : n } ); HTTPfunction Action(){    //Open an HTTP stream
    web.streamOpen(
        {
            id : 1,
            url : 'http://myhost/streaming-test/video/tiny.mp4',
            protocol : 'HTTP'
        }
    );    //Play for 10s
    web.streamPlay( { id : 1, playingDuration : 10 } );
        //Pause for 5s
    web.streamPause( { id : 1, pausingDuration : 5 } );
        //Seek to 00:00:20
    web.streamSeek( { id : 1, timeOffset : 20 } );    //Change the speed to 1.5
    web.streamSetParamDouble('1',web.SPEED, 1.5);    //Play for 10s
    web.streamPlay( { id : 1, playingDuration : 10 } );    //Get bytes received
    var bytes = web.streamGetParamInt('1',web.BYTES_RECEIVED);    //Close streaming
    web.streamClose(
        {
            id : 1
        }
    );     return 0;