livekit-client 2.15.9 → 2.15.10
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/livekit-client.esm.mjs +15 -6
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/SignalClient.test.ts +93 -12
- package/src/api/SignalClient.ts +12 -2
- package/src/room/RTCEngine.ts +5 -1
- package/src/room/participant/LocalParticipant.ts +2 -2
|
@@ -12570,7 +12570,7 @@ function getOSVersion(ua) {
|
|
|
12570
12570
|
return ua.includes('mac os') ? getMatch(/\(.+?(\d+_\d+(:?_\d+)?)/, ua, 1).replace(/_/g, '.') : undefined;
|
|
12571
12571
|
}
|
|
12572
12572
|
|
|
12573
|
-
var version$1 = "2.15.
|
|
12573
|
+
var version$1 = "2.15.10";
|
|
12574
12574
|
|
|
12575
12575
|
const version = version$1;
|
|
12576
12576
|
const protocolVersion = 16;
|
|
@@ -14755,7 +14755,15 @@ class SignalClient {
|
|
|
14755
14755
|
const signals = abortSignal ? [timeoutAbortController.signal, abortSignal] : [timeoutAbortController.signal];
|
|
14756
14756
|
const combinedAbort = AbortSignal.any(signals);
|
|
14757
14757
|
const abortHandler = event => __awaiter(this, void 0, void 0, function* () {
|
|
14758
|
-
|
|
14758
|
+
// send leave if we have an active stream writer (connection is open)
|
|
14759
|
+
if (this.streamWriter) {
|
|
14760
|
+
this.sendLeave().then(() => this.close()).catch(e => {
|
|
14761
|
+
this.log.error(e);
|
|
14762
|
+
this.close();
|
|
14763
|
+
});
|
|
14764
|
+
} else {
|
|
14765
|
+
this.close();
|
|
14766
|
+
}
|
|
14759
14767
|
clearTimeout(wsTimeout);
|
|
14760
14768
|
const target = event.currentTarget;
|
|
14761
14769
|
reject(target instanceof AbortSignal ? target.reason : target);
|
|
@@ -14818,6 +14826,7 @@ class SignalClient {
|
|
|
14818
14826
|
return;
|
|
14819
14827
|
}
|
|
14820
14828
|
const signalReader = connection.readable.getReader();
|
|
14829
|
+
this.streamWriter = connection.writable.getWriter();
|
|
14821
14830
|
const firstMessage = yield signalReader.read();
|
|
14822
14831
|
signalReader.releaseLock();
|
|
14823
14832
|
if (!firstMessage.value) {
|
|
@@ -15286,7 +15295,6 @@ class SignalClient {
|
|
|
15286
15295
|
clearTimeout(timeoutHandle);
|
|
15287
15296
|
this.startPingInterval();
|
|
15288
15297
|
this.startReadingLoop(connection.readable.getReader(), firstMessage);
|
|
15289
|
-
this.streamWriter = connection.writable.getWriter();
|
|
15290
15298
|
}
|
|
15291
15299
|
/**
|
|
15292
15300
|
* Validates the first message received from the signal server
|
|
@@ -19763,7 +19771,8 @@ class RTCEngine extends eventsExports.EventEmitter {
|
|
|
19763
19771
|
return;
|
|
19764
19772
|
}
|
|
19765
19773
|
this.log.debug('received server answer', Object.assign(Object.assign({}, this.logContext), {
|
|
19766
|
-
RTCSdpType: sd.type
|
|
19774
|
+
RTCSdpType: sd.type,
|
|
19775
|
+
sdp: sd.sdp
|
|
19767
19776
|
}));
|
|
19768
19777
|
yield this.pcManager.setPublisherAnswer(sd, offerId);
|
|
19769
19778
|
});
|
|
@@ -24246,10 +24255,10 @@ class LocalParticipant extends Participant {
|
|
|
24246
24255
|
destinationIdentity,
|
|
24247
24256
|
method,
|
|
24248
24257
|
payload,
|
|
24249
|
-
responseTimeout =
|
|
24258
|
+
responseTimeout = 15000
|
|
24250
24259
|
} = _ref3;
|
|
24251
24260
|
return function* () {
|
|
24252
|
-
const maxRoundTripLatency =
|
|
24261
|
+
const maxRoundTripLatency = 7000;
|
|
24253
24262
|
return new Promise((resolve, reject) => __awaiter(_this5, void 0, void 0, function* () {
|
|
24254
24263
|
var _a, _b, _c, _d;
|
|
24255
24264
|
if (byteLength(payload) > MAX_PAYLOAD_BYTES) {
|