# react-native-thumbnail-video

> Easily show thumbnails for videos

Latest version **0.1.2** (published 2019-01-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-thumbnail-video
pnpm add react-native-thumbnail-video
yarn add react-native-thumbnail-video
bun add react-native-thumbnail-video
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-01-31 |
| First published | 2017-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 254.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 105 |
| Author | Lucas Bento |
| Maintainers | lucasbento |
| Keywords | react-native, youtube, video, thumbnail |

## Links

- npm: https://www.npmjs.com/package/react-native-thumbnail-video
- Repository: https://github.com/lucasbento/react-native-thumbnail-video
- Homepage: https://github.com/lucasbento/react-native-thumbnail-video#readme
- Issues: https://github.com/lucasbento/react-native-thumbnail-video/issues
- npm.io page: https://npm.io/package/react-native-thumbnail-video

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2019-01-31
- 0.1.1 — 2018-08-13
- 0.1.0 — 2018-07-30
- 0.0.8 — 2017-12-07
- 0.0.7 — 2017-12-07
- 0.0.6 — 2017-11-01
- 0.0.5 — 2017-10-31
- 0.0.4 — 2017-10-23
- 0.0.3 — 2017-10-23
- 0.0.2 — 2017-10-23
- 0.0.1 — 2017-10-23

## README

<h1>
  react-native-thumbnail-video &middot;
 
  <a href="https://travis-ci.org/lucasbento/react-native-thumbnail-video">
    <img src="https://travis-ci.org/lucasbento/react-native-thumbnail-video.svg?branch=master" />
  </a>
</h1>
<p>
  Easily show thumbnails for videos using React Native.
</p>

## Demo

<p align="center">
  <img src="https://cdn.rawgit.com/lucasbento/react-native-thumbnail-video/master/media/demo.gif" width="250" />
</p>

> See the demo on Expo: [@lucasbento/react-native-thumbnail-video-example](https://expo.io/@lucasbento/react-native-thumbnail-video-example)

## Installation

```sh
yarn add react-native-thumbnail-video
```

## Usage

```jsx
import { Thumbnail } from 'react-native-thumbnail-video';

// ...
  render() {
    return (
      <Thumbnail url="https://www.youtube.com/watch?v=lgj3D5-jJ74" />
    )
  }
// ...
```

## Props

##### [Extends `Image` prop-types](https://facebook.github.io/react-native/docs/image.html#props)

##### `url` (string)
URL of the video

##### `type` ([string])
Can be either `default`, `high`, `medium`, `standard` or `maximum`.

##### `imageWidth` (number/string)
Width of the image. Defaults to the device width.

##### `imageHeight` (number/string)
Height of the image. Defaults to `200`.

##### `containerStyle` ([ViewPropTypes.style](https://facebook.github.io/react-native/docs/view.html#style))
Style of the container using `TouchableOpacity`.

##### `iconStyle` ([ImagePropTypes.style](https://facebook.github.io/react-native/docs/image.html#style))
Style of the icon image.

##### `showPlayIcon` (boolean)
Show play icon. Defaults to true.

##### `onPress` (function)
Function to be called when the user presses the thumbnail. Defaults to opening the video URL.

##### `onError` (function)
Function to be called when there's an error on the default `onPress` function.

##### `children` (component)
Custom component to render inside of the thumbnail.

## License

MIT © [Lucas Bento](http://github.com/lucasbento)

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