Storm docs logo
Search the docs.../
Explore Storm Products

Quality Management - Storm JS Player Core

In this guide, we'll explain in detail how quality management and selection work in the Storm JS Player Core. We'll also show you how to implement quality selection on the user side and how to tailor the quality selection strategy to your needs.

Server/Cloud-side Configuration

Both Storm Streaming Server and Storm Streaming Cloud are capable of delivering optimized versions of a stream in the form of lower-quality substreams (lower resolution and bitrate than the original).

  1. In Storm Streaming Server, transcoding must be explicitly enabled within the application, along with properly prepared transcoding templates.

  2. In Storm Streaming Cloud, transcoding is enabled per stream during its creation - if the subscription plan allows it.

Quality List

When a stream is designated for transcoding, the server sends a list of available quality variants via the qualityListUpdate event, which is typically dispatched right after subscribing to a given streamKey. Importantly, this event may also be triggered during an ongoing stream - for example, when new substreams are created or removed:

Quality list event
Code iconjavascript
storm.addEventListener("qualityListUpdate", (event) => {
    console.log(event.qualityList); // new quality list for our player
});

The event's qualityList parameter is an array of available qualities. It can also be retrieved using the base API method getQualityItemList().

Each qualityItem object contains the following fields:

FieldReturn TypeDescription
idnumberReturns the quality item ID, used to activate this quality using playQualityItem().
labelstringReturns the quality label (e.g., "1080p").
monogramstringReturns the symbolic monogram (e.g., "LQ", "SD", "HD", "FH", "2K", "4K").
isAutobooleanReturns true if this is the "Auto" quality item. The player will update the label dynamically (e.g., "Auto (360p)").
isSelectedbooleanReturns true if this quality is currently selected. Only one quality can be selected at a time.
Note

A full reference for qualityItem objects is available at: Storm JS Player Core Playback Events – qualityItemObject.

Manual Quality Selection

To manually activate a specific quality, use the playQualityItem() method with the desired quality id. The special "Auto" item always has id == 0:

Manual quality selection
Code iconjavascript
storm.playQualityItem(qualityItem.id);

Quality Selection Mechanism

The player uses quality selection logic based on the chosen control mechanism. This can be configured via the stream configuration object or set dynamically using the API:

Quality configuration
Code iconjavascript
const streamConfig = {
    stream: {
        ... // stream settings
    },
    settings: {
        ... // general settings
        video: {
            ... // video settings
        },
        quality: {
            controlMode: "RESOLUTION_AWARE", // quality control method
            initialUpgradeTimeout: 30,
            maxUpgradeTimeout: 3600
        }
    }
};

Alternatively:

Dynamic quality control mode
Code iconjavascript
storm.setQualityControlMode(QualityControlMode.RESOLUTION_AWARE, true);
// `true` means the current source will be reloaded immediately

There are four basic quality control modes:

Mode nameDescription
RESOLUTION_AWAREThe quality will be selected based on the dimensions of the library window and the available video qualities. The substream offering the resolution closest to those dimensions will be selected as the primary one.
PASSIVEThe quality will be selected based on previously saved preferences determined by the RESOLUTION_AWARE mode. If the library was previously initialized in RESOLUTION_AWARE mode, the quality preferences will be stored and this mode will restore them without re-running the analysis. This mode is well-suited for use with a thumbnail that can later be replaced by a fully-featured player.
HIGHEST_QUALITYThe substream offering the highest quality (resolution) will always be selected as the primary one.
LOWEST_QUALITYThe substream offering the lowest quality (resolution) will always be selected as the primary one.
Note

Detailed descriptions are available at: Storm JS Player Core - Quality Settings.

Dynamic Quality Control (Auto Mode)

The core purpose of the quality control system is to select the most suitable substream based on current bandwidth and playback conditions.

This feature is available only when the "Auto" quality option is enabled.

  1. Trigger - The downgrade process starts when the video buffer empties twice within 30 seconds.

    • The buffer has an initial value (typically around 0.5 seconds) and a minimum threshold.
    • Dropping below the minimum triggers a buffering state.
    • The player pauses playback until the buffer recovers.
  2. Quality Downgrade - When triggered, the player chooses a lower quality stream based on average bandwidth calculations. It may drop by one level or directly to the lowest level available. This triggers the upgrade testing cycle, controlled by initialUpgradeTimeout.

  3. Grace Period & Escalation - After a downgrade, the player waits for the initialUpgradeTimeout duration before attempting to upgrade to a higher quality. If another buffer depletion occurs during this period, the quality is downgraded again, and the wait time before future upgrades increases exponentially, up to maxUpgradeTimeout.

Important

Selecting any non-Auto quality option resets all gathered bandwidth statistics and quality preferences.

Support Needed?

If you have any questions or need assistance, please create a support ticket and our team will help you.

Blog
Support
About us
Patents
Term of use
Privacy policy
Contact
©2026 Storm Streaming Media. All Rights Reserved.