videojs-verse

0.0.6 • Public • Published

videojs-verse

VERSE plugin

Installation

npm install --save videojs-verse

Usage

To include videojs-verse 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-verse.min.js"></script>
<script>
  var player = videojs('my-video');

  player.verse(
        {
          buttons:[
            {
              text: 'Audio y subtítulos',
              action: 'subtitles',
              icon: 'subtitles'
            },
            {
              text: 'Bloquear',
              action: 'lock',
              icon: 'lock'
            },
            {
              text: 'Velocidad',
              action: 'speed',
              icon: 'speed'
            },
            {
              text: 'Episodios',
              action: 'episodes',
              icon: 'filter_none'
            },
            {
              text: 'Siguiente episodio',
              action: 'next',
              icon: 'skip_next'
            }
          ],
          header: {
            icon: 'https://minio-core.oyealva.com/entertainment/images/app-verse.png',
            title: 'Episodio 1',
            subtitle: 'Conociendo su casa'
          }
        }
      );

  player.on('verse.button.subtitles', function() {
    console.log('verse.button.subtitles fired');
  });

  player.on('verse.button.lock', function() {
    console.log('verse.button.lock fired');
  });

</script>

Browserify/CommonJS

When using with Browserify, install videojs-verse 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-verse');

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

player.verse();

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-verse'], function(videojs) {
  var player = videojs('my-video');

  player.verse();
});

License

UNLICENSED. Copyright (c) Diego Olguin <diego.olguin@salamancasolutions.com>

Readme

Keywords

Package Sidebar

Install

npm i videojs-verse

Weekly Downloads

7

Version

0.0.6

License

UNLICENSED

Unpacked Size

70.9 kB

Total Files

15

Last publish

Collaborators

  • diegoot-dev