1.13.0
manjeshbhargav
released this
30 Jul 21:55
·
190 commits
to support-1.x
since this release
1.13.0 (July 30, 2018)
New Features
-
When the Room is completed via the REST API, the Room emits a "disconnected"
event with a TwilioError 53188, "Room completed". Previously, there was no way
to distinguish this case from callingdisconnect
on the Room (JSDK-1884). In
some applications, this will be expected, so you should set an event listener
on the Room as follows:room.once('disconnected', (room, error) => { if (!error) { console.log('You disconnected from the Room by calling `disconnect`'); return; } switch (error.code) { case 53118: console.log('The Room was completed server-side'); break; // Handle any other errors of interest. default: console.error(`You were disconnected: ${error.message}`); break; } });