Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingPluginException(No implementation found for method setLogLevel on channel video_compress) #258

Open
Tetrazine opened this issue Feb 25, 2024 · 4 comments

Comments

@Tetrazine
Copy link

I'm using video_compress 3.1.0, flutter 3.19.1 and Dart 3.3.0

Debugging console output:
flutter: Video compression canceled with error: MissingPluginException(No implementation found for method setLogLevel on channel video_compress)
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method cancelCompression on channel video_compress)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)

#1 Compress._invoke (package:video_compress/src/video_compress/video_compressor.dart:41:13)

#2 Compress.cancelCompression (package:video_compress/src/video_compress/video_compressor.dart:168:5)

And this is the corresponding code:

CustomTextButton(
onPressed: () async {
MediaInfo? info = await controller.compressVideo(
Get.find().videoFile3);
},
text: 'Compress Video',
),

 Future<MediaInfo?> compressVideo(File? file) async {
try {
  await VideoCompress.setLogLevel(0);
  return VideoCompress.compressVideo(
    file!.path,
    quality: VideoQuality.MediumQuality,
    includeAudio: true,
    deleteOrigin: false,
  );
} catch (e) {
  VideoCompress.cancelCompression();
  debugPrint('Video compression canceled with error: $e');
}

}

@kkuivi
Copy link

kkuivi commented May 14, 2024

@Tetrazine Were you able to find a solution? I seem to be running into the same issue.

Flutter clean + Flutter pub get does not fix the issue for me

@Tetrazine
Copy link
Author

yes i solved the problem by using the "video_compress_v2" package instead of the "video_compress" package. hope this also works for you!

@kkuivi
Copy link

kkuivi commented May 15, 2024

@Tetrazine Did you do anything besides importing the package in the pubspec.yaml? I tried video_compressV2 and I am still running into the MissingPluginException error.

Also, was it working for you on both Android and iOS?

@Tetrazine
Copy link
Author

No sorry, i didn't do anything else besides importing it in the pubsepec.yaml. And yes it's working for Android and iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants