Need private packages and team management tools?Check out npm Teams »

videojs-scene7

2.1.1 • Public • Published

videojs-scene7

Greenkeeper badge semantic-release Build Status Coverage Status David Dependancy Status David Dev Dependancy Status

NPM

Tech plugin for VideoJS to support Scene7 players

Table of Contents

Installation

Installation

npm install --save videojs-scene7

Usage

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

<script> Tag with a <video> 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. Make sure to set:

  • techOrder so VideoJS will leverage the Scene7 plugin
  • source of the Scene7 MediaSet
  • the type to videojs/scene7
  • The Scene7 player options
<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-scene7.min.js"></script>
<video id='my-video'
  controls
  autoplay
  >
  <source src='Scene7SharedAssets/Adobe_QBP-AVS' type='videojs/scene7'>
</video>
<script>
  var player = videojs('my-video',{
    techOrder: [ 'Scene7']
  });
 
  player.scene7();
</script> 

Browserify/CommonJS

When using with Browserify, install videojs-scene7 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-scene7');
 
var player = videojs('my-video',{
  techOrder: [ 'Scene7']
});
 
player.scene7();

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-scene7'], function(videojs) {
  var player = videojs('my-video',{
    techOrder: [ 'Scene7']
  });
 
  player.scene7();
});

Options

Provide Scene7 options to VideoJS through the normal VideoJS options object or data-options attribute. The options

options: {
  scene7: {
    serverurl: "http://s7d1.scene7.com/is/image/", // Path to Scene7 server
    videoserverurl: "http://s7d1.scene7.com/is/content/", // 
  }
}

serverurl

URL to the image API for Scene7. Default when not set is http://s7d1.scene7.com/is/image/

videoserverurl

URL to the content API for Scene7. Default when not set is http://s7d1.scene7.com/is/content/

contenturl

URL to the content API for Scene7 where losed caption and chapter navigation assets are located. Default when not set is http://s7d1.scene7.com/is/content/

License

MIT. Copyright (c) Anthony McLin <npm@anthonymclin.com>

Install

npm i videojs-scene7

DownloadsWeekly Downloads

3

Version

2.1.1

License

MIT

Unpacked Size

191 kB

Total Files

20

Last publish

Collaborators

  • avatar