justsoft / video_thumbnail

This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
MIT License
183 stars 242 forks source link

Get the video thumbnail exception on ios #37

Open bhjSky opened 4 years ago

bhjSky commented 4 years ago

Gets the image as null on thumbnailFile. The thumbnailFile method does not set the thumbnailPath parameter. path is nsnull,Is not null

justsoft commented 3 years ago

Thanks for the patch. @bhjSky Why don't check the thumbnailPath parameter at the first place?

scofield-hello commented 3 years ago

many ios developers have the same problem.

thumbnailFile String [video], String [thumbnailPath](folder or full path where to store the thumbnail file, null to save to same folder as the video file), ImageFormat imageFormat, int [maxHeight](0: for the original resolution of the video, or scaled by the source aspect ratio), int [maxWidth](0: for the original resolution of the video, or scaled by the source aspect ratio), int [timeMs] generates the thumbnail from the frame around the specified millisecond, int quality creates a file of the thumbnail from the [video

when set this thumbnailPath as default, it will cause crash.

justsoft commented 3 years ago

Leave the thumbnailPathl as null means the generated thumbnail image into the folder as what the thmbnailFile is. You have to make sure the folder has the write permissions for this App.