Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

javascript sdk 1-2 second audio loss when updating access token #392

Open
ikeallison990 opened this issue Mar 3, 2023 · 0 comments
Open

Comments

@ikeallison990
Copy link

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.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant