Socket
Book a DemoInstallSign in
Socket

get-video-screenshot

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-video-screenshot

Library to capture screnshots / thumbnails as images from a videos. Only works in the browser.

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Get Video Screenshot

Library to get screenshots of a video at any given time. Dependency free (other than the browser itself, does not work on node).

Usage

import GetVideoScreenshot from "get-video-screenshot";

const videoScreenshotGetter = GetVideoScreenshot(<Video Source>);
* Returns a `videoScreenshotGetter` object.

videoScreenshotGetter.get({time: <Int, Seconds>})
* Returns a promise with the image source as payload.

Example Usage.

import GetVideoScreenshot from "get-video-screenshot";

const videoScreenshotGetter = GetVideoScreenshot("./video.mp4");

const videoThumbnailSrc = await videoScreenshotGetter.get({ time: 1 });

// render to image to an <img /> tag
document.querySelector("img[data-thumbnail-render]").src = videoThumbnailSrc;

Keywords

video

FAQs

Package last updated on 03 May 2021

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