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 name Parameter type Required Default Description
autoConnect boolean No true Defines 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.
autoStart boolean No false Defines 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.
restartOnError boolean No false If set to true, stormLibrary will attempt to restart in case of a player error.
reconnectTime number No 1.0 Specifies the delay that should occur when trying to connect to the next server instance (if a connection fails).
enabledProtocols Array (string) No Storm, HLS A list of protocols that stormLibrary should support (depending on the sources). Possible values are "Storm", "HLS".
buffer Object No Please check Buffer Configuration table for more info. A group of settings related to video buffering. The entire configuration is described in the Buffer Configuration.
video Object Yes for StormLibrary, No for StormPlayer Please 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.
audio Object No Please check Audio Configuration table for more info. A group of settings related to audio volume. The entire configuration is described in the Audio Configuration.
debug Object No Please 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.