souvik-ghosh / react-native-create-thumbnail

iOS/Android thumbnail generator with support for both local and remote videos
MIT License
246 stars 105 forks source link

Add maxWidth & maxHeight parameters so we can specify desired thumbnail size + timeToleranceMs for iOS #111

Closed charlyBerthet closed 3 months ago

charlyBerthet commented 3 months ago

Android used to not specify any thumbnail sizes so you could get large images (like 1080x720) and iOS was specifying a max size of 512 px.

Let's make Android follow iOS specifications (default size to 512px) and allow users to specify a desired max size from the config parameter (maxWidth & maxHeight).

I have also added a config called timeToleranceMs so user can requests for a more specific frame on iOS. It used to have 2sec tolerance which can be a bit wide.

Tested on Android (real device) and iOS (simulator + real device). Tested on landscape and portrait videos.

Readme updated.

genaris commented 3 months ago

This is a great feature. I hope it gets merged soon!

The only remaining setting to make a consisten behaviour in both platforms is to be able to adjust image quality (In JPEG mode, currently it uses 90% for Android and 100% for iOS).

souvik-ghosh commented 3 months ago

Looks good, merging this. @charlyBerthet Thanks for the PR! 💯