1.9.0 (May 9, 2018)
New Features
-
Room now emits "reconnecting" and "reconnected" events when the media
connection is disconnected and reconnected. You can use these events to update
your application and warn your users when a reconnection is occurring.
twilio-video.js does not yet support reconnecting the signaling connection;
however, when we do, we will use this same event. We recommend you set the
following event listeners in your application:room.on('reconnecting', error => { // Warn and/or update your application's UI. console.warn('Reconnecting!', error); }); room.on('reconnected', () => { // Log and/or update your application's UI. console.log('Reconnected!'); });
In addition to this change, we've also added a new Room
state
value:
"reconnecting". Roomstate
can now be one of "connected", "reconnecting", or
"disconnected". (JSDK-1855) -
By default, twilio-video.js waits up to 3000 milliseconds to fetch ICE servers
before connecting to a Room; and, if fetching ICE servers takes longer than
3000 milliseconds or otherwise fails, twilio-video.js will fallback to using
hard-coded STUN servers. Now you can configure this timeout with a new
property in ConnectOptions,iceServersTimeout
. You can also disable the
fallback behavior by setting another new property in ConnectOptions,
abortOnIceServersTimeout
, totrue
. Doing so will cause the Promise
returned byconnect
to reject with TwilioError 53500, "Unable to acquire
configuration", if fetching ICE servers times out or otherwise fails.
Bug Fixes
- Fixed a bug where, if the WebSocket connection to Twilio was disconnected (for
example, due to losing internet connectivity), Room would emit a
"disconnected" event without an error. Now, Room will emit a
SignalingConnectionDisconnectedError. - Fixed a bug where twilio-video.js failed to identify a WebSocket timeout in a
timely manner. Now, WebSocket timeouts can be identified in around 30 seconds.
If a WebSocket timeout occurs, for example, due to a WebSocket disconnect,
Room will emit a "disconnected" event with SignalingConnectionTimeoutError. - If an ICE failure occurs, for example due to disconnecting a VPN, but the
signaling connection remains online, twilio-video.js will attempt an ICE
restart to repair the media connection. (JSDK-1810)