react-native-webrtc: onIceCandidate do not create any candidate for Video

After Invoke createOffer , I will receive onIceCandidate event, but it only add candidate for audio. there are no candidate for video. It works okay in 1.54.7, but failed from 1.57.0.

  • React Native version: 0.44.3
  • Plugin version: 1.57.0, 1.57.1,1.58.1
  • OS: 10.3.1/ iPhone

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Any updates on this?

I have the same issue “react”: “16.0.0-alpha.12”, “react-native”: “^0.46.4”, “react-native-webrtc”: “git+https://git@github.com/oney/react-native-webrtc.git”,

Thanks @havardholvik. That looks correct as per the max-bundle policy: https://bugs.chromium.org/p/webrtc/issues/detail?id=6132 The M58 SDP is using the max-bundle policy, but it doesn’t seem to be advertising it 😒 https://bugs.chromium.org/p/webrtc/issues/detail?id=4674&thanks=4674&ts=1432055914

I guess this (the default policy) changed internally in libwebrtc, since we didn’t do anything intentional to this effect in this plugin.

Let’s try something (untested):

Edit this file and add the following after the highlighted line: https://github.com/oney/react-native-webrtc/blob/fcb20492bc49122d93993ae5083076f5ef6284ee/ios/RCTWebRTC/RCTConvert%2BWebRTC.m#L90

config.bundlePolicy = RTCBundlePolicyMaxCompat;

The change is for iOS only. Once we confirm the fix I can look into Android.

Last, question: what is your other endpoint?

Cheers @zxcpoiu! I don’t think RTCP muxing plays a big role here. With balanced bundle but RTCP muxing on you’ll get candidates for both tracks, but one for component “1”.

@havardholvik Fantastic, thanks for confirming! This should indeed be exposed in JS via the “bundlePolicy” parameter. This is already the case for Android, so it’s easy to change there, but iOS needs some code to handle this. It should be added in that very file, which would convert the value in the json object to ObjC++ values.

At any rate, it might be a good idea to change our default to max-compat (what the line I gave you does) for, well, maximum compatibility.

I’ll keep this in mind when doing the next libwebrtc upgrade.

Cheers,