react-native-thumbnail-generator

1.0.0 • Public • Published

react-native-thumbnail-generator

iOS/Android thumbnail generator with support for both local and remote videos

Getting started

  1. Install library from npm

    yarn add react-native-thumbnail-generator
  2. Link native code

    With autolinking (react-native 0.60+)

    cd ios && pod install

    Pre 0.60

    react-native link react-native-thumbnail-generator

Usage

import { createThumbnail } from "react-native-thumbnail-generator";
 
createThumbnail({
  url: "path to video file",
  timeStamp: 10
})
  .then(response => {
    console.log({ response });
    this.setState({
      status: "Thumbnail received",
      thumbnail: response.path
    });
  })
  .catch(err => console.log({ err }));

Request Object

Property Type Description
url String (default "") Path to video file (local or remote).
timeStamp Number (default 1) Thumbnail time

Response Object

Property Type Description
path String Path to generated thumbnail.
width Number Thumbnail width
height Number Thumbnail height

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i react-native-thumbnail-generator

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

41.8 kB

Total Files

25

Last publish

Collaborators

  • vishalnnsingh