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

Issues on iOS 14 #43

Closed smedic closed 3 years ago

smedic commented 3 years ago

On iOS 14, thumbnailData returns null, while thumbnailFile kills the app.

For instance: /var/mobile/Media/DCIM/104APPLE/IMG_4898.MOV

Any plans for fixing this?

shreyaspapi commented 3 years ago

Same issue.

Renatinaveen commented 3 years ago

Facing the same issue.

I have a production app for release in 2 days so it would be very helpful if this issue fixes soon.

gazialankus commented 3 years ago

We had this issue for videos that would not play on the iPhone. We tried opening the video URL in Safari in iPhone and it won't play. For other videos that the iPhone can play, we can get the thumbnail just fine.

kuyazee commented 3 years ago

Same issue

shreyaspapi commented 3 years ago

Hey, we really need this too we have a production release in 10 days.

liraku commented 3 years ago

Same issue.

scofield-hello commented 3 years ago

same issue

justsoft commented 3 years ago

I have verified the two functions are working as expected under iOS 14.2. Please make sure the file or the URL can be read or loaded also the App has sufficient permissions to read and write. I use the following code to make sure the App has the permissions:

    final Map<Permission, PermissionStatus> statuses = await [
      Permission.camera,
      Permission.storage,
      Permission.photos,
      Permission.microphone,
    ].request()
  statuses.forEach((key, value) => debugPrint('$key: $value'))
yaizudamashii commented 3 years ago

I can verify that for iOS 14.2, adding Permission.storage kind of solves the issue of thumbnail not being created for my project (in addition to already given camera and microphone permissions, photos does not seem to be necessary.

I say kind of because even after requesting the permission, taking the video, awaiting stopping the video, then creating the thumbnail image fails because the video file cannot be read, even with the storage permission. Doing the operation again leads to a successful creation of the thumbnail. However, every time the screen to take video is pushed, this first time thumbnail creation fails, which isn't a good user experience.

yaizudamashii commented 3 years ago

I think the problem is possible caused by the fact I'm using beta channel and nullsafety override (as some other newer packages offer more functionality). I also tried with version 0.2.1 which I was using before (without any thumbnail creation problems) using nullsafety but the version didn't work at all, hinting maybe it is because i've updated rest of the app to use nullsafety

yaizudamashii commented 3 years ago

For those of you where you can get by not creating a file, I worked around this issue by using thumbnailData rather than thumbnailFile

justsoft commented 3 years ago

@yaizudamashii Thank you for sharing your solution.

devr-tech commented 3 years ago

Hi there, is there anyone still facing this issue even on the latest build?