android - MissingPluginException(未找到 channel video_thumbnail 上的方法文件的实现)

标签 android ios flutter dart

我正在使用 video_thumbnail 0.2.4 包以获取缩略图形式的视频 url。如果我从 android 设备上传视频,那么它的工作完美但如果我使用 iPhone 设备,总是得到错误

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


我正在使用 Firestore作为后端并使用 Firebase Storage用于存储我的视频/照片。下面是我的代码。网址正确,视频在浏览器中播放。
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;
    }
  }
请帮我处理这个案子。

最佳答案

我一直在使用 video_thumbnail 0.4.3 ( Video Thumbnail ) 我发现由于某些视频格式,这种错误是由 SDK 产生的。
到目前为止还没有解决方案,但是您可以通过 try:catch 来控制它。功能。
我也用这个 link of issue i've created 在 GitHub 存储库上创建了问题。 .

关于android - MissingPluginException(未找到 channel video_thumbnail 上的方法文件的实现),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64985303/

相关文章:

android - 我可以通过我的应用程序监控Android原生相机应用程序拍摄的照片吗?

java - 动态/编程设置具有可绘制背景的按钮的大小

android - ProGuard for Android 和 Retrofit2 Converter Gson?

iphone - 如何发布到 friend 的时间轴

Flutter - 防止点击/点击事件通过 View 层次结构传递

java - 设置当前位置

ios - Google Maps SDK 在 ItunesConnect 测试而非 Xcode 上崩溃

objective-c - 从另一个类获取整数值

flutter - 在 dart/flutter 中使用 [][] 从包含列表的映射中建立索引时出错

flutter - 带有图标和文本位置左侧的按钮