Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

videojs-vjsdownload

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-vjsdownload

Adds one icon in the component bar to download video

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2K
decreased by-10.64%
Maintainers
1
Weekly downloads
 
Created
Source

videojs-vjsdownload

Adds a button to download the video inside the player

Demo

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');
  });
});

Options

  • beforeElement: name of the player.controlBar component for the button to be attached before (default: fullscreenMenuToggle)
  • textControl: String for the controlText (default: 'Download Video')
  • name: name of the DownloadButton component (default: 'downloadButton')
  • downloadURL: oprional file to download (default: null)

Style

By default the download icon is the play button icon rotated 90deg with some suggar on top, to include a custom icon please refer to videojs-vjsdownload.css file

Keywords

FAQs

Package last updated on 13 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc