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 nameParameter typeRequiredDefaultDescription
consoleObjectNo{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.
containerObjectNo{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 nameParameter typeRequiredDefaultDescription
enabledbooleanNofalseWorks as an ON/OFF switch for this option.
logTypesArray (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.
monoColorbooleanNofalseBy 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 nameParameter typeRequiredDefaultDescription
enabledbooleanNofalseWorks as an ON/OFF switch for this option.
logTypesArray (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.
containerIDstringyes-HTML container for the logs (id).
monoColorbooleanNofalseBy 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.