Tech plugin for VideoJS to support Scene7 players
npm install --save videojs-scene7
To include videojs-scene7 on your website or web application, use any of the following methods.
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>
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();
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();
});
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/", //
}
}
URL to the image API for Scene7. Default when not set is https://s7d1.scene7.com/is/image/
URL to the content API for Scene7. Default when not set is https://s7d1.scene7.com/is/content/
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/
MIT. Copyright (c) Anthony McLin <[email protected]>