videojs-scene7
v4.0.3
Published
Tech plugin for VideoJS to support Scene7 players
Downloads
16
Readme
videojs-scene7
Tech plugin for VideoJS to support Scene7 players
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: "https://s7d1.scene7.com/is/image/", // Path to Scene7 server
videoserverurl: "https://s7d1.scene7.com/is/content/", //
}
}
serverurl
URL to the image API for Scene7. Default when not set is https://s7d1.scene7.com/is/image/
videoserverurl
URL to the content API for Scene7. Default when not set is https://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 https://s7d1.scene7.com/is/content/
License
MIT. Copyright (c) Anthony McLin <[email protected]>