videojs-hls-stream-selector

0.2.2 • Public • Published

videojs-hls-stream-selector

Adds a selector menu to the VideoJS player for HLS sources

Installation

npm install --save videojs-hls-stream-selector

Usage

To include videojs-hls-stream-selector on your website or web application, use any of the following methods.

<script> Tag

This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs global is available.

<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-hls-stream-selector.min.js"></script>
<script>
  var player = videojs('my-video');

  player.hlsStreamSelector();
</script>

Browserify/CommonJS

When using with Browserify, install videojs-hls-stream-selector via npm and require the plugin as you would any other module.

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-hls-stream-selector');

var player = videojs('my-video');

player.hlsStreamSelector();

RequireJS/AMD

When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require the plugin as you normally would:

require(['video.js', 'videojs-hls-stream-selector'], function(videojs) {
  var player = videojs('my-video');

  player.hlsStreamSelector();
});

License

MIT. Copyright (c) Sebastian Marulanda <smarulanda@gmail.com>

Readme

Keywords

Package Sidebar

Install

npm i videojs-hls-stream-selector

Weekly Downloads

14

Version

0.2.2

License

MIT

Unpacked Size

69.6 kB

Total Files

17

Last publish

Collaborators

  • smarulanda