General Settings - Storm JavaScript Library

In this guide, you will get to know all the major configuration options and parameters that stormLibrary can accept.

Sample Code

                        
const streamConfig = {
    stream: {
      ...   // stream settings
    },
    settings: {
        autoConnect: true,
        autoStart: true,
        restartOnFocus: true,
        restartOnError: true,
        reconnectTime: 1.0,
        enabledProtocols: ["Storm", "HLS"],
        buffer: {
            ... // buffer settings
        },
        video: {
            ... // video settings
        },
        audio: {
            ... // audio settings
        }
        storage: {
            ... // storage settings
        }
        debug: {
            ... // debug setting
        }
    }
};
                    

Description of Fields and Parameters

Parameter nameParameter typeRequiredDefaultDescription
autoConnectbooleanNotrueDefines whether the library should automatically connect to a server upon creation. This will allow for listening to changes in the status of a selected stream. If this option is set to false, a connection will be established when the play or subscribe methods are used.
autoStartbooleanNofalseDefines whether the stream playback should start immediately after the stormLibrary object is created. If autoStart is set to true video element will be muted by default.
restartOnErrorbooleanNofalseIf set to true, stormLibrary will attempt to restart in case of a player error.
reconnectTimenumberNo1.0Specifies the delay that should occur when trying to connect to the next server instance (if a connection fails).
enabledProtocolsArray (string)NoStorm, HLSA list of protocols that stormLibrary should support (depending on the sources). Possible values are "Storm", "HLS".
bufferObjectNoPlease check Buffer Configuration table for more info.A group of settings related to video buffering. The entire configuration is described in the Buffer Configuration.
videoObjectYes for StormLibrary, No for StormPlayerPlease check Video Configuration table for more info.A group of settings related to the video object. The entire configuration is described in the Video Configuration.
audioObjectNoPlease check Audio Configuration table for more info.A group of settings related to audio volume. The entire configuration is described in the Audio Configuration.
debugObjectNoPlease check Debug Configuration table for more info.A group of settings related to debugging. The entire configuration is described in the Debug Configuration.
Table 1. General Configuration Table.
Next Step

For the next step please check our Storm JavaScript Video Settings guide where you’ll learn about controlling video element.

Support Needed?

Create a free ticket and our support team will provide you necessary assistance.