@webex/web-client-media-engine 3.33.0 → 3.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +13 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +13 -5
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -15469,21 +15469,24 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15469
15469
|
}
|
|
15470
15470
|
waitForIceGatheringComplete() {
|
|
15471
15471
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
15472
|
-
return new Promise((resolve) => {
|
|
15472
|
+
return new Promise((resolve, reject) => {
|
|
15473
|
+
const finalizeIceCandidatesGathering = () => this.pc.getIceCandidates().length > 0
|
|
15474
|
+
? resolve()
|
|
15475
|
+
: reject(new Error('No ICE candidates gathered.'));
|
|
15473
15476
|
if (this.pc.iceGatheringState === 'complete') {
|
|
15474
|
-
|
|
15477
|
+
finalizeIceCandidatesGathering();
|
|
15475
15478
|
}
|
|
15476
15479
|
else {
|
|
15477
15480
|
this.pc.on(PeerConnection.Events.IceCandidate, (candidate) => {
|
|
15478
15481
|
if (candidate.candidate === null ||
|
|
15479
15482
|
(this.options.stopIceGatheringAfterFirstRelayCandidate &&
|
|
15480
15483
|
candidate.candidate.type === 'relay')) {
|
|
15481
|
-
|
|
15484
|
+
finalizeIceCandidatesGathering();
|
|
15482
15485
|
}
|
|
15483
15486
|
});
|
|
15484
15487
|
this.pc.on(PeerConnection.Events.IceGatheringStateChange, () => {
|
|
15485
15488
|
if (this.pc.iceGatheringState === 'complete') {
|
|
15486
|
-
|
|
15489
|
+
finalizeIceCandidatesGathering();
|
|
15487
15490
|
}
|
|
15488
15491
|
});
|
|
15489
15492
|
}
|
|
@@ -15520,7 +15523,12 @@ SCTP Max Message Size: ${maxMessageSize}`);
|
|
|
15520
15523
|
logErrorAndThrow(WcmeErrorType.CREATE_OFFER_FAILED, `Error: ${error}. SDP: ${maskIp((_a = offer.sdp) !== null && _a !== void 0 ? _a : '')}`);
|
|
15521
15524
|
});
|
|
15522
15525
|
if (this.options.doFullIce) {
|
|
15523
|
-
|
|
15526
|
+
try {
|
|
15527
|
+
yield this.waitForIceGatheringComplete();
|
|
15528
|
+
}
|
|
15529
|
+
catch (error) {
|
|
15530
|
+
logErrorAndThrow(WcmeErrorType.CREATE_OFFER_FAILED, `${error}`);
|
|
15531
|
+
}
|
|
15524
15532
|
}
|
|
15525
15533
|
const sdpToSend = this.prepareLocalOfferForRemoteServer((_a = this.pc.getLocalDescription()) === null || _a === void 0 ? void 0 : _a.sdp);
|
|
15526
15534
|
createOfferResolve({ type: 'offer', sdp: sdpToSend });
|