phuochau / react-native-thumbnail

Get thumbnail from local media. Currently, it only supports for video.
MIT License
135 stars 104 forks source link

Feature Request: Support setting the timestamp for the created thumbnail #18

Open n1ru4l opened 6 years ago

n1ru4l commented 6 years ago

Currently the thumbnail is generated from the start of the video. However it would be awesome if there was an option to specify the timestamp on which the thumbnail should be created via an option.

I could implement this for iOS.

The API could be designed like this:

import RNThumbnail from 'react-native-thumbnail';
const timestampInMilliseconds = 3000
RNThumbnail.get(filepath).then((result, { timestamp: timestampInMilliseconds }) => {
  console.log(result.path); // thumbnail path
})