video.js shaka player tech
npm install videojs-shakashaka player
- Installation
- Usage
- Tag
- Debug
- DRM
- qualitytrackchange Event
- Special Thanks
- License
``sh`
npm install --save videojs-shaka
To include videojs-shaka 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.
`html`
If you want to enable the bitrate quality picker menu, you'll need to initialize it by calling the qualityPickerPlugin function.
`html`
Configure DEBUG logging level in the following manner by including the shaka-player.compiled.debug.js on your page (default will be set to ERROR):
`html`
There may be times when you have embedded subtitles in your stream, but you want to side load webvtt files into video.js yourself. Just specify sideload: true and the embedded subtitles in the stream will be ignored (default will be set to false).
`html`
Configure DRM in the following manner:
`html`
If you need to set the DRM server after you initialize video.js prior to loading the source, you can specify a function for shaka.configuration.drm as follows:
`html`
If you would like to know when a user switches video quality, you can register an event listener for qualitytrackchange. The quality track object will be returned to you.
`html`
To run the sample app, you just need to start the development server with the following command:
`bash``
$ npm run sample
Then just open the app at http://localhost:3000/
This library wasn't possible without leveraging the following libraries that were used to create this.
- videojs-shaka-player - https://github.com/MetaCDN/videojs-shaka-player
- videojs-quality-picker - https://github.com/streamroot/videojs-quality-picker/
- videojs-shaka - https://github.com/halibegic/videojs-shaka
- videojs-contrib-dash - https://github.com/videojs/videojs-contrib-dash
MIT. Copyright (c) Dave Herzog <davidjherzog@gmail.com>
[videojs]: http://videojs.com/