This is a Plugin For VideoJS 8+ To select Quality on the Video if available
npm install videojs-quality-selector-hls

This is a Plugin For VideoJS 8+ To select Quality on the Video if available
This is a complete FORK by https://github.com/chrisboustead from https://github.com/chrisboustead/videojs-hls-quality-selector
Changelog
- updated to work for VideoJS 8
- pulled plugin source code from https://github.com/videojs/generator-videojs-plugin
videojs-contrib-quality-levels ^4
``sh`
npm i videojs-contrib-quality-levels
- Installation
- Usage
-
`
When using with Browserify, install videojs-quality-selector-hls via npm and require the plugin as you would any other module.
`js
var videojs = require('video.js');
// The actual plugin function is exported by this module, but it is also
// attached to the Player.prototype; so, there is no need to assign it
// to a variable.
require('videojs-quality-selector-hls');
var player = videojs('my-video');
player.qualitySelectorHls();
`
When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require the plugin as you normally would:
`js
require(['video.js', 'videojs-quality-selector-hls'], function(videojs) {
var player = videojs('my-video');
player.qualitySelectorHls();
});
`
`js`
Set to true to display the currently selected resolution in the menu button. When not enabled, displayed an included VJS "HD" icon.
Set this to override the default positioning of the menu button in the control bar relative to the other components in the control bar.
Set this to one of the custom VJS icons (https://videojs.github.io/font/) to override the icon for the menu button.
`js
var player = videojs('my-video');
player.qualitySelectorHls({
displayCurrentQuality: true,
placementIndex: 2,
vjsIconClass: 'vjs-icon-hd'
});
``
MIT. Copyright (c) Tomexsans Evaristo <t2t.exe@gmail.com>
[videojs]: http://videojs.com/