Skip to content

Commit

Permalink
2.20.0 Release - preflight GA and plan-b removal (#1703)
Browse files Browse the repository at this point in the history
* Merge Preflight and PlanB removal feature branch (#1702)

* VIDEO-7728 | Better Preflight Errors (#1689)

* Adding better errors on preflight

* lint

* Update docs

* Changelog

* Update docs

* Convert error to string

* Adding timestamp to progress events

* Properly raising signaling errors

* lint

* Update tests

* Mak's feedback

* Update test

* Feature/remove plan b (#1697)

* VIDEO-6587 | Remove Plan B in SDK (#1656)

* Initial implementation.

* Fixing integration tests

* Updating unit tests

* Adding back unit test job

* Removing unneeded case

* Fix build

* Adding rename suggestion

Co-authored-by: Manjesh Malavalli <[email protected]>

* Adding changelog

* Update CHANGELOG.md

Co-authored-by: Manjesh Malavalli <[email protected]>

* Adding ticket number

Co-authored-by: Manjesh Malavalli <[email protected]>
Co-authored-by: Manjesh Malavalli <[email protected]>

* Move changelog to 2.20.0 section

* 2.20.0-rc1

* 2.20.0-dev

Co-authored-by: Manjesh Malavalli <[email protected]>
Co-authored-by: Manjesh Malavalli <[email protected]>
Co-authored-by: twilio-ci <[email protected]>

* Fix unit test from merge

* 2.20.0-rc2

* 2.20.0-dev

* Update doc

* Update changelog

Co-authored-by: Manjesh Malavalli <[email protected]>
Co-authored-by: Manjesh Malavalli <[email protected]>
Co-authored-by: twilio-ci <[email protected]>

* Prep for release

Co-authored-by: Manjesh Malavalli <[email protected]>
Co-authored-by: Manjesh Malavalli <[email protected]>
Co-authored-by: twilio-ci <[email protected]>
  • Loading branch information
4 people authored Feb 10, 2022
1 parent 759d8c0 commit ed0bd5f
Show file tree
Hide file tree
Showing 27 changed files with 441 additions and 1,207 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ test/lib/sdkdriver/test/integration/browser/index.js
npm-debug.log
package-lock.json
test.json
nodemon.json
yarn.lock
.env
.idea
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,37 @@ The Twilio Programmable Video SDKs use [Semantic Versioning](http://www.semver.o

**Version 1.x reached End of Life on September 8th, 2021.** See the changelog entry [here](https://www.twilio.com/changelog/end-of-life-complete-for-unsupported-versions-of-the-programmable-video-sdk). Support for the 1.x version ended on December 4th, 2020.

2.20.0 (February 10, 2022)
==========================

Changes
-------

The Preflight API ([runPreflight](https://sdk.twilio.com/js/video/releases/2.20.0/docs/module-twilio-video.html#.runPreflight__anchor)), originally released in [2.16.0](#2160-august-11-2021), has been promoted to GA.

Thank you @morninng @eroidaaruqaj [#1622](https://github.com/twilio/twilio-video.js/issues/1622) for your feedback. Based on this feedback, we have made the following changes to `runPreflight`. (VIDEO-7728)

- The [failed](https://sdk.twilio.com/js/video/releases/2.20.0/docs/PreflightTest.html#event:failed) event now provides a [PreflightTestReport](https://sdk.twilio.com/js/video/releases/2.20.0/docs/global.html#PreflightTestReport) which include partial results gathered during the test. Use this in addition to the error object to get more insights on the failure.

- Signaling and Media Connection errors are now properly surfaced via the [failed](https://sdk.twilio.com/js/video/releases/2.20.0/docs/PreflightTest.html#event:failed) event.

- [PreflightTestReport](https://sdk.twilio.com/js/video/releases/2.20.0/docs/global.html#PreflightTestReport) now includes a `progressEvents` property. This new property is an array of [PreflightProgress](https://sdk.twilio.com/js/video/releases/2.20.0/docs/global.html#PreflightProgress) events detected during the test. Use this information to determine which steps were completed and which ones were not.

You can learn more about `runPreflight` usage in the documentation, [here](twilio.com/docs/video/troubleshooting/preflight-api).

Other changes in this release includes:

- In [October 2019](#200-beta15-october-24-2019), twilio-video.js started using Unified Plan where available, while also maintaining support for earlier browser versions with Plan B as the default SDP format. With this release, twilio-video.js will now stop supporting the Plan B SDP format and will only support the Unified Plan SDP format. Please refer to this [changelog](#200-beta15-october-24-2019) and this [public advisory](https://support.twilio.com/hc/en-us/articles/360039098974-Upcoming-Breaking-Changes-in-Twilio-Video-JavaScript-SDK-Google-Chrome) for more related information. (VIDEO-6587)

2.19.1 (February 7, 2022)
=========================

Bug Fixes
---------

- Fixed a bug where media connection was not getting reconnected after a network interruption if participant was not subscribed to any tracks. (VIDEO-8315)
- Fixed a bug where network quality score stops updating after network glitches. (VIDEO-8413)


2.19.0 (January 31, 2022)
=========================

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Releases of twilio-video.js are hosted on a CDN, and you can include these
directly in your web app using a &lt;script&gt; tag.

```html
<script src="//sdk.twilio.com/js/video/releases/2.19.1/twilio-video.min.js"></script>
<script src="//sdk.twilio.com/js/video/releases/2.20.0/twilio-video.min.js"></script>

```

Expand Down
27 changes: 18 additions & 9 deletions lib/preflight/getturncredentials.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-disable camelcase */
const TwilioConnection = require('../twilioconnection.js');
const { ICE_VERSION } = require('../util/constants');
const { createTwilioError, SignalingConnectionError } = require('../util/twilio-video-errors');

import { RTCIceServer, RTCStats } from './rtctypes';
import { EventEmitter } from 'events';
Expand All @@ -23,21 +25,28 @@ export function getTurnCredentials(token: string, wsServer: string): Promise<RTC

const twilioConnection = new TwilioConnection(wsServer, connectionOptions);
let done = false;
twilioConnection.once('close', (reason: string) => {
twilioConnection.once('close', () => {
if (!done) {
done = true;
reject(reason);
reject(new SignalingConnectionError());
}
});

// eslint-disable-next-line camelcase
twilioConnection.on('message', (message: { type: string; ice_servers: RTCIceServer[]; }) => {
if (message.type === 'iced') {
if (!done) {
done = true;
resolve(message.ice_servers);
twilioConnection.close();
twilioConnection.on('message', (messageData: {
code: number;
message: string;
ice_servers: RTCIceServer[];
type: string;
}) => {
const { code, message, ice_servers, type } = messageData;
if ((type === 'iced' || type === 'error') && !done) {
done = true;
if (type === 'iced') {
resolve(ice_servers);
} else {
reject(createTwilioError(code, message));
}
twilioConnection.close();
}
});
});
Expand Down
Loading

0 comments on commit ed0bd5f

Please sign in to comment.