Breaking Changes in Twilio Client JavaScript SDKs (December 2018)

Google is introducing some breaking changes for WebRTC-based applications in upcoming Chrome releases. These changes could cause your users to lose audio if they switch audio input devices during an active call, depending on the exact version of the Twilio Client JavaScript SDK you use.

Summer 2019 Update: Google has advised Plan B will be removed from Chrome by the end of 2019. Since all Twilio Client JavaScript versions prior to version 1.7.1 rely on Plan B, we are recommending users upgrade to the latest 1.7.x version of Twilio Client JS SDK as soon as possible. For more details and upgrade guidance, please see Upcoming Breaking Changes in Twilio Client JavaScript SDK & Google Chrome.

Detailed Explanation

In December 2018, Google will begin migrating Chrome to use WebRTC's Unified Plan by default. This replaces Chrome's previous WebRTC Plan B implementation, which Twilio Client depends on for some of its features. Once this migration has completed, affected versions of the Twilio Client SDK will stop sending call audio whenever the audio input device is changed during an active call.

For example, if a user is running affected versions of both Chrome and the Twilio Client JavaScript SDK, and their headset detaches or disconnects during an active call, their browser will stop transmitting call audio under the WebRTC Unified Plan.

  • Under the previous WebRTC Plan B implementation, the browser would have automatically switch to the default microphone - either another microphone plugged in, or a built-in microphone.

Sometime in the mid-2019, Google plans to completely remove support for Plan B, which will require a new patch release of the Twilio Client JavaScript SDK to repair the lost microphone swapping behavior. The exact timeline for these changes has not been announced. We will continue to monitor the situation, and send another advisory with more information once Google confirms the exact timing of the related Chrome releases, and we have finalized our own release plans to support these changes.

Impact Timeline

These WebRTC changes will roll out to Chrome users gradually, beginning with Chrome 72:

  • Chrome 72 will release to Chrome's Beta Channel on December 13th, 2018.
  • Chrome 72 will release to Chrome's Stable Channel On January 29th, 2019.
  • Sometime in mid-2019, Google will completely remove support for Plan B. Final dates and versions of Chrome that will contain this change are still being determined by Google.

Note: You can find what Chrome version you're using by entering chrome://version into the address bar.

Will my app be affected by this change?

Your app will not be affected if you load the Twilio Client library from Twilio's CDN at any of the URLs listed below:

Your app will be affected if you depend on an older twilio-client npm package (see the release versions below). If you're in this situation, you should re-build your application with an up-to-date version of twilio-client.

To avoid being impacted, customers are recommended to upgrade to the latest SDK version - 1.6.3. Please consult the following table to see what, if any, actions to take, depending on which SDK version you currently have:

Version Affected Upgrade required?
1.6.2 + No No
1.6.0 - 1.6.1 YES YES
1.5.2 + No Recommended
1.5.0 - 1.5.1 YES YES
1.4.35 + No Recommended
1.4.0 - 1.4.34 YES YES
1.3.x No Recommended
1.2.x (EoL) No Highly recommended

How can I upgrade my application?

If you depend on the SDK served directly from Twilio's CDN, update your dependency to the latest version of 1.6. 1.6 is backward-compatible with both 1.4 and 1.5, and should require no additional migration steps. To update to 1.6, use the following URL in your application:

For customers already using npm, install the newest version of twilio-client before re-building your application:

npm install --save twilio-client@^1.6.0

Notice: Although it is not required to address this issue, in general, we recommend that all customers currently using our CDN switch to a build process using the official twilio-client npm package. Using npm provides more precise versioning rules, and adding dependencies as a build step provides more control over what makes it into your production application. You don't need to switch to npm to address this issue.

Next Steps

Twilio has addressed the changes coming in Chrome 72 in Client SDK versions 1.4.35, 1.5.2 and 1.6.2, and will completely migrate to support Unified Plan in future patch-level releases of 1.4, 1.5, and 1.6. Customers using npm or our minor-version CDN links (see above for a list) will automatically receive the updates once they are released.

Additional Resources

Have more questions? Submit a request
Powered by Zendesk