Cordova-plugin-iosrtc: RTCPeerConnection.prototype.updateTransceiversState() needs a list but is passed an object and fails

Created on 18 Mar 2021  路  4Comments  路  Source: cordova-rtc/cordova-plugin-iosrtc

YOU MUST read first!

Please use Community Forum for general technical discussions and questions.

  • [x] I have used Google with the error message or bug in association with the library and Cordova words to make sure the issue I'm reporting is only related to iOSRTC.
  • [x] I have provided steps to reproduce (e.g. using sample app code https://github.com/cordova-rtc/cordova-plugin-iosrtc-sample or updated extra/renderer-and-libwebrtc-tests.js file).
  • [x] I have provided versions of third party library name, ios, Xcode and plugin version and adapter.js version if used.

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.

Versions affected

  • Cordova version (e.g 7.1.0): 10.0.0
  • Cordova iOS version (e.g 5.1.0): 6.2.0
  • Plugin version (e.g 6.0.12): 8.0.0-RC3
  • iOS version (e.g 10.2): 14.4.1
  • Xcode version (e.g 11.1 - 11A1027): 12.4
  • WebRTC-adapter version (e.g. 7.4.0):
  • WebRTC Framework version (e.g. JSSip 3.1.2):

Description

RTCPeerConnection.prototype.updateTransceiversState() maps through transceivers, assuming it to be list. However, the list is passed through as an object containing a list. Therefore .map() is undefined.

Bildschirmfoto 2021-03-18 um 15 40 35

Steps to reproduce

Start a WebRTC connection with audio and video tracks.

Expected results

Should start the connection without issues.

Actual results

transceiver.map() is undefined.

bug

All 4 comments

thx @ducile, Transceivers are only on master and we have couple of tests to perform before release 8.0.0.
I will make sure its fixed before release.

cc @agelito

@ducile is the fix simply to change this ?

- self.updateTransceiversState(update);
+ self.updateTransceiversState([update]);

No the fix would be to unwrap the underlying transceivers array. I've created a PR for you #662

Thx @ducile way to go.

Was this page helpful?
0 / 5 - 0 ratings