Skip to content
This repository was 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

@ikeallison990

Description

@ikeallison990

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions