-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Recording does not work #111
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
Comments
This seems to be a bug. |
You just add RecorderAudioChannel like this.... |
` import 'package:flutter/material.dart'; import 'package:flutter_webrtc/webrtc.dart'; import 'package:collection/collection.dart'; import 'package:quiver/async.dart'; class VideoCall extends StatefulWidget { class _VideoCallState extends State { final String serverIP = 'localhost'; @OverRide initRenderers() async { @OverRide void _connect() async {
} final Map<String, dynamic> mediaConstraints = { _startScreenRecorder() async {
} _stopScreenRecorder() async { _invitePeer(context, peerId, use_screen) async { _hangUp() async { _uploadVideo() async { _switchCamera() { _muteMic() {} _buildRow(context, peer) { @OverRide
} |
Recording does not work
Follow the example , https://github.com/cloudwebrtc/flutter-webrtc/blob/master/example/lib/src/get_user_media_sample.dart
Expected behaviour
E/MethodChannel#FlutterWebRTC.Method(25723): Failed to handle method call
E/MethodChannel#FlutterWebRTC.Method(25723): java.lang.IllegalArgumentException: Unsupported value: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
E/MethodChannel#FlutterWebRTC.Method(25723): at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:294)
E/MethodChannel#FlutterWebRTC.Method(25723): at io.flutter.plugin.common.StandardMethodCodec.encodeErrorEnvelope(StandardMethodCodec.java:70)
E/MethodChannel#FlutterWebRTC.Method(25723): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:230)
E/MethodChannel#FlutterWebRTC.Method(25723): at com.cloudwebrtc.webrtc.utils.AnyThreadResult.lambda$error$1(AnyThreadResult.java:23)
E/MethodChannel#FlutterWebRTC.Method(25723): at com.cloudwebrtc.webrtc.utils.-$$Lambda$AnyThreadResult$ccKxFpM2amkNZNKH8YO8t8OktKE.run(Unknown Source:8)
E/MethodChannel#FlutterWebRTC.Method(25723): at com.cloudwebrtc.webrtc.utils.AnyThreadResult.post(AnyThreadResult.java:33)
E/MethodChannel#FlutterWebRTC.Method(25723): at com.cloudwebrtc.webrtc.utils.AnyThreadResult.error(AnyThreadResult.java:23)
E/MethodChannel#FlutterWebRTC.Method(25723): at com.cloudwebrtc.webrtc.FlutterWebRTCPlugin.onMethodCall(FlutterWebRTCPlugin.java:344)
E/MethodChannel#FlutterWebRTC.Method(25723): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#FlutterWebRTC.Method(25723): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:90)
E/MethodChannel#FlutterWebRTC.Method(25723): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:234)
E/MethodChannel#FlutterWebRTC.Method(25723): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#FlutterWebRTC.Method(25723): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#FlutterWebRTC.Method(25723): at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#FlutterWebRTC.Method(25723): at android.app.ActivityThread.main(ActivityThread.java:6762)
E/MethodChannel#FlutterWebRTC.Method(25723): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#FlutterWebRTC.Method(25723): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#FlutterWebRTC.Method(25723): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/flutter (25723): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Unsupported value: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null)
E/flutter (25723): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter (25723): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
E/flutter (25723):
E/flutter (25723): #2 MediaRecorder.start (package:flutter_webrtc/media_recorder.dart:24:34)
E/flutter (25723):
Platform information
[✓] Flutter (Channel master, v1.7.5-pre.15, on Mac OS X 10.14.5 18F132, locale en-IN)
• Flutter version 1.7.5-pre.15 at /Users/hitesh/flutter
• Framework revision 09c09bf (4 weeks ago), 2019-06-16 21:52:44 -0700
• Engine revision 466a1d848d
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/hitesh/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
! CocoaPods out of date (1.6.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade:
brew upgrade cocoapods
pod setup
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.36.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.2.0
[✓] Connected device (2 available)
• Mi A1 • 654564314654 • android-arm64 • Android 9 (API 28)
• Hitesh’s iPhone • 6787yuyityuitiuyiftugtyuguytughuyu • ios • iOS 12.3.2
! Doctor found issues in 1 category.
The text was updated successfully, but these errors were encountered: