aws / connect-rtc-js

Provide softphone support to AmazonConnect customers when they choose to directly integrate with our API and not using our web app.
Apache License 2.0
80 stars 63 forks source link

Doesn't adapt unified-plan semantic in chrome. #33

Closed pallab-gain closed 5 years ago

pallab-gain commented 5 years ago

Connect doesn't support unified-plan SDP semantic. Currently, connect SDK is failing to establish a call in "setRemoteDescription" phase with given errors.

[2018-12-19T13:57:27.749Z] [ERROR]:  86e666f3-c2a6-44a6-93bd-4e6f9bdc9ef5 SESSION SetRemoteDescription failed InvalidAccessError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp: The order of m-lines in answer doesn't match order in offer. Rejecting answer.

So, connect has chances to fail when unified-plan will be the default plan in Chrome ( Unified Plan SDP format - transition plan ).

Tested browser versions :

Workaround from JS end:

  1. Always use plan-b SDP semantic.
  2. Add a=mid line if it doesn't present in the remote SDP lines
yuliangz commented 5 years ago

Seems like latest Chrome canary could properly handle the answer SDP.

pallab-gain commented 5 years ago

@yuliangz Agreed, we also tested, and confirmed it. https://bugs.chromium.org/p/webrtc/issues/detail?id=9540 is fixed, and closed on 20th December, which was happening due to missing MID in chrome, and one of the side effects of unified-plan that was affecting connect SDK.