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
79 stars 63 forks source link

Remove webrtc-adapter #79

Open milky2028 opened 2 years ago

milky2028 commented 2 years ago

Amazon alias: @tylgross

Description of changes: Removing webrtc-adapter decreases the size of connect-rtc-js from 193kb to 121kb, about 37%. webrtc-adapter patches prefixed versions of the WebRTC library and adds some other functionality, despite the fact that WebRTC is well-supported in all modern browsers and the API is stable. I couldn't find any evidence that connect is using experimental or semi-experimental portions of WebRTC APIs.

In addition to this, Amazon Connect only supports the the last three major versions of Chrome, Firefox, and Firefox ESR. For these reasons, it makes sense to me to remove this dependency. Given that Connect has deprecated support for older browsers, I don't see this as a breaking change, but I don't think I'd argue if someone else thought it was.

If this change is considered too risky, an alternative might be to update to version 8 of webrtc-adapter, which still saves about 20kb.

Web RTC Support

Screen Shot 2022-02-09 at 1 45 18 PM

Side note: The support matrix here is partially incorrect in that Samsung Internet (being a fork of Chrome) fully supports unprefixed WebRTC.

From Device: Samsung Internet

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.