You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm use this package, and with a Pixel 2 XL physical device with Android 11, the package doesn't work, I'm test in Android 10 emulator, and iOS 14 and works fine, but Android 11 is the problem.
i'm try to compress video with all settings in default, with Image_Picker package and File_Picker to select the file from gallery or camera, the error is on both.
final info =awaitVideoCompress.compressVideo(path );`
The log
D/MediaScannerConnection( 5017): Scanned /storage/emulated/0/Android/data/MYAPPP/files/Pictures/0cec8741-c89d-4c75-97e8-d056d9d860e13536652757187323447.mp4 to null
I/flutter ( 5017): VideoCompress: You can try to subscribe to the
I/flutter ( 5017): compressProgress$ stream to know the compressing state.
E/MethodChannel#video_compress( 5017): Failed to handle method call
E/MethodChannel#video_compress( 5017): kotlin.KotlinNullPointerException
E/MethodChannel#video_compress( 5017): at com.example.video_compress.VideoCompressPlugin.onMethodCall(VideoCompressPlugin.kt:83)
E/MethodChannel#video_compress( 5017): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#video_compress( 5017): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#video_compress( 5017): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#video_compress( 5017): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#video_compress( 5017): at android.os.MessageQueue.next(MessageQueue.java:335)
E/MethodChannel#video_compress( 5017): at android.os.Looper.loop(Looper.java:183)
E/MethodChannel#video_compress( 5017): at android.app.ActivityThread.main(ActivityThread.java:7656)
/MethodChannel#video_compress( 5017): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#video_compress( 5017): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/MethodChannel#video_compress( 5017): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I/flutter ( 5017): Error from VideoCompress:
I/flutter ( 5017): Method: compressVideo
I/flutter ( 5017): PlatformException(error, null, null, kotlin.KotlinNullPointerException
I/flutter ( 5017): at com.example.video_compress.VideoCompressPlugin.onMethodCall(VideoCompressPlugin.kt:83)
I/flutter ( 5017): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
I/flutter ( 5017): at android.os.MessageQueue.nativePollOnce(Native Method)
I/flutter ( 5017): at android.app.ActivityThread.main(ActivityThread.java:7656)
I/flutter ( 5017): at java.lang.reflect.Method.invoke(Native Method)
I/flutter ( 5017): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
I/flutter ( 5017): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
The text was updated successfully, but these errors were encountered:
Not sure about Android 11, but the error in the stack trace is happening due to the missing includeAudio parameter, which for some reason does not have a default value and is not required on the Dart side, but is required in Android platform code.
So, calling the function like this should fix the issue:
final info =awaitVideoCompress.compressVideo(path, includeAudio:true);
Hi, I'm use this package, and with a Pixel 2 XL physical device with Android 11, the package doesn't work, I'm test in Android 10 emulator, and iOS 14 and works fine, but Android 11 is the problem.
i'm try to compress video with all settings in default, with Image_Picker package and File_Picker to select the file from gallery or camera, the error is on both.
The log
The text was updated successfully, but these errors were encountered: