livekit-client 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +105 -42
- 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 +1 -0
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +1 -0
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +3 -0
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/ts4.2/src/api/SignalClient.d.ts +1 -0
- package/dist/ts4.2/src/room/RTCEngine.d.ts +1 -0
- package/dist/ts4.2/src/room/Room.d.ts +3 -0
- package/package.json +1 -1
- package/src/api/SignalClient.ts +15 -11
- package/src/room/RTCEngine.ts +34 -1
- package/src/room/Room.ts +87 -42
@@ -80,6 +80,7 @@ export declare class SignalClient {
|
|
80
80
|
sendRequest(message: SignalMessage, fromQueue?: boolean): Promise<void>;
|
81
81
|
private handleSignalResponse;
|
82
82
|
setReconnected(): void;
|
83
|
+
private handleOnClose;
|
83
84
|
private handleWSError;
|
84
85
|
/**
|
85
86
|
* Resets the ping timeout and starts a new timeout.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SignalClient.d.ts","sourceRoot":"","sources":["../../../src/api/SignalClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAGL,eAAe,EACf,eAAe,EACf,IAAI,EACJ,WAAW,EACX,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EAEb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,4BAA4B,EAC5B,SAAS,EACT,eAAe,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B,IAAI,CACR,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,aAAa,EACnB,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,YAAY,CAAC;IASlB,SAAS,CACb,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,GAAG,CAAC,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAkBpC,OAAO,CACL,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,WAAW,EACjB,WAAW,CAAC,EAAE,WAAW,GACxB,OAAO,CAAC,YAAY,GAAG,iBAAiB,GAAG,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"SignalClient.d.ts","sourceRoot":"","sources":["../../../src/api/SignalClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAGL,eAAe,EACf,eAAe,EACf,IAAI,EACJ,WAAW,EACX,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EAEb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,4BAA4B,EAC5B,SAAS,EACT,eAAe,EACf,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAM9B,UAAU,WAAW;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,eAAe;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,eAAe;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC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_base {
|
|
91
91
|
*/
|
92
92
|
ensureDataTransportConnected(kind: DataPacket_Kind, subscriber?: boolean): Promise<void>;
|
93
93
|
private ensurePublisherConnected;
|
94
|
+
verifyTransport(): boolean;
|
94
95
|
/** @internal */
|
95
96
|
negotiate(): Promise<void>;
|
96
97
|
dataChannelForKind(kind: DataPacket_Kind, sub?: boolean): RTCDataChannel | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RTCEngine.d.ts","sourceRoot":"","sources":["../../../src/room/RTCEngine.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAGL,UAAU,EACV,eAAe,EACf,gBAAgB,EAEhB,WAAW,EACX,SAAS,EACT,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EACf,YAAY,EAKb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,WAAyB,MAAM,eAAe,CAAC;AAatD,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,eAAe,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EAAE,mBAAmB,EAAc,MAAM,iBAAiB,CAAC;wCAyBL,kBAAkB,oBAAoB,CAAC;AADzG,gBAAgB;AAChB,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,cAAmE;IAgF5F,OAAO,CAAC,OAAO;IA/E3B,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB,UAAU,CAAC,EAAE,WAAW,CAAC;IAEzB,MAAM,EAAE,YAAY,CAAC;IAErB,SAAS,EAAE,gBAAgB,CAAM;IAEjC,qBAAqB,EAAE,MAAM,CAAmD;IAEhF,mBAAm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;IAKR,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,mBAAmB,CAMzB;IAEF,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,wBAAwB;CAKjC;AAsCD,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,CAAC,MAAM,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,CACf,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,oBAAoB,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC7D,kBAAkB,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5E,iBAAiB,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7E,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CACxE,CAAC"}
|
package/dist/src/room/Room.d.ts
CHANGED
@@ -56,6 +56,7 @@ declare class Room extends Room_base {
|
|
56
56
|
private connectFuture?;
|
57
57
|
private disconnectLock;
|
58
58
|
private cachedParticipantSids;
|
59
|
+
private connectionReconcileInterval?;
|
59
60
|
/**
|
60
61
|
* Creates a new Room, the primary construct for a LiveKit session.
|
61
62
|
* @param options
|
@@ -170,6 +171,8 @@ declare class Room extends Room_base {
|
|
170
171
|
* subscription settings.
|
171
172
|
*/
|
172
173
|
private updateSubscriptions;
|
174
|
+
private registerConnectionReconcile;
|
175
|
+
private clearConnectionReconcile;
|
173
176
|
private setAndEmitConnectionState;
|
174
177
|
private emitWhenConnected;
|
175
178
|
private onLocalParticipantMetadataChanged;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/room/Room.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAEV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,gBAAgB,EAGhB,qBAAqB,EAQtB,MAAM,yBAAyB,CAAC;AASjC,OAAO,SAAS,MAAM,aAAa,CAAC;AAWpC,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;
|
1
|
+
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/room/Room.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAEV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,gBAAgB,EAGhB,qBAAqB,EAQtB,MAAM,yBAAyB,CAAC;AASjC,OAAO,SAAS,MAAM,aAAa,CAAC;AAWpC,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,O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uBAAuB,EAAE,CACvB,WAAW,EAAE,sBAAsB,EACnC,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,WAAW,EAAE,iBAAiB,KAC3B,IAAI,CAAC;IACV,kCAAkC,EAAE,CAClC,WAAW,EAAE,sBAAsB,EACnC,MAAM,EAAE,gBAAgB,CAAC,gBAAgB,EACzC,WAAW,EAAE,iBAAiB,KAC3B,IAAI,CAAC;IACV,8BAA8B,EAAE,CAC9B,WAAW,EAAE,sBAAsB,EACnC,MAAM,EAAE,gBAAgB,CAAC,kBAAkB,EAC3C,WAAW,EAAE,iBAAiB,KAC3B,IAAI,CAAC;IACV,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,sBAAsB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACrD,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CACxE,CAAC"}
|
@@ -83,6 +83,7 @@ export declare class SignalClient {
|
|
83
83
|
sendRequest(message: SignalMessage, fromQueue?: boolean): Promise<void>;
|
84
84
|
private handleSignalResponse;
|
85
85
|
setReconnected(): void;
|
86
|
+
private handleOnClose;
|
86
87
|
private handleWSError;
|
87
88
|
/**
|
88
89
|
* Resets the ping timeout and starts a new timeout.
|
@@ -91,6 +91,7 @@ export default class RTCEngine extends RTCEngine_base {
|
|
91
91
|
*/
|
92
92
|
ensureDataTransportConnected(kind: DataPacket_Kind, subscriber?: boolean): Promise<void>;
|
93
93
|
private ensurePublisherConnected;
|
94
|
+
verifyTransport(): boolean;
|
94
95
|
/** @internal */
|
95
96
|
negotiate(): Promise<void>;
|
96
97
|
dataChannelForKind(kind: DataPacket_Kind, sub?: boolean): RTCDataChannel | undefined;
|
@@ -56,6 +56,7 @@ declare class Room extends Room_base {
|
|
56
56
|
private connectFuture?;
|
57
57
|
private disconnectLock;
|
58
58
|
private cachedParticipantSids;
|
59
|
+
private connectionReconcileInterval?;
|
59
60
|
/**
|
60
61
|
* Creates a new Room, the primary construct for a LiveKit session.
|
61
62
|
* @param options
|
@@ -170,6 +171,8 @@ declare class Room extends Room_base {
|
|
170
171
|
* subscription settings.
|
171
172
|
*/
|
172
173
|
private updateSubscriptions;
|
174
|
+
private registerConnectionReconcile;
|
175
|
+
private clearConnectionReconcile;
|
173
176
|
private setAndEmitConnectionState;
|
174
177
|
private emitWhenConnected;
|
175
178
|
private onLocalParticipantMetadataChanged;
|
package/package.json
CHANGED
package/src/api/SignalClient.ts
CHANGED
@@ -321,14 +321,7 @@ export class SignalClient {
|
|
321
321
|
};
|
322
322
|
|
323
323
|
this.ws.onclose = (ev: CloseEvent) => {
|
324
|
-
|
325
|
-
|
326
|
-
log.debug(`websocket connection closed: ${ev.reason}`);
|
327
|
-
this.isConnected = false;
|
328
|
-
if (this.onClose) {
|
329
|
-
this.onClose(ev.reason);
|
330
|
-
}
|
331
|
-
this.ws = undefined;
|
324
|
+
this.handleOnClose(ev.reason);
|
332
325
|
};
|
333
326
|
});
|
334
327
|
}
|
@@ -618,6 +611,19 @@ export class SignalClient {
|
|
618
611
|
this.isReconnecting = false;
|
619
612
|
}
|
620
613
|
|
614
|
+
private handleOnClose(reason: string) {
|
615
|
+
if (!this.isConnected) return;
|
616
|
+
this.clearPingInterval();
|
617
|
+
this.clearPingTimeout();
|
618
|
+
|
619
|
+
log.debug(`websocket connection closed: ${reason}`);
|
620
|
+
this.isConnected = false;
|
621
|
+
if (this.onClose) {
|
622
|
+
this.onClose(reason);
|
623
|
+
}
|
624
|
+
this.ws = undefined;
|
625
|
+
}
|
626
|
+
|
621
627
|
private handleWSError(ev: Event) {
|
622
628
|
log.error('websocket error', ev);
|
623
629
|
}
|
@@ -638,9 +644,7 @@ export class SignalClient {
|
|
638
644
|
Date.now() - this.pingTimeoutDuration! * 1000,
|
639
645
|
).toUTCString()}`,
|
640
646
|
);
|
641
|
-
|
642
|
-
this.onClose('ping timeout');
|
643
|
-
}
|
647
|
+
this.handleOnClose('ping timeout');
|
644
648
|
}, this.pingTimeoutDuration * 1000);
|
645
649
|
}
|
646
650
|
|
package/src/room/RTCEngine.ts
CHANGED
@@ -821,7 +821,7 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
821
821
|
}ms. giving up`,
|
822
822
|
);
|
823
823
|
this.emit(EngineEvent.Disconnected);
|
824
|
-
this.close();
|
824
|
+
await this.close();
|
825
825
|
}
|
826
826
|
} finally {
|
827
827
|
this.attemptingReconnect = false;
|
@@ -1120,6 +1120,39 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
|
|
1120
1120
|
await this.ensureDataTransportConnected(kind, false);
|
1121
1121
|
}
|
1122
1122
|
|
1123
|
+
/* @internal */
|
1124
|
+
verifyTransport(): boolean {
|
1125
|
+
// primary connection
|
1126
|
+
if (!this.primaryPC) {
|
1127
|
+
return false;
|
1128
|
+
}
|
1129
|
+
if (
|
1130
|
+
this.primaryPC.connectionState === 'closed' ||
|
1131
|
+
this.primaryPC.connectionState === 'failed'
|
1132
|
+
) {
|
1133
|
+
return false;
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
// also verify publisher connection if it's needed or different
|
1137
|
+
if (this.hasPublished && this.subscriberPrimary) {
|
1138
|
+
if (!this.publisher) {
|
1139
|
+
return false;
|
1140
|
+
}
|
1141
|
+
if (
|
1142
|
+
this.publisher.pc.connectionState === 'closed' ||
|
1143
|
+
this.publisher.pc.connectionState === 'failed'
|
1144
|
+
) {
|
1145
|
+
return false;
|
1146
|
+
}
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
// ensure signal is connected
|
1150
|
+
if (!this.client.ws || this.client.ws.readyState === WebSocket.CLOSED) {
|
1151
|
+
return false;
|
1152
|
+
}
|
1153
|
+
return true;
|
1154
|
+
}
|
1155
|
+
|
1123
1156
|
/** @internal */
|
1124
1157
|
negotiate(): Promise<void> {
|
1125
1158
|
// observe signal state
|
package/src/room/Room.ts
CHANGED
@@ -45,6 +45,7 @@ import LocalParticipant from './participant/LocalParticipant';
|
|
45
45
|
import type Participant from './participant/Participant';
|
46
46
|
import type { ConnectionQuality } from './participant/Participant';
|
47
47
|
import RemoteParticipant from './participant/RemoteParticipant';
|
48
|
+
import CriticalTimers from './timers';
|
48
49
|
import LocalAudioTrack from './track/LocalAudioTrack';
|
49
50
|
import LocalTrackPublication from './track/LocalTrackPublication';
|
50
51
|
import LocalVideoTrack from './track/LocalVideoTrack';
|
@@ -73,6 +74,8 @@ export enum ConnectionState {
|
|
73
74
|
Reconnecting = 'reconnecting',
|
74
75
|
}
|
75
76
|
|
77
|
+
const connectionReconcileFrequency = 2 * 1000;
|
78
|
+
|
76
79
|
/** @deprecated RoomState has been renamed to [[ConnectionState]] */
|
77
80
|
export const RoomState = ConnectionState;
|
78
81
|
|
@@ -126,6 +129,8 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
126
129
|
|
127
130
|
private cachedParticipantSids: Array<string>;
|
128
131
|
|
132
|
+
private connectionReconcileInterval?: ReturnType<typeof setInterval>;
|
133
|
+
|
129
134
|
/**
|
130
135
|
* Creates a new Room, the primary construct for a LiveKit session.
|
131
136
|
* @param options
|
@@ -189,7 +194,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
189
194
|
}
|
190
195
|
|
191
196
|
private maybeCreateEngine() {
|
192
|
-
if (this.engine) {
|
197
|
+
if (this.engine && !this.engine.isClosed) {
|
193
198
|
return;
|
194
199
|
}
|
195
200
|
|
@@ -215,6 +220,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
215
220
|
.on(EngineEvent.ActiveSpeakersUpdate, this.handleActiveSpeakersUpdate)
|
216
221
|
.on(EngineEvent.DataPacketReceived, this.handleDataPacket)
|
217
222
|
.on(EngineEvent.Resuming, () => {
|
223
|
+
this.clearConnectionReconcile();
|
218
224
|
if (this.setAndEmitConnectionState(ConnectionState.Reconnecting)) {
|
219
225
|
this.emit(RoomEvent.Reconnecting);
|
220
226
|
}
|
@@ -223,6 +229,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
223
229
|
.on(EngineEvent.Resumed, () => {
|
224
230
|
this.setAndEmitConnectionState(ConnectionState.Connected);
|
225
231
|
this.emit(RoomEvent.Reconnected);
|
232
|
+
this.registerConnectionReconcile();
|
226
233
|
this.updateSubscriptions();
|
227
234
|
|
228
235
|
// once reconnected, figure out if any participants connected during reconnect and emit events for it
|
@@ -488,6 +495,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
488
495
|
}
|
489
496
|
this.setAndEmitConnectionState(ConnectionState.Connected);
|
490
497
|
this.emit(RoomEvent.Connected);
|
498
|
+
this.registerConnectionReconcile();
|
491
499
|
};
|
492
500
|
|
493
501
|
/**
|
@@ -829,6 +837,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
829
837
|
}
|
830
838
|
|
831
839
|
private handleRestarting = () => {
|
840
|
+
this.clearConnectionReconcile();
|
832
841
|
// also unwind existing participants & existing subscriptions
|
833
842
|
for (const p of this.participants.values()) {
|
834
843
|
this.handleParticipantDisconnected(p.sid, p);
|
@@ -894,6 +903,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
894
903
|
}
|
895
904
|
this.setAndEmitConnectionState(ConnectionState.Connected);
|
896
905
|
this.emit(RoomEvent.Reconnected);
|
906
|
+
this.registerConnectionReconcile();
|
897
907
|
|
898
908
|
// emit participant connected events after connection has been re-established
|
899
909
|
this.participants.forEach((participant) => {
|
@@ -902,57 +912,61 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
902
912
|
};
|
903
913
|
|
904
914
|
private handleDisconnect(shouldStopTracks = true, reason?: DisconnectReason) {
|
915
|
+
this.clearConnectionReconcile();
|
905
916
|
if (this.state === ConnectionState.Disconnected) {
|
906
917
|
return;
|
907
918
|
}
|
908
919
|
|
909
|
-
|
910
|
-
|
911
|
-
p.
|
920
|
+
try {
|
921
|
+
this.participants.forEach((p) => {
|
922
|
+
p.tracks.forEach((pub) => {
|
923
|
+
p.unpublishTrack(pub.trackSid);
|
924
|
+
});
|
912
925
|
});
|
913
|
-
});
|
914
926
|
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
927
|
+
this.localParticipant.tracks.forEach((pub) => {
|
928
|
+
if (pub.track) {
|
929
|
+
this.localParticipant.unpublishTrack(pub.track, shouldStopTracks);
|
930
|
+
}
|
931
|
+
if (shouldStopTracks) {
|
932
|
+
pub.track?.detach();
|
933
|
+
pub.track?.stop();
|
934
|
+
}
|
935
|
+
});
|
924
936
|
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
937
|
+
this.localParticipant
|
938
|
+
.off(ParticipantEvent.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged)
|
939
|
+
.off(ParticipantEvent.ParticipantNameChanged, this.onLocalParticipantNameChanged)
|
940
|
+
.off(ParticipantEvent.TrackMuted, this.onLocalTrackMuted)
|
941
|
+
.off(ParticipantEvent.TrackUnmuted, this.onLocalTrackUnmuted)
|
942
|
+
.off(ParticipantEvent.LocalTrackPublished, this.onLocalTrackPublished)
|
943
|
+
.off(ParticipantEvent.LocalTrackUnpublished, this.onLocalTrackUnpublished)
|
944
|
+
.off(ParticipantEvent.ConnectionQualityChanged, this.onLocalConnectionQualityChanged)
|
945
|
+
.off(ParticipantEvent.MediaDevicesError, this.onMediaDevicesError)
|
946
|
+
.off(
|
947
|
+
ParticipantEvent.ParticipantPermissionsChanged,
|
948
|
+
this.onLocalParticipantPermissionsChanged,
|
949
|
+
);
|
938
950
|
|
939
|
-
|
940
|
-
|
941
|
-
|
951
|
+
this.localParticipant.tracks.clear();
|
952
|
+
this.localParticipant.videoTracks.clear();
|
953
|
+
this.localParticipant.audioTracks.clear();
|
942
954
|
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
955
|
+
this.participants.clear();
|
956
|
+
this.activeSpeakers = [];
|
957
|
+
if (this.audioContext && typeof this.options.expWebAudioMix === 'boolean') {
|
958
|
+
this.audioContext.close();
|
959
|
+
this.audioContext = undefined;
|
960
|
+
}
|
961
|
+
if (isWeb()) {
|
962
|
+
window.removeEventListener('beforeunload', this.onPageLeave);
|
963
|
+
window.removeEventListener('pagehide', this.onPageLeave);
|
964
|
+
navigator.mediaDevices?.removeEventListener('devicechange', this.handleDeviceChange);
|
965
|
+
}
|
966
|
+
} finally {
|
967
|
+
this.setAndEmitConnectionState(ConnectionState.Disconnected);
|
968
|
+
this.emit(RoomEvent.Disconnected, reason);
|
953
969
|
}
|
954
|
-
this.setAndEmitConnectionState(ConnectionState.Disconnected);
|
955
|
-
this.emit(RoomEvent.Disconnected, reason);
|
956
970
|
}
|
957
971
|
|
958
972
|
private handleParticipantUpdates = (participantInfos: ParticipantInfo[]) => {
|
@@ -1341,6 +1355,37 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
1341
1355
|
}
|
1342
1356
|
}
|
1343
1357
|
|
1358
|
+
private registerConnectionReconcile() {
|
1359
|
+
this.clearConnectionReconcile();
|
1360
|
+
let consecutiveFailures = 0;
|
1361
|
+
this.connectionReconcileInterval = CriticalTimers.setInterval(() => {
|
1362
|
+
if (
|
1363
|
+
// ensure we didn't tear it down
|
1364
|
+
!this.engine ||
|
1365
|
+
// engine detected close, but Room missed it
|
1366
|
+
this.engine.isClosed ||
|
1367
|
+
// transports failed without notifying engine
|
1368
|
+
!this.engine.verifyTransport()
|
1369
|
+
) {
|
1370
|
+
consecutiveFailures++;
|
1371
|
+
log.warn('detected connection state mismatch', { numFailures: consecutiveFailures });
|
1372
|
+
if (consecutiveFailures >= 3)
|
1373
|
+
this.handleDisconnect(
|
1374
|
+
this.options.stopLocalTrackOnUnpublish,
|
1375
|
+
DisconnectReason.UNKNOWN_REASON,
|
1376
|
+
);
|
1377
|
+
} else {
|
1378
|
+
consecutiveFailures = 0;
|
1379
|
+
}
|
1380
|
+
}, connectionReconcileFrequency);
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
private clearConnectionReconcile() {
|
1384
|
+
if (this.connectionReconcileInterval) {
|
1385
|
+
CriticalTimers.clearInterval(this.connectionReconcileInterval);
|
1386
|
+
}
|
1387
|
+
}
|
1388
|
+
|
1344
1389
|
private setAndEmitConnectionState(state: ConnectionState): boolean {
|
1345
1390
|
if (state === this.state) {
|
1346
1391
|
// unchanged
|