Buffer Settings - Storm JavaScript Library

In this guide, you will get to know all the configuration options and parameters related to data buffering by the library.

Sample Code

                        
const streamConfig = {
    stream: {
      ... // stream settings
    },
    settings: {
        ... // general settings
        buffer: {
            minValue: 0.5,
            startValue: 0.5,
            maxValue: 1.5,
            targetValue: 1.0,
        },
        video: {
            ... // video settings
        }
    }
};
                    

Description of Fields and Parameters

Parameter nameParameter typeRequiredDefaultDescription
minValuenumberYes0.2Minimum stream length (in seconds) below which buffering will start.
startValuenumberYes0.5Required stream length (in seconds) for it to start playing.
maxValuenumberYes0.2Maximum stream length (in seconds) above which the video will begin to accelerate to ensure minimal delays compared to the source material.
targetValuenumberYes0.1Buffer length that stormLibrary will try to maintain.
Table 1. Buffer Configuration Table
Please note that while the declaration of the buffer object itself is not required, all parameters must be defined at the time of its creation.
Next Step

For the next step please check our Storm JavaScript Library Storage Settings guide where you’ll learn about how to configure storage options.

Support Needed?

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