Socket
Socket
Sign inDemoInstall

clappr-capture-plugin

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

clappr-capture-plugin

A plugin for clappr which adds a button to take an image capture of the current video screen


Version published
Maintainers
1
Weekly downloads
5

Weekly downloads

Readme

Source

npm version

Clappr Capture Plugin

A plugin for clappr which adds a button to capture a base64 jpeg image of the current frame. Emits an event with the base64 data which you can use elsewhere in your application (sending to a remote endpoint, etc)

Screenshot

Usage

Add both Clappr and the capture plugin scripts to your HTML:

<head>
  <script type="text/javascript" src="http://cdn.clappr.io/latest/clappr.min.js"></script>
  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clappr-capture-plugin@latest/dist/clappr-capture-plugin.js"></script>
</head>

You can also find the project on npm: https://www.npmjs.com/package/clappr-capture-plugin

Then just add ClapprCapturePlugin into the list of plugins of your player instance.

var player = new Clappr.Player({
  source: "http://your.video/here.mp4",
  plugins: [ClapprCapturePlugin]
});

That's it, a button will be shown on the media control to enable capture. This only works with playback tech's that use a <video> tag to display video

See the demo for how to capture the event.

Demo

To run the demo start a web server with the root directory being the root of this repo, and then browse to the "index.html" file in the "demo" folder. The demo will open a new window with the captured image after the button has been clicked

Development

Install dependencies:

npm install

Build:

npm run build

Minified version:

npm run release

Credit to Tom Jenkinson (@tjenkinson) for his PIP plugin, which this plugin used as a base template.

FAQs

Last updated on 18 Sep 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc