# poster-image

> Capture preview image from a video file

Latest version **1.1.1** (published 2018-10-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install poster-image
pnpm add poster-image
yarn add poster-image
bun add poster-image
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-10-22 |
| First published | 2017-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/poster-image) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Rene Herrmann |
| Maintainers | herrmannplatz |
| Keywords | js, capture, frame, poster, screenshot, video, video poster |

## Links

- npm: https://www.npmjs.com/package/poster-image
- Repository: https://github.com/herrmannplatz/poster-image
- Homepage: https://github.com/herrmannplatz/poster-image#readme
- Issues: https://github.com/herrmannplatz/poster-image/issues
- npm.io page: https://npm.io/package/poster-image

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.1 (latest) — 2018-10-22
- 1.1.0 — 2017-01-08
- 1.0.0 — 2017-01-07

## README

# poster-image

Capture preview image from a video file. Useful when dealing with videos uploaded by the user.

## usage

HTML
```html
<script src="poster.js"></script>
```

Javascript
```js
poster(file).then(function(blob) {
  var image = new Image()
  image.src = URL.createObjectURL(blob)
  document.body.appendChild(image)
})
```

## browser support

Tested with latest Chrome, Firefox, Opera and Edge.

## api

### `poster(file)`

Create a video preview image from the given video file.

* `file` - video of type `File` or `Blob`.

* returns a Promise with the image data as `Blob`

## license

See [License](LICENSE)

---
_Source: https://npm.io/package/poster-image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
