General settings - Storm Library
This part describes all possible settings related to the player encloses within the "settings" object.
Parameter name | Parameter type | Required | Default | Description |
---|
autoStart | string | no | false | Determines whenever the player will start playback automatically |
restartOnError | string | no | false | If the player encounters an error (related to video or stream etc.) it’ll try to restart itself |
reconnectTime | number | no | 1.0 | Delay between reconnections with storm server or storm gateway |
enabledProtocols | Array of strings | yes | - | The list of all enabled protocols for the player. List includes "Storm", "HLS", "WebRTC" |
buffer | Object | No | { 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. |
video | Object | No | Please check video table for more info | Contains all parameters related to video object and video scaling |
audio | Object | No | Please check audio table for more info | Contains all parameters related to audio configuration |
debug | Object | No | Please check debug table for more info | Contains all parameters related to player debugging |
Table 1. General settings
Buffer object
Parameter name | Parameter type | Required | Default | Description |
---|
minValue | Number | yes | - | 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 |
startValue | number | yes | - | A number of seconds of a video that must be buffered before playback is allowed. This value should be higher than minValue |
maxValue | number | yes | - | Max value for buffer (in seconds). If the buffer exceeds this value, frames will be dropped to ensure real-time operation |
targetValue | number | yes | - | Buffer size (seconds) that player should try to keep |
Table 2. Buffer table
Video object
Parameter name | Parameter type | Required | Default | Description |
---|
scalingMode | string | no | fill | Describes 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) |
containerID | string | yes | - | Name of the player container (id) within page code where the player should be added. |
width | number | yes | - | Player width (can be later changed using resize or setWidth() / setHeight() methods |
height | number | yes | - | Player width (can be later changed using resize or setWidth / setHeight methods |
Table 3. Video table
Audio object
Parameter name | Parameter type | Required | Default | Description |
---|
startVolume | number | no | 100 | The initial volume for the player |
maxVolume | number | no | 100 | Max volume for the player. All future values will be remapped to match this value as 100% |
rememberValue | boolean | no | true | Decides whenever player will save users volume for future use (via cookies) |
Table 4. Audio table
Debug object
Parameter name | Parameter type | Required | Default | Description |
---|
console | object | no | {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 |
container | object | no | {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 name | Parameter type | Required | Default | Description |
---|
enabled | boolean | no | false | Works as an ON/OFF switch for this option |
logTypes | Array of string | no | ["ERROR", "INFO", "TRACE", "WARNING","SUCCESS"] | Decides which log types will be outputted 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 6. Debug console table
Debug container object
Parameter name | Parameter type | Required | Default | Description |
---|
enabled | boolean | no | false | Works as an ON/OFF switch for this option |
logTypes | Array of string | no | ["ERROR", "INFO", "TRACE", "WARNING","SUCCESS"] | Decides which log types will be outputted 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 7. Debug container table