videojs-movipbox-playlist

1.1.2 • Public • Published

videojs-movipbox-playlist

The simplest playlist support for video.js player.

Table of Contents

Installation

npm install --save videojs-movipbox-playlist

Usage

To include videojs-movipbox-playlist 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-movipbox-playlist.min.js"></script>
<script>
  var player = videojs('my-video');
 
  player.playlist({
   playlist: [
       {
          sources: [{
            src: 'URL_TO_FIRST_VIDEO_FILE',
            type: 'video/mp4'
          }],
          poster: 'URL_TO_FIRST_VIDEO_POSTER'
        },
        {
          sources: [{
            src: 'URL_TO_SECOND_VIDEO_FILE',
            type: 'video/mp4'
          }],
          poster: 'URL_TO_SECOND_VIDEO_POSTER'
        }
    ]
  });
</script> 

You can also pass an optional ìnitialIndex to the object parameter to set the video to start with, and also an ads object to use the IMA ads plugin feature (videojs IMA plugin and videojs ads plugin are required. Consult IMA manual to set the options).

Examples

There is a provided example at index.html.

License

Apache-2.0. Copyright (c) Miguel González <miguel.gonzalezsosa@gmail.com>

Readme

Keywords

Package Sidebar

Install

npm i videojs-movipbox-playlist

Weekly Downloads

36

Version

1.1.2

License

Apache-2.0

Last publish

Collaborators

  • glezsosa