Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including videojs-scene7 with all npm packages installed. Try it out:

require("video.js/package.json"); // video.js is a peer dependency. var videojsScene7 = require("videojs-scene7")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

videojs-scene7 v2.1.2

Tech plugin for VideoJS to support Scene7 players

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>

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free