This Video.js plugin, currently at version 1.1.6, provides a user interface for manual quality level selection in adaptive HTTP streams (HLS/DASH). It is built upon and explicitly requires the `videojs-contrib-quality-levels` plugin to parse and manage the stream's available quality levels. The plugin dynamically generates labels for these levels, prioritizing stream `height` metadata and falling back to `bitrate` when height is unavailable. It is compatible with Video.js versions 7 and higher. While the project appears to be in a maintenance state with no recent releases or significant code commits in the past few years, it remains functional for its intended purpose within compatible Video.js environments. Its primary utility is to offer a direct, user-friendly way to switch stream qualities, enhancing user control over adaptive streaming playback.
npm install videojs-http-source-selectorVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up a Video.js player in HTML, including the necessary script tags for Video.js itself, `videojs-contrib-quality-levels`, and `videojs-http-source-selector`. It then initializes the player, configuring the source selector with a default quality setting and logging its readiness.
Ensure your project utilizes `video.js` version 7 or newer. Upgrade your `video.js` dependency if necessary.
Always install `videojs-contrib-quality-levels` (e.g., `npm install --save videojs-contrib-quality-levels`) and ensure its script is loaded before `videojs-http-source-selector` in `<script>` tags or `require`/`import` statements.
To ensure clear quality labels (e.g., '1080p', '720p'), verify that your adaptive stream manifests (e.g., HLS M3U8, DASH MPD) include `RESOLUTION` or `HEIGHT` attributes for each quality level.
Explicitly set the `default` option to `'low'` or `'high'` if you require a guaranteed starting quality for all users. Understand that `'auto'` defers to the player's adaptive streaming logic after the initial segment load.
Ensure `video.js`, `videojs-contrib-quality-levels`, and then `videojs-http-source-selector` are loaded in the correct sequence. For module bundlers, verify the `require()` or `import` order. For `<script>` tags, confirm their placement in the HTML.
Verify that `video.js` is loaded and globally accessible before any Video.js plugins. Check your `<script>` tag order or module bundling configuration to ensure `video.js` is the first dependency.
Confirm that `videojs-contrib-quality-levels` is installed and loaded *before* `videojs-http-source-selector`. Ensure that the `qualityLevels()` method is callable on your `videojs` player instance before the http source selector tries to use it.