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

null handel in RTCRtpCapabilities class #23

Open
dineshnaikb opened this issue Feb 13, 2024 · 0 comments
Open

null handel in RTCRtpCapabilities class #23

dineshnaikb opened this issue Feb 13, 2024 · 0 comments

Comments

@dineshnaikb
Copy link

dineshnaikb commented Feb 13, 2024

I/org.webrtc.Logging(19097): SurfaceTextureHelper: Setting listener to org.webrtc.Camera2Session$CaptureSessionCallback$$ExternalSyntheticLambda0@aec2ced
E/flutter (19097): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: NoSuchMethodError: The method 'forEach' was called on null.
E/flutter (19097): Receiver: null
E/flutter (19097): Tried calling: forEach(Closure: (dynamic) => Null)
E/flutter (19097): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
E/flutter (19097): #1      new RTCRtpCapabilities.fromMap (package:webrtc_interface/src/rtc_rtp_capabilities.dart:57:22)

codecs
headerExtensions
fecMechanisms: null

    var fecMechanisms = <String>[];
    dynamic fecMechanismsMap = map['fecMechanisms'];
    fecMechanismsMap.forEach((params) {
      fecMechanisms.add(params);
    });
dynamic fecMechanismsMap = map['fecMechanisms'];

if (fecMechanismsMap != null) {
  fecMechanismsMap.forEach((params) {
    fecMechanisms.add(params);
  });
} else {
  // Handle the case when fecMechanismsMap is null
  print('fecMechanismsMap is null');
}
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

1 participant