THIS project is functional and being used in production BUT EXPECT BREAKING CHANGES while on version 0.0.x.
VideoJS plugin that leverages videojs-contrib-quality-levels plugin to offer manual user-selectable level selection options for adaptive http streams.
Compatible with vjs 7 and up.
Level labels are generated from the id
and label
metadata parsed from the stream QualityLevels sources.
npm install --save videojs-contrib-quality-levels
npm install --save @firescar96/videojs-quality-selector
Requires videojs-contrib-quality-levels
To include videojs-quality-selector on your website or web application, use any of the following methods.
This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include [video.js][videojs], so that the videojs
global is available. You can configure the plugin with the options described above.
<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-quality-selector.min.js"></script>
<script src="//path/to/videojs-contrib-quality-levels.min.js"></script>
<script>
var options =
{
// no options are allowed for now, but in the future options can be placed here
// plugins: {
// httpSourceSelector: {}
// }
};
var player = videojs('my-video', options);
player.httpSourceSelector();
</script>
To build, checkout the repo, run npm install
&& npm start
,
go to localhost:9999 (or the next free port) and test out the plugin.
npm install
npm build
npm version major/minor/patch
git push origin master --tags
npm publish
MIT. Copyright (c) Justin Fujita, Nchinda Nchinda;