Video.js plugin for supporting BIF.
For more information on BIF, see https://sdkdocs.roku.com/display/sdkdoc/Trick+Mode+Support.
<script src="/path/to/videojs.bif.min.js"></script>
// Generally BIF files are large, so you have the ability to manage fetching on your own.
// If this is the route you take, you can update plugin configuration at any time by rerunning the plugin.
//
// See documentation or example for more detail.
videojs('player_id').bif({
src: '/path/to/bif.bif',
});
Note: There are multiple ways to enable plugins. For more information, please visit Video.js.
Type: function
Default:
createBIFImage() {
const BIFImage = document.createElement('img');
BIFImage.className = 'bif-image';
return BIFImage;
}
Will be updated with new image previews—dependent on the current mouse over time in the video.
Type: function
Default:
createBIFTime() {
const BIFTime = document.createElement('span');
BIFTime.className = 'bif-time';
return BIFTime;
}
Will be updated with new time—dependent on the current mouse over time in the video.
Type: ArrayBuffer
Type: function
Default:
template() {
const template = document.createElement('div');
template.className = 'bif';
// append image element only if the images are ready
if (this.hasImages()) {
template.appendChild(this.BIFImage);
}
template.appendChild(this.BIFTime);
return template;
}
Will be updated every time configuration changes—default implementation will show time immediately, then show images when available.
Type: string
The source must abide by the BIF format.
npm install -g grunt-cli
npm install
npm start
Code licensed under The MIT License.