8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
A call on Android to MediaRecorder.start with a file path and a video track but a null audio channel causes an exception to be thrown:
MediaRecorder.start
D/FlutterWebRTCPlugin: startRecordToFile(): Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
The bug is in MessageCallHandlerImpl.onMethodCall, case “startRecordToFile” where the code checks for the presence of the key “audioChannel” but doesn't check if the value is null. The fix is to add that check.
MessageCallHandlerImpl.onMethodCall
To Reproduce
flutter-rtc
flutter_foreground_plugin
Expected behavior No exception, a file with mp4 video should be written when the stop button is pressed.
Platform information
flutter doctor -v [✓] Flutter (Channel dev, 1.24.0-7.0.pre, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-US) • Flutter version 1.24.0-7.0.pre at /users/alan/Documents/util/flutter • Framework revision a0860f6e87 (12 days ago), 2020-10-29 20:07:34 -0700 • Engine revision 073263e39d • Dart version 2.11.0 (build 2.11.0-260.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/alan/Library/Android/sdk • Platform android-30, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.1, Build version 12A7403 • CocoaPods version 1.8.4 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 50.0.1 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] IntelliJ IDEA Community Edition (version 2020.1.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin version 201.8538.45 [✓] VS Code (version 1.47.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [✓] Connected device (4 available) • SM G960U1 (mobile) • 243482e51b017ece • android-arm64 • Android 10 (API 29) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.7 19H2 darwin-x64 • Web Server (web) • web-server • web-javascript • Flutter Tools • Chrome (web) • chrome • web-javascript • Google Chrome 86.0.4240.183 • No issues found!
The text was updated successfully, but these errors were encountered:
Fixes [Issue flutter-webrtc#409](flutter-webrtc#409), and updates the…
1c3776e
… example to run on Android 10. - Fix [Issue flutter-webrtc#409](flutter-webrtc#409) by adding a null guard to `com.cloudwebrtc.webrtc/MedhodCallHandler.java`, case "startRecordToFile". - Update the example project with the ForegroundService needed to run it on Android 10.
fixup! Fixes [Issue flutter-webrtc#409](flutter-webrtc#409), and upda…
8feecf9
…tes the example to run on Android 10.
cd471c0
Fix for Issue #409, including updating example project to run on Andr…
8bc8fbf
…oid 10. (#410) * Fixes [Issue #409](#409), and updates the example to run on Android 10. - Fix [Issue #409](#409) by adding a null guard to `com.cloudwebrtc.webrtc/MedhodCallHandler.java`, case "startRecordToFile". - Update the example project with the ForegroundService needed to run it on Android 10. * fixup! Fixes [Issue #409](#409), and updates the example to run on Android 10. * fixup! Fixes [Issue #409](#409), and updates the example to run on Android 10. Co-authored-by: Alan Marwick <admarwick@gmail.com>
Successfully merging a pull request may close this issue.