Replies: 3 comments 9 replies
-
Try Plugin version: 6.0.21 you going to need it to receive call from Chrome 89+ anyway see #666 |
Beta Was this translation helpful? Give feedback.
7 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
We ran into a very strange problem that we have not been able to figure out yet. I hope you can help us. We have WebRTC based clients for iOS and Android developed with Cordova and we are working on moving from a WebRTC Plan B implementation to Unified Plan.
When we test Unified Plan mode on Android, basic calls work fine. However, when we initiate an audio call on iOS, the app crashes immediately. This is the errors we get before crash:
This error seems to be printed in Chromium: https://chromium.googlesource.com/external/webrtc/+/d7180cccc48efdec6241e3b21449046e62ebb91a/pc/peer_connection.cc#1155
As suggested here: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/addStream, we stopped using RTCPeerConnection.addStream() and migrated to RTCPeerConnection.addTrack() when moving to Unified Plan implementation. So, RTCPeerConnection.addStream() is not being called by our client.
Looking into the plugin code (https://github.com/cordova-rtc/cordova-plugin-iosrtc/blob/6.0.13/dist/cordova-plugin-iosrtc.js#L2272), we saw that RTCPeerConnection.addStream() is called by the RTCPeerConnection.addTrack() function when a stream is provided as a second input parameter. After commenting out this line, the app did not crash but speech path was missing on both sides. To overcome this, we replaced the RTCPeerConnection.addStream() code withRTCPeerConnection.addTrack() as suggested here: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/addStream#migrating_to_addtrack(). This resolved the speech path issue and prevented the app form crashing.
However, we don't know if this is an issue that only we are having and if our workaround is correct.
Also, we have considered upgrading the plugin but since the latest implementation of RTCPeerConnection.addTrack() is similar (https://github.com/cordova-rtc/cordova-plugin-iosrtc/blob/master/www/cordova-plugin-iosrtc.js#L2403) we did not expect an improvement there.
Any help or suggestions you can provide will be greatly appreciated :)
Cordova version: 7.1.0
Cordova iOS version: 5.1.1
Plugin version: 6.0.13
iOS version: 14.4.1
Xcode version: 12.3 (12C33)
WebRTC Framework version: WebRTC M85 based private build
Beta Was this translation helpful? Give feedback.
All reactions