MissingPluginException(No implementation found for method file on channel video_thumbnail)

Viewed 1582

I am using video_thumbnail 0.2.4 package to get thumbnail form video url. If I uploaded video from android device then its working perfect but If I used iPhone device, Always get the error

MissingPluginException(No implementation found for method file on channel video_thumbnail)

I'm using Firestore as backend and using Firebase Storage for store my video/photos. Below are my code. Url is correct and video playing in the browser.

Future<String> thumbnailImageFromVideoUrl(String url, String feedID) async {
    try {
      String filePath = _strDirectoryPath + "/" + feedID + '.png';
      print("filePath -- $filePath");
      print("videoURL -- $url");
      return await VideoThumbnail.thumbnailFile(
        video: url,
        thumbnailPath: filePath,
        imageFormat: ImageFormat.PNG,
        maxHeight: 240,
        quality: 50,
      );
    } catch (e) {
      print("Video Thumbnail Error: $e");
      return null;
    }
  }

Kindly help me on this case.

1 Answers

I've been working using video_thumbnail 0.4.3 (Video Thumbnail) and I found that due to some video formats this kind of error is generated by SDK. There is no solution till now however you can control it by the try:catch function.

Also i have created the issue on there GitHub repository with this link of issue i've created.

Related