General settings - Storm Library

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

Parameter nameParameter typeRequiredDefaultDescription
autoStartstringnofalseDetermines whenever the player will start playback automatically
restartOnErrorstringnofalseIf the player encounters an error (related to video or stream etc.) it’ll try to restart itself
reconnectTimenumberno1.0Delay between reconnections with storm server or storm gateway
enabledProtocolsArray of stringsyes-The list of all enabled protocols for the player. List includes "Storm", "HLS", "WebRTC"
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 (seconds) that must be stored within the buffer in order for video play. 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() / setHeight() methods
heightnumberyes-Player width (can be later changed using resize or setWidth / setHeight methods
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 whenever 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 a 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 a 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 of stringno["ERROR", "INFO", "TRACE", "WARNING","SUCCESS"]Decides which log types will be outputted 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 of stringno["ERROR", "INFO", "TRACE", "WARNING","SUCCESS"]Decides which log types will be outputted 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