8000 Android: getUserMedia does not work for capturing audio only · Issue #29 · flutter-webrtc/flutter-webrtc · GitHub
[go: up one dir, main page]

Skip to content
Android: getUserMedia does not work for capturing audio only #29
@aryzhov

Description

@aryzhov

When I specify "video": false in constraints, I get an NPE on Android when attempting to call the method getUserMedia. Below is the stack trace:

E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): Failed to handle method call
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.cloudwebrtc.webrtc.utils.ConstraintsMap.hasKey(java.lang.String)' on a null object reference
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at com.cloudwebrtc.webrtc.GetUserMediaImpl.getUserMedia(GetUserMediaImpl.java:328)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at com.cloudwebrtc.webrtc.FlutterWebRTCPlugin.getUserMedia(FlutterWebRTCPlugin.java:665)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at com.cloudwebrtc.webrtc.FlutterWebRTCPlugin.onMethodCall(FlutterWebRTCPlugin.java:118)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:200)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at android.app.ActivityThread.main(ActivityThread.java:6351)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:896)
E/MethodChannel#cloudwebrtc.com/WebRTC.Method( 8994): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:786)

Omitting the "video" attribute does not help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0