Browsers and versions affected
Chrome
Steps to reproduce
We have a web application that uses the Twilio JavaScript Voice SDK to receive calls in the browser via WebRTC. (In our application, clients only receive calls; we never call Device.connect.)
We have been using version 1.12.5 of the SDK, and I'm trying to update to the current version 2.3.2 by following your migration guide.
Expected results
My questions are: Should I be calling updateToken during an active call? Or should I wait for the call to complete before refreshing the token? Is a momentary audio disruption expected when calling updateToken? What are the consequences of continuing a call after the token has expired?
Actual results
Among the changes I'm making is periodically refreshing the access token using device.updateToken. I notice that if I do that while a call is in progress, there's a noticeable glitch in the audio (it drops out for a second or two). On the other hand, if the token expires during an active call, that seems to have no effect on the call. (Previously, we never bothered refreshing the token. We just passed it to Twilio.Device.setup on page load and didn't touch it again.)