Debug Settings - Storm JavaScript Library

In this guide, you will get to know all the configuration options for debugging the StormLibrary.

Sample Code

                        
const streamConfig = {
    stream: {
      ... // stream settings
    },
    settings: {
        ... // general settings
        video: {
            ... // video settings
        },
        debug: {
            console: {
                enabled: true,
                logTypes: [“ERROR”, ”WARNING”, ”SUCCESS”, ”INFO”, ”TRACE”],
                monoColor: false,
            }
        }
    }
};
                    

Description of Fields and Parameters

Parameter name Parameter type Required Default Description
console Object No {enabled: false} Defines tracing options for the player that will be output to the browser’s console. For more reference, please check debug console table.
container Object No {enabled: false} Defines tracing options for the player that will be output to the provided HTML container. For more reference, please check debug container table.
Table 1. Debug Configuration Table

Debug Console Configuration

Parameter name Parameter type Required Default Description
enabled boolean No false Works as an ON/OFF switch for this option.
logTypes Array (string) No ["ERROR", "INFO", "TRACE", "WARNING", "SUCCESS"] Decides which log types will be output using this channel. Log types are: ERROR, INFO, TRACE, WARNING, and SUCCESS.
monoColor boolean No false By default, each log type has got its color. However, if you wish to keep logs a single color (for a specific player by given id), you can switch this option to true.
Table 2. Debug Console Configuration Table

Debug Container Configuration

Parameter name Parameter type Required Default Description
enabled boolean No false Works as an ON/OFF switch for this option.
logTypes Array (string) No ["ERROR", "INFO", "TRACE", "WARNING", "SUCCESS"] Decides which log types will be output using this channel. Log types are: ERROR, INFO, TRACE, WARNING, and SUCCESS.
containerID string yes - HTML container for the logs (id).
monoColor boolean No false By default, each log type has got its color. However, if you wish to keep logs a single color (for a specific player by given id), you can switch this option to true.
Table 3. Debug Container Configuration Table
Next Step

For the next step please check our Storm JavaScript Library Events Basics guide where you’ll learn about events and how to react to them via callbacks.

Support Needed?

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