videojs-vjsdownload
Adds a button to download the video inside the playerDemo
https://7ds7.github.io/videojs-vjsdownload/or
https://codepen.io/binaryunit/pen/BMpegv
Usage
Include the plugin files- videojs-vjsdownload.js
- videojs-vjsdownload.css
also available trough ``
bower install videojs-vjsdownload
` or
`npm install videojs-vjsdownload
``var player = videojs(document.querySelector('.video-js'), {
plugins: {
vjsdownload:{
beforeElement: 'playbackRateMenuButton',
textControl: 'Download video',
name: 'downloadButton',
downloadURL: 'https://video_url.mp4' //optional if you need a different download url than the source
}
}
} , function() {
console.log('Callback video-js initiated');
this.on('downloadvideo', function(){
console.log('downloadvideo triggered');
});
});