video-snap
TypeScript icon, indicating that this package has built-in type declarations

1.0.1-alpha.1 • Public • Published

VideoSnap

Get multiple snapshots from video in a browser.

Usage

Imagine you want to render thumbnails for a video that user just added to file input.

// 1. Get File object from fileInput
const file = fileInput.files[0];
 
// 2. Convert File object to url
const fileUrl = window.URL.createObjectURL(file);
 
// 3. Create new instance of VideoSnap with that url
const videoSnap = new VideoSnap(fileUrl);
 
// 4. Get an array of image urls (Blob urls) from that video
videoSnap.getFrames(10).then(thumbnails => {
    // Use generated thumbnails here
});

Package Sidebar

Install

npm i video-snap

Weekly Downloads

3

Version

1.0.1-alpha.1

License

MIT

Unpacked Size

13.7 kB

Total Files

4

Last publish

Collaborators

  • dmitryrodnikov