General settings - Storm JavaScript Library

This part describes all possible settings related to the player enclosed within the "settings" object.

Parameter nameParameter typeRequiredDefaultDescription
autoStartstringnofalseDetermines whether the player will start playback automatically.
restartOnErrorstringnofalseIf set to "true", whenever a player encounters an error (related to video or stream etc.) it’ll try to restart.
reconnectTimenumberno1.0Delay between reconnections with a Storm Server instance or a Storm Gateway instance.
enabledProtocolsArray (string)yesStorm, HLSThe list of all enabled protocols for the player. The list includes "Storm", "HLS", "WebRTC" (coming soon).
bufferObjectNo{ minValue: 0.5, startValue: 0.7, maxValue: 1.5, targetValue: 1.0 }Contains all parameters related to video buffering. All values are in seconds. For more reference, please check buffer table.
videoObjectNoPlease check video table for more infoContains all parameters related to video object and video scaling.
audioObjectNoPlease check audio table for more infoContains all parameters related to audio configuration.
debugObjectNoPlease check debug table for more infoContains all parameters related to player debugging.
Table 1. General settings

Buffer object

Parameter nameParameter typeRequiredDefaultDescription
minValueNumberyes-The length of a video (in seconds) that must be stored within the buffer in order to start a playback. If the buffer value drops below – the player will start buffering.
startValuenumberyes-A number of seconds of a video that must be buffered before playback is allowed. This value should be higher than minValue.
maxValuenumberyes-Max value for buffer (in seconds). If the buffer exceeds this value, frames will be dropped to ensure real-time operation.
targetValuenumberyes-Buffer size (seconds) that player should try to keep.
Table 2. Buffer table

Video object

Parameter nameParameter typeRequiredDefaultDescription
scalingModestringnofillDescribes how the video should be scaled according to the player size. Possible options: "fill" (the video will cover the whole player screen), "letterbox" (the video will keep its proportions without cutting any part of the screen), "crop" (the video will be resized to match the player size, but it’ll keep right proportions).
containerIDstringyes-Name of the player container (id) within page code where the player should be added.
widthnumberyes-Player width - can be later changed using resize or setWidth().
heightnumberyes-Player height - can be later changed using resize or setHeight()).
Table 3. Video table

Audio object

Parameter nameParameter typeRequiredDefaultDescription
startVolumenumberno100The initial volume for the player.
maxVolumenumberno100Max volume for the player. All future values will be remapped to match this value as 100%.
rememberValuebooleannotrueDecides whether the player will save users volume for future use (via cookies).
Table 4. Audio table

Debug object

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 5. Debug table

Debug console object

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 6. Debug console table

Debug container object

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 7. Debug container table