livekit-client 1.8.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -7
- package/dist/livekit-client.esm.mjs +13550 -13342
- 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 +11 -10
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/connectionHelper/ConnectionCheck.d.ts +1 -1
- package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/Checker.d.ts +1 -1
- package/dist/src/connectionHelper/checks/Checker.d.ts.map +1 -1
- package/dist/src/index.d.ts +5 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/proto/livekit_models.d.ts +5 -0
- package/dist/src/proto/livekit_models.d.ts.map +1 -1
- package/dist/src/proto/livekit_rtc.d.ts +32 -0
- package/dist/src/proto/livekit_rtc.d.ts.map +1 -1
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +5 -3
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +20 -15
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +15 -0
- package/dist/src/room/events.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts +14 -2
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +4 -2
- package/dist/src/room/participant/Participant.d.ts.map +1 -1
- package/dist/src/room/participant/RemoteParticipant.d.ts +2 -2
- package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
- package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts +1 -1
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrackPublication.d.ts +1 -1
- package/dist/src/room/track/LocalTrackPublication.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteAudioTrack.d.ts +1 -1
- package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/create.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +7 -1
- package/dist/src/room/track/options.d.ts.map +1 -1
- package/dist/src/room/types.d.ts +1 -0
- package/dist/src/room/types.d.ts.map +1 -1
- package/dist/src/room/utils.d.ts +3 -0
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/ts4.2/src/api/SignalClient.d.ts +14 -10
- package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +1 -1
- package/dist/ts4.2/src/connectionHelper/checks/Checker.d.ts +1 -1
- package/dist/ts4.2/src/index.d.ts +6 -7
- package/dist/ts4.2/src/proto/livekit_models.d.ts +5 -0
- package/dist/ts4.2/src/proto/livekit_rtc.d.ts +32 -0
- package/dist/ts4.2/src/room/RTCEngine.d.ts +5 -3
- package/dist/ts4.2/src/room/Room.d.ts +20 -15
- package/dist/ts4.2/src/room/events.d.ts +15 -0
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +14 -2
- package/dist/ts4.2/src/room/participant/Participant.d.ts +4 -2
- package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +2 -2
- package/dist/ts4.2/src/room/track/LocalTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/LocalTrackPublication.d.ts +1 -1
- package/dist/ts4.2/src/room/track/RemoteAudioTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/options.d.ts +7 -0
- package/dist/ts4.2/src/room/types.d.ts +1 -0
- package/dist/ts4.2/src/room/utils.d.ts +3 -0
- package/package.json +4 -3
- package/src/api/SignalClient.ts +38 -26
- package/src/connectionHelper/ConnectionCheck.ts +1 -2
- package/src/connectionHelper/checks/Checker.ts +1 -1
- package/src/connectionHelper/checks/reconnect.ts +1 -1
- package/src/index.ts +8 -10
- package/src/proto/livekit_models.ts +15 -0
- package/src/room/PCTransport.ts +40 -1
- package/src/room/RTCEngine.ts +32 -11
- package/src/room/RegionUrlProvider.ts +1 -1
- package/src/room/Room.ts +114 -70
- package/src/room/events.ts +17 -0
- package/src/room/participant/LocalParticipant.ts +65 -11
- package/src/room/participant/Participant.ts +27 -3
- package/src/room/participant/RemoteParticipant.ts +6 -3
- package/src/room/participant/publishUtils.test.ts +1 -1
- package/src/room/participant/publishUtils.ts +14 -6
- package/src/room/track/LocalAudioTrack.ts +1 -1
- package/src/room/track/LocalTrack.ts +2 -2
- package/src/room/track/LocalTrackPublication.ts +1 -1
- package/src/room/track/LocalVideoTrack.ts +3 -3
- package/src/room/track/RemoteAudioTrack.ts +1 -1
- package/src/room/track/RemoteVideoTrack.test.ts +1 -1
- package/src/room/track/RemoteVideoTrack.ts +3 -3
- package/src/room/track/create.ts +2 -2
- package/src/room/track/options.ts +14 -1
- package/src/room/types.ts +11 -0
- package/src/room/utils.ts +18 -8
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteAudioTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteAudioTrack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,UAAU,CAAC;AAE9D,OAAO,
|
1
|
+
{"version":3,"file":"RemoteAudioTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteAudioTrack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,UAAU,CAAC;AAE9D,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,OAAO,CAAC,SAAS,CAAC,CAAqB;IAEvC,OAAO,CAAC,aAAa,CAAqB;IAE1C,OAAO,CAAC,YAAY,CAAC,CAAe;IAEpC,OAAO,CAAC,QAAQ,CAAC,CAAW;IAE5B,OAAO,CAAC,UAAU,CAAC,CAA6B;IAEhD,OAAO,CAAC,mBAAmB,CAAc;IAEzC,OAAO,CAAC,MAAM,CAAC,CAAS;gBAGtB,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,cAAc,EACzB,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,kBAAkB;IAUlC;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM;IAWxB;;OAEG;IACH,SAAS,IAAI,MAAM;IAanB;;;OAGG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM;IAahC,MAAM,IAAI,gBAAgB;IAC1B,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB;IAwBnD;;OAEG;IACH,MAAM,IAAI,gBAAgB,EAAE;IAE5B;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB;IAqBnD;;;OAGG;IACH,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,SAAS;IAStD;;;;OAIG;IACH,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE;IAOrC,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,kBAAkB;IAO1B,SAAS,CAAC,eAAe,sBAYvB;cAEc,gBAAgB,IAAI,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;CAyB5E"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/room/track/create.ts"],"names":[],"mappings":"AAIA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,eAAe,MAAM,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/room/track/create.ts"],"names":[],"mappings":"AAIA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EAEpB,MAAM,WAAW,CAAC;AAGnB;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CA2C5B;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,eAAe,CAAC,CAM1B;AAED,wBAAsB,qBAAqB,CACzC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,eAAe,CAAC,CAM1B;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAwC5B"}
|
@@ -122,6 +122,11 @@ export interface ScreenShareCaptureOptions {
|
|
122
122
|
surfaceSwitching?: 'include' | 'exclude';
|
123
123
|
/** specifies whether the browser should include the system audio among the possible audio sources offered to the user */
|
124
124
|
systemAudio?: 'include' | 'exclude';
|
125
|
+
/**
|
126
|
+
* Experimental option to control whether the audio playing in a tab will continue to be played out of a user's
|
127
|
+
* local speakers when the tab is captured.
|
128
|
+
*/
|
129
|
+
suppressLocalAudioPlayback?: boolean;
|
125
130
|
}
|
126
131
|
export interface AudioCaptureOptions {
|
127
132
|
/**
|
@@ -186,11 +191,12 @@ export declare class VideoPreset {
|
|
186
191
|
export interface AudioPreset {
|
187
192
|
maxBitrate: number;
|
188
193
|
}
|
189
|
-
declare const codecs: readonly ["vp8", "h264", "av1"];
|
194
|
+
declare const codecs: readonly ["vp8", "h264", "vp9", "av1"];
|
190
195
|
declare const backupCodecs: readonly ["vp8", "h264"];
|
191
196
|
export type VideoCodec = (typeof codecs)[number];
|
192
197
|
export type BackupVideoCodec = (typeof backupCodecs)[number];
|
193
198
|
export declare function isBackupCodec(codec: string): codec is BackupVideoCodec;
|
199
|
+
export declare function isCodecEqual(c1: string | undefined, c2: string | undefined): boolean;
|
194
200
|
/**
|
195
201
|
* scalability modes for svc, only supprot l3t3 now.
|
196
202
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/room/track/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;OAEG;IACH,WAAW,CAAC,EAAE;QAAE,KAAK,EAAE,gBAAgB,CAAC;QAAC,QAAQ,EAAE,aAAa,CAAA;KAAE,GAAG,KAAK,CAAC;IAE3E;;OAEG;IACH,mBAAmB,CAAC,EAAE,aAAa,CAAC;IAEpC;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAE1C;;;OAGG;IACH,0BAA0B,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAEhD;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D;;O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AE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IASpF,IAAI,UAAU,IAAI,eAAe,CAOhC;CACF;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,MAAM,wCAAyC,CAAC;AACtD,QAAA,MAAM,YAAY,0BAA2B,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CAEtE;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAKpF;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,yBAAiB,YAAY,CAAC;IACrB,MAAM,SAAS,EAAE,WAEvB,CAAC;IACK,MAAM,MAAM,EAAE,WAEpB,CAAC;IACK,MAAM,KAAK,EAAE,WAEnB,CAAC;IACK,MAAM,WAAW,EAAE,WAEzB,CAAC;IACK,MAAM,gBAAgB,EAAE,WAE9B,CAAC;IACK,MAAM,sBAAsB,EAAE,WAEpC,CAAC;CACH;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC"}
|
package/dist/src/room/types.d.ts
CHANGED
@@ -22,4 +22,5 @@ export type LiveKitReactNativeInfo = {
|
|
22
22
|
platform: 'ios' | 'android' | 'windows' | 'macos' | 'web' | 'native';
|
23
23
|
devicePixelRatio: number;
|
24
24
|
};
|
25
|
+
export type SimulationScenario = 'signal-reconnect' | 'speaker' | 'node-failure' | 'server-leave' | 'migration' | 'resume-reconnect' | 'force-tcp' | 'force-tls' | 'full-reconnect';
|
25
26
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/room/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wFAAwF;IACxF,WAAW,CAAC,EAAE,iBAAiB,EAAE,GAAG,MAAM,EAAE,CAAC;IAC7C,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IAEnC,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACrE,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/room/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wFAAwF;IACxF,WAAW,CAAC,EAAE,iBAAiB,EAAE,GAAG,MAAM,EAAE,CAAC;IAC7C,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IAEnC,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACrE,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,kBAAkB,GAClB,SAAS,GACT,cAAc,GACd,cAAc,GACd,WAAW,GACX,kBAAkB,GAClB,WAAW,GACX,WAAW,GACX,gBAAgB,CAAC"}
|
package/dist/src/room/utils.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ClientInfo } from '../proto/livekit_models';
|
2
2
|
import type LocalAudioTrack from './track/LocalAudioTrack';
|
3
3
|
import type RemoteAudioTrack from './track/RemoteAudioTrack';
|
4
|
+
export declare const ddExtensionURI = "https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension";
|
4
5
|
export declare function unpackStreamId(packed: string): string[];
|
5
6
|
export declare function sleep(duration: number): Promise<void>;
|
6
7
|
/** @internal */
|
@@ -10,6 +11,8 @@ export declare function supportsAddTrack(): boolean;
|
|
10
11
|
export declare function supportsAdaptiveStream(): boolean;
|
11
12
|
export declare function supportsDynacast(): boolean;
|
12
13
|
export declare function supportsAV1(): boolean;
|
14
|
+
export declare function supportsVP9(): boolean;
|
15
|
+
export declare function isSVCCodec(codec?: string): boolean;
|
13
16
|
export declare function supportsSetSinkId(elm?: HTMLMediaElement): boolean;
|
14
17
|
export declare function supportsSetCodecPreferences(transceiver: RTCRtpTransceiver): boolean;
|
15
18
|
export declare function isBrowserSupported(): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/room/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAkB,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,eAAe,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/room/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAkB,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,eAAe,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAK7D,eAAO,MAAM,cAAc,4FACgE,CAAC;AAE5F,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAMvD;AAED,wBAAsB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3D;AAED,gBAAgB;AAChB,wBAAgB,mBAAmB,YAElC;AAED,gBAAgB;AAChB,wBAAgB,gBAAgB,YAE/B;AAED,wBAAgB,sBAAsB,YAErC;AAED,wBAAgB,gBAAgB,YAE/B;AAED,wBAAgB,WAAW,IAAI,OAAO,CAYrC;AAED,wBAAgB,WAAW,IAAI,OAAO,CAYrC;AAED,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,wBAAgB,iBAAiB,CAAC,GAA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,EAAE,GAAG,KAAK,IAAI,CAAC;IAE1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;gBAGrB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,EAC1E,SAAS,CAAC,EAAE,MAAM,IAAI;CAWzB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,eAAe,GAAG,gBAAgB,EACzC,OAAO,CAAC,EAAE,oBAAoB;;;;EA+C/B;AAED,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAgB;IAEhC,OAAO,CAAC,MAAM,CAAS;;IAOvB,QAAQ;IAIR,IAAI,kBAGoB,IAAI;CAgB7B"}
|
@@ -64,17 +64,21 @@ export declare class SignalClient {
|
|
64
64
|
connect(url: string, token: string, opts: ConnectOpts, abortSignal?: AbortSignal): Promise<JoinResponse | ReconnectResponse | void>;
|
65
65
|
close(): Promise<void>;
|
66
66
|
sendOffer(offer: RTCSessionDescriptionInit): void;
|
67
|
-
sendAnswer(answer: RTCSessionDescriptionInit): void
|
68
|
-
sendIceCandidate(candidate: RTCIceCandidateInit, target: SignalTarget): void
|
69
|
-
sendMuteTrack(trackSid: string, muted: boolean): void
|
70
|
-
sendAddTrack(req: AddTrackRequest): void
|
67
|
+
sendAnswer(answer: RTCSessionDescriptionInit): Promise<void>;
|
68
|
+
sendIceCandidate(candidate: RTCIceCandidateInit, target: SignalTarget): Promise<void>;
|
69
|
+
sendMuteTrack(trackSid: string, muted: boolean): Promise<void>;
|
70
|
+
sendAddTrack(req: AddTrackRequest): Promise<void>;
|
71
|
+
sendUpdateLocalMetadata(metadata: string, name: string): Promise<void>;
|
71
72
|
sendUpdateTrackSettings(settings: UpdateTrackSettings): void;
|
72
|
-
sendUpdateSubscription(sub: UpdateSubscription): void
|
73
|
-
sendSyncState(sync: SyncState): void
|
74
|
-
sendUpdateVideoLayers(trackSid: string, layers: VideoLayer[]): void
|
75
|
-
sendUpdateSubscriptionPermissions(allParticipants: boolean, trackPermissions: TrackPermission[]): void
|
76
|
-
sendSimulateScenario(scenario: SimulateScenario): void
|
77
|
-
sendPing():
|
73
|
+
sendUpdateSubscription(sub: UpdateSubscription): Promise<void>;
|
74
|
+
sendSyncState(sync: SyncState): Promise<void>;
|
75
|
+
sendUpdateVideoLayers(trackSid: string, layers: VideoLayer[]): Promise<void>;
|
76
|
+
sendUpdateSubscriptionPermissions(allParticipants: boolean, trackPermissions: TrackPermission[]): Promise<void>;
|
77
|
+
sendSimulateScenario(scenario: SimulateScenario): Promise<void>;
|
78
|
+
sendPing(): Promise<[
|
79
|
+
void,
|
80
|
+
void
|
81
|
+
]>;
|
78
82
|
sendLeave(): Promise<void>;
|
79
83
|
sendRequest(message: SignalMessage, fromQueue?: boolean): Promise<void>;
|
80
84
|
private handleSignalResponse;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type TypedEmitter from 'typed-emitter';
|
2
|
-
import {
|
2
|
+
import { CheckInfo, CheckStatus, Checker, InstantiableCheck } from './checks/Checker';
|
3
3
|
export type { CheckInfo, CheckStatus };
|
4
4
|
declare const ConnectionCheck_base: new () => TypedEmitter<ConnectionCheckCallbacks>;
|
5
5
|
export declare class ConnectionCheck extends ConnectionCheck_base {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type TypedEmitter from 'typed-emitter';
|
2
2
|
import type { RoomConnectOptions, RoomOptions } from '../../options';
|
3
|
-
import Room from '../../room/Room';
|
4
3
|
import type RTCEngine from '../../room/RTCEngine';
|
4
|
+
import Room from '../../room/Room';
|
5
5
|
type LogMessage = {
|
6
6
|
level: 'info' | 'warning' | 'error';
|
7
7
|
message: string;
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import { LogLevel, setLogExtension, setLogLevel } from './logger';
|
2
2
|
import { DataPacket_Kind, DisconnectReason, VideoQuality } from './proto/livekit_models';
|
3
3
|
import DefaultReconnectPolicy from './room/DefaultReconnectPolicy';
|
4
|
+
import Room, { ConnectionState, RoomState } from './room/Room';
|
4
5
|
import LocalParticipant from './room/participant/LocalParticipant';
|
5
6
|
import Participant, { ConnectionQuality } from './room/participant/Participant';
|
6
7
|
import type { ParticipantTrackPermission } from './room/participant/ParticipantTrackPermission';
|
7
8
|
import RemoteParticipant from './room/participant/RemoteParticipant';
|
8
|
-
import
|
9
|
+
import CriticalTimers from './room/timers';
|
9
10
|
import LocalAudioTrack from './room/track/LocalAudioTrack';
|
10
11
|
import LocalTrack from './room/track/LocalTrack';
|
11
12
|
import LocalTrackPublication from './room/track/LocalTrackPublication';
|
@@ -13,17 +14,15 @@ import LocalVideoTrack from './room/track/LocalVideoTrack';
|
|
13
14
|
import RemoteAudioTrack from './room/track/RemoteAudioTrack';
|
14
15
|
import RemoteTrack from './room/track/RemoteTrack';
|
15
16
|
import RemoteTrackPublication from './room/track/RemoteTrackPublication';
|
16
|
-
import RemoteVideoTrack from './room/track/RemoteVideoTrack';
|
17
|
-
import type { ElementInfo } from './room/track/RemoteVideoTrack';
|
17
|
+
import type RemoteVideoTrack, { ElementInfo } from './room/track/RemoteVideoTrack';
|
18
18
|
import { TrackPublication } from './room/track/TrackPublication';
|
19
|
-
import CriticalTimers from './room/timers';
|
20
|
-
import { getEmptyAudioStreamTrack, getEmptyVideoStreamTrack, isBrowserSupported, supportsAdaptiveStream, supportsAV1, supportsDynacast, createAudioAnalyser } from './room/utils';
|
21
|
-
import type { AudioAnalyserOptions } from './room/utils';
|
22
19
|
import type { LiveKitReactNativeInfo } from './room/types';
|
20
|
+
import type { AudioAnalyserOptions } from './room/utils';
|
21
|
+
import { createAudioAnalyser, getEmptyAudioStreamTrack, getEmptyVideoStreamTrack, isBrowserSupported, supportsAV1, supportsAdaptiveStream, supportsDynacast } from './room/utils';
|
23
22
|
export * from './options';
|
24
23
|
export * from './room/errors';
|
25
24
|
export * from './room/events';
|
26
|
-
export type { DataPublishOptions } from './room/types';
|
25
|
+
export type { DataPublishOptions, SimulationScenario } from './room/types';
|
27
26
|
export * from './room/track/create';
|
28
27
|
export * from './room/track/options';
|
29
28
|
export * from './room/track/Track';
|
@@ -94,6 +94,7 @@ export interface Room {
|
|
94
94
|
enabledCodecs: Codec[];
|
95
95
|
metadata: string;
|
96
96
|
numParticipants: number;
|
97
|
+
numPublishers: number;
|
97
98
|
activeRecording: boolean;
|
98
99
|
}
|
99
100
|
export interface Codec {
|
@@ -374,6 +375,7 @@ export declare const Room: {
|
|
374
375
|
}[] | undefined;
|
375
376
|
metadata?: string | undefined;
|
376
377
|
numParticipants?: number | undefined;
|
378
|
+
numPublishers?: number | undefined;
|
377
379
|
activeRecording?: boolean | undefined;
|
378
380
|
} & {
|
379
381
|
sid?: string | undefined;
|
@@ -401,6 +403,7 @@ export declare const Room: {
|
|
401
403
|
}) | undefined;
|
402
404
|
metadata?: string | undefined;
|
403
405
|
numParticipants?: number | undefined;
|
406
|
+
numPublishers?: number | undefined;
|
404
407
|
activeRecording?: boolean | undefined;
|
405
408
|
} & {
|
406
409
|
[K_2 in Exclude<keyof I, keyof Room>]: never;
|
@@ -418,6 +421,7 @@ export declare const Room: {
|
|
418
421
|
}[] | undefined;
|
419
422
|
metadata?: string | undefined;
|
420
423
|
numParticipants?: number | undefined;
|
424
|
+
numPublishers?: number | undefined;
|
421
425
|
activeRecording?: boolean | undefined;
|
422
426
|
} & {
|
423
427
|
sid?: string | undefined;
|
@@ -445,6 +449,7 @@ export declare const Room: {
|
|
445
449
|
}) | undefined;
|
446
450
|
metadata?: string | undefined;
|
447
451
|
numParticipants?: number | undefined;
|
452
|
+
numPublishers?: number | undefined;
|
448
453
|
activeRecording?: boolean | undefined;
|
449
454
|
} & {
|
450
455
|
[K_5 in Exclude<keyof I_1, keyof Room>]: never;
|
@@ -2986,6 +2986,7 @@ export declare const SignalResponse: {
|
|
2986
2986
|
}[] | undefined;
|
2987
2987
|
metadata?: string | undefined;
|
2988
2988
|
numParticipants?: number | undefined;
|
2989
|
+
numPublishers?: number | undefined;
|
2989
2990
|
activeRecording?: boolean | undefined;
|
2990
2991
|
} | undefined;
|
2991
2992
|
participant?: {
|
@@ -3297,6 +3298,7 @@ export declare const SignalResponse: {
|
|
3297
3298
|
}[] | undefined;
|
3298
3299
|
metadata?: string | undefined;
|
3299
3300
|
numParticipants?: number | undefined;
|
3301
|
+
numPublishers?: number | undefined;
|
3300
3302
|
activeRecording?: boolean | undefined;
|
3301
3303
|
} | undefined;
|
3302
3304
|
} | undefined;
|
@@ -3411,6 +3413,7 @@ export declare const SignalResponse: {
|
|
3411
3413
|
}[] | undefined;
|
3412
3414
|
metadata?: string | undefined;
|
3413
3415
|
numParticipants?: number | undefined;
|
3416
|
+
numPublishers?: number | undefined;
|
3414
3417
|
activeRecording?: boolean | undefined;
|
3415
3418
|
} | undefined;
|
3416
3419
|
participant?: {
|
@@ -3576,6 +3579,7 @@ export declare const SignalResponse: {
|
|
3576
3579
|
}[] | undefined;
|
3577
3580
|
metadata?: string | undefined;
|
3578
3581
|
numParticipants?: number | undefined;
|
3582
|
+
numPublishers?: number | undefined;
|
3579
3583
|
activeRecording?: boolean | undefined;
|
3580
3584
|
} | undefined;
|
3581
3585
|
participant?: {
|
@@ -3737,6 +3741,7 @@ export declare const SignalResponse: {
|
|
3737
3741
|
}[] | undefined;
|
3738
3742
|
metadata?: string | undefined;
|
3739
3743
|
numParticipants?: number | undefined;
|
3744
|
+
numPublishers?: number | undefined;
|
3740
3745
|
activeRecording?: boolean | undefined;
|
3741
3746
|
} & {
|
3742
3747
|
sid?: string | undefined;
|
@@ -3764,6 +3769,7 @@ export declare const SignalResponse: {
|
|
3764
3769
|
}) | undefined;
|
3765
3770
|
metadata?: string | undefined;
|
3766
3771
|
numParticipants?: number | undefined;
|
3772
|
+
numPublishers?: number | undefined;
|
3767
3773
|
activeRecording?: boolean | undefined;
|
3768
3774
|
} & {
|
3769
3775
|
[K_2 in Exclude<keyof I["message"]["join"]["room"], keyof Room>]: never;
|
@@ -5554,6 +5560,7 @@ export declare const SignalResponse: {
|
|
5554
5560
|
}[] | undefined;
|
5555
5561
|
metadata?: string | undefined;
|
5556
5562
|
numParticipants?: number | undefined;
|
5563
|
+
numPublishers?: number | undefined;
|
5557
5564
|
activeRecording?: boolean | undefined;
|
5558
5565
|
} | undefined;
|
5559
5566
|
} | undefined;
|
@@ -5574,6 +5581,7 @@ export declare const SignalResponse: {
|
|
5574
5581
|
}[] | undefined;
|
5575
5582
|
metadata?: string | undefined;
|
5576
5583
|
numParticipants?: number | undefined;
|
5584
|
+
numPublishers?: number | undefined;
|
5577
5585
|
activeRecording?: boolean | undefined;
|
5578
5586
|
} | undefined;
|
5579
5587
|
} & {
|
@@ -5590,6 +5598,7 @@ export declare const SignalResponse: {
|
|
5590
5598
|
}[] | undefined;
|
5591
5599
|
metadata?: string | undefined;
|
5592
5600
|
numParticipants?: number | undefined;
|
5601
|
+
numPublishers?: number | undefined;
|
5593
5602
|
activeRecording?: boolean | undefined;
|
5594
5603
|
} & {
|
5595
5604
|
sid?: string | undefined;
|
@@ -5617,6 +5626,7 @@ export declare const SignalResponse: {
|
|
5617
5626
|
}) | undefined;
|
5618
5627
|
metadata?: string | undefined;
|
5619
5628
|
numParticipants?: number | undefined;
|
5629
|
+
numPublishers?: number | undefined;
|
5620
5630
|
activeRecording?: boolean | undefined;
|
5621
5631
|
} & {
|
5622
5632
|
[K_77 in Exclude<keyof I["message"]["roomUpdate"]["room"], keyof Room>]: never;
|
@@ -6053,6 +6063,7 @@ export declare const SignalResponse: {
|
|
6053
6063
|
}[] | undefined;
|
6054
6064
|
metadata?: string | undefined;
|
6055
6065
|
numParticipants?: number | undefined;
|
6066
|
+
numPublishers?: number | undefined;
|
6056
6067
|
activeRecording?: boolean | undefined;
|
6057
6068
|
} | undefined;
|
6058
6069
|
participant?: {
|
@@ -6364,6 +6375,7 @@ export declare const SignalResponse: {
|
|
6364
6375
|
}[] | undefined;
|
6365
6376
|
metadata?: string | undefined;
|
6366
6377
|
numParticipants?: number | undefined;
|
6378
|
+
numPublishers?: number | undefined;
|
6367
6379
|
activeRecording?: boolean | undefined;
|
6368
6380
|
} | undefined;
|
6369
6381
|
} | undefined;
|
@@ -6478,6 +6490,7 @@ export declare const SignalResponse: {
|
|
6478
6490
|
}[] | undefined;
|
6479
6491
|
metadata?: string | undefined;
|
6480
6492
|
numParticipants?: number | undefined;
|
6493
|
+
numPublishers?: number | undefined;
|
6481
6494
|
activeRecording?: boolean | undefined;
|
6482
6495
|
} | undefined;
|
6483
6496
|
participant?: {
|
@@ -6643,6 +6656,7 @@ export declare const SignalResponse: {
|
|
6643
6656
|
}[] | undefined;
|
6644
6657
|
metadata?: string | undefined;
|
6645
6658
|
numParticipants?: number | undefined;
|
6659
|
+
numPublishers?: number | undefined;
|
6646
6660
|
activeRecording?: boolean | undefined;
|
6647
6661
|
} | undefined;
|
6648
6662
|
participant?: {
|
@@ -6804,6 +6818,7 @@ export declare const SignalResponse: {
|
|
6804
6818
|
}[] | undefined;
|
6805
6819
|
metadata?: string | undefined;
|
6806
6820
|
numParticipants?: number | undefined;
|
6821
|
+
numPublishers?: number | undefined;
|
6807
6822
|
activeRecording?: boolean | undefined;
|
6808
6823
|
} & {
|
6809
6824
|
sid?: string | undefined;
|
@@ -6831,6 +6846,7 @@ export declare const SignalResponse: {
|
|
6831
6846
|
}) | undefined;
|
6832
6847
|
metadata?: string | undefined;
|
6833
6848
|
numParticipants?: number | undefined;
|
6849
|
+
numPublishers?: number | undefined;
|
6834
6850
|
activeRecording?: boolean | undefined;
|
6835
6851
|
} & {
|
6836
6852
|
[K_118 in Exclude<keyof I_1["message"]["join"]["room"], keyof Room>]: never;
|
@@ -8621,6 +8637,7 @@ export declare const SignalResponse: {
|
|
8621
8637
|
}[] | undefined;
|
8622
8638
|
metadata?: string | undefined;
|
8623
8639
|
numParticipants?: number | undefined;
|
8640
|
+
numPublishers?: number | undefined;
|
8624
8641
|
activeRecording?: boolean | undefined;
|
8625
8642
|
} | undefined;
|
8626
8643
|
} | undefined;
|
@@ -8641,6 +8658,7 @@ export declare const SignalResponse: {
|
|
8641
8658
|
}[] | undefined;
|
8642
8659
|
metadata?: string | undefined;
|
8643
8660
|
numParticipants?: number | undefined;
|
8661
|
+
numPublishers?: number | undefined;
|
8644
8662
|
activeRecording?: boolean | undefined;
|
8645
8663
|
} | undefined;
|
8646
8664
|
} & {
|
@@ -8657,6 +8675,7 @@ export declare const SignalResponse: {
|
|
8657
8675
|
}[] | undefined;
|
8658
8676
|
metadata?: string | undefined;
|
8659
8677
|
numParticipants?: number | undefined;
|
8678
|
+
numPublishers?: number | undefined;
|
8660
8679
|
activeRecording?: boolean | undefined;
|
8661
8680
|
} & {
|
8662
8681
|
sid?: string | undefined;
|
@@ -8684,6 +8703,7 @@ export declare const SignalResponse: {
|
|
8684
8703
|
}) | undefined;
|
8685
8704
|
metadata?: string | undefined;
|
8686
8705
|
numParticipants?: number | undefined;
|
8706
|
+
numPublishers?: number | undefined;
|
8687
8707
|
activeRecording?: boolean | undefined;
|
8688
8708
|
} & {
|
8689
8709
|
[K_193 in Exclude<keyof I_1["message"]["roomUpdate"]["room"], keyof Room>]: never;
|
@@ -9388,6 +9408,7 @@ export declare const JoinResponse: {
|
|
9388
9408
|
}[] | undefined;
|
9389
9409
|
metadata?: string | undefined;
|
9390
9410
|
numParticipants?: number | undefined;
|
9411
|
+
numPublishers?: number | undefined;
|
9391
9412
|
activeRecording?: boolean | undefined;
|
9392
9413
|
} | undefined;
|
9393
9414
|
participant?: {
|
@@ -9549,6 +9570,7 @@ export declare const JoinResponse: {
|
|
9549
9570
|
}[] | undefined;
|
9550
9571
|
metadata?: string | undefined;
|
9551
9572
|
numParticipants?: number | undefined;
|
9573
|
+
numPublishers?: number | undefined;
|
9552
9574
|
activeRecording?: boolean | undefined;
|
9553
9575
|
} & {
|
9554
9576
|
sid?: string | undefined;
|
@@ -9576,6 +9598,7 @@ export declare const JoinResponse: {
|
|
9576
9598
|
}) | undefined;
|
9577
9599
|
metadata?: string | undefined;
|
9578
9600
|
numParticipants?: number | undefined;
|
9601
|
+
numPublishers?: number | undefined;
|
9579
9602
|
activeRecording?: boolean | undefined;
|
9580
9603
|
} & {
|
9581
9604
|
[K_2 in Exclude<keyof I["room"], keyof Room>]: never;
|
@@ -10434,6 +10457,7 @@ export declare const JoinResponse: {
|
|
10434
10457
|
}[] | undefined;
|
10435
10458
|
metadata?: string | undefined;
|
10436
10459
|
numParticipants?: number | undefined;
|
10460
|
+
numPublishers?: number | undefined;
|
10437
10461
|
activeRecording?: boolean | undefined;
|
10438
10462
|
} | undefined;
|
10439
10463
|
participant?: {
|
@@ -10595,6 +10619,7 @@ export declare const JoinResponse: {
|
|
10595
10619
|
}[] | undefined;
|
10596
10620
|
metadata?: string | undefined;
|
10597
10621
|
numParticipants?: number | undefined;
|
10622
|
+
numPublishers?: number | undefined;
|
10598
10623
|
activeRecording?: boolean | undefined;
|
10599
10624
|
} & {
|
10600
10625
|
sid?: string | undefined;
|
@@ -10622,6 +10647,7 @@ export declare const JoinResponse: {
|
|
10622
10647
|
}) | undefined;
|
10623
10648
|
metadata?: string | undefined;
|
10624
10649
|
numParticipants?: number | undefined;
|
10650
|
+
numPublishers?: number | undefined;
|
10625
10651
|
activeRecording?: boolean | undefined;
|
10626
10652
|
} & {
|
10627
10653
|
[K_39 in Exclude<keyof I_1["room"], keyof Room>]: never;
|
@@ -13478,6 +13504,7 @@ export declare const RoomUpdate: {
|
|
13478
13504
|
}[] | undefined;
|
13479
13505
|
metadata?: string | undefined;
|
13480
13506
|
numParticipants?: number | undefined;
|
13507
|
+
numPublishers?: number | undefined;
|
13481
13508
|
activeRecording?: boolean | undefined;
|
13482
13509
|
} | undefined;
|
13483
13510
|
} & {
|
@@ -13494,6 +13521,7 @@ export declare const RoomUpdate: {
|
|
13494
13521
|
}[] | undefined;
|
13495
13522
|
metadata?: string | undefined;
|
13496
13523
|
numParticipants?: number | undefined;
|
13524
|
+
numPublishers?: number | undefined;
|
13497
13525
|
activeRecording?: boolean | undefined;
|
13498
13526
|
} & {
|
13499
13527
|
sid?: string | undefined;
|
@@ -13521,6 +13549,7 @@ export declare const RoomUpdate: {
|
|
13521
13549
|
}) | undefined;
|
13522
13550
|
metadata?: string | undefined;
|
13523
13551
|
numParticipants?: number | undefined;
|
13552
|
+
numPublishers?: number | undefined;
|
13524
13553
|
activeRecording?: boolean | undefined;
|
13525
13554
|
} & {
|
13526
13555
|
[K_2 in Exclude<keyof I["room"], keyof Room>]: never;
|
@@ -13542,6 +13571,7 @@ export declare const RoomUpdate: {
|
|
13542
13571
|
}[] | undefined;
|
13543
13572
|
metadata?: string | undefined;
|
13544
13573
|
numParticipants?: number | undefined;
|
13574
|
+
numPublishers?: number | undefined;
|
13545
13575
|
activeRecording?: boolean | undefined;
|
13546
13576
|
} | undefined;
|
13547
13577
|
} & {
|
@@ -13558,6 +13588,7 @@ export declare const RoomUpdate: {
|
|
13558
13588
|
}[] | undefined;
|
13559
13589
|
metadata?: string | undefined;
|
13560
13590
|
numParticipants?: number | undefined;
|
13591
|
+
numPublishers?: number | undefined;
|
13561
13592
|
activeRecording?: boolean | undefined;
|
13562
13593
|
} & {
|
13563
13594
|
sid?: string | undefined;
|
@@ -13585,6 +13616,7 @@ export declare const RoomUpdate: {
|
|
13585
13616
|
}) | undefined;
|
13586
13617
|
metadata?: string | undefined;
|
13587
13618
|
numParticipants?: number | undefined;
|
13619
|
+
numPublishers?: number | undefined;
|
13588
13620
|
activeRecording?: boolean | undefined;
|
13589
13621
|
} & {
|
13590
13622
|
[K_6 in Exclude<keyof I_1["room"], keyof Room>]: never;
|
@@ -17,6 +17,7 @@ export default class RTCEngine extends RTCEngine_base {
|
|
17
17
|
client: SignalClient;
|
18
18
|
rtcConfig: RTCConfiguration;
|
19
19
|
peerConnectionTimeout: number;
|
20
|
+
fullReconnectOnNext: boolean;
|
20
21
|
get isClosed(): boolean;
|
21
22
|
private lossyDC?;
|
22
23
|
private lossyDCSub?;
|
@@ -34,7 +35,6 @@ export default class RTCEngine extends RTCEngine_base {
|
|
34
35
|
private signalOpts?;
|
35
36
|
private reconnectAttempts;
|
36
37
|
private reconnectStart;
|
37
|
-
private fullReconnectOnNext;
|
38
38
|
private clientConfiguration?;
|
39
39
|
private attemptingReconnect;
|
40
40
|
private reconnectPolicy;
|
@@ -81,7 +81,8 @@ export default class RTCEngine extends RTCEngine_base {
|
|
81
81
|
private restartConnection;
|
82
82
|
private resumeConnection;
|
83
83
|
waitForPCInitialConnection(timeout?: number, abortController?: AbortController): Promise<void>;
|
84
|
-
waitForPCReconnected
|
84
|
+
private waitForPCReconnected;
|
85
|
+
waitForRestarted: () => Promise<void>;
|
85
86
|
sendDataPacket(packet: DataPacket, kind: DataPacket_Kind): Promise<void>;
|
86
87
|
private updateAndEmitDCBufferStatus;
|
87
88
|
private isBufferStatusLow;
|
@@ -106,8 +107,9 @@ export type EngineEventCallbacks = {
|
|
106
107
|
resuming: () => void;
|
107
108
|
resumed: () => void;
|
108
109
|
restarting: () => void;
|
109
|
-
restarted: (
|
110
|
+
restarted: () => void;
|
110
111
|
signalResumed: () => void;
|
112
|
+
signalRestarted: (joinResp: JoinResponse) => void;
|
111
113
|
closing: () => void;
|
112
114
|
mediaTrackAdded: (track: MediaStreamTrack, streams: MediaStream, receiver?: RTCRtpReceiver) => void;
|
113
115
|
activeSpeakersUpdate: (speakers: Array<SpeakerInfo>) => void;
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import type TypedEmitter from 'typed-emitter';
|
2
2
|
import type { InternalRoomOptions, RoomConnectOptions, RoomOptions } from '../options';
|
3
3
|
import { DataPacket_Kind, DisconnectReason, ParticipantPermission } from '../proto/livekit_models';
|
4
|
+
import RTCEngine from './RTCEngine';
|
4
5
|
import LocalParticipant from './participant/LocalParticipant';
|
5
6
|
import type Participant from './participant/Participant';
|
6
7
|
import type { ConnectionQuality } from './participant/Participant';
|
7
8
|
import RemoteParticipant from './participant/RemoteParticipant';
|
8
|
-
import RTCEngine from './RTCEngine';
|
9
9
|
import LocalTrackPublication from './track/LocalTrackPublication';
|
10
10
|
import type RemoteTrack from './track/RemoteTrack';
|
11
11
|
import RemoteTrackPublication from './track/RemoteTrackPublication';
|
12
12
|
import { Track } from './track/Track';
|
13
13
|
import type { TrackPublication } from './track/TrackPublication';
|
14
|
-
import type { SimulationOptions } from './types';
|
14
|
+
import type { SimulationOptions, SimulationScenario } from './types';
|
15
15
|
export declare enum ConnectionState {
|
16
16
|
Disconnected = "disconnected",
|
17
17
|
Connecting = "connecting",
|
@@ -40,17 +40,11 @@ declare class Room extends Room_base {
|
|
40
40
|
activeSpeakers: Participant[];
|
41
41
|
/** @internal */
|
42
42
|
engine: RTCEngine;
|
43
|
-
/** server assigned unique room id */
|
44
|
-
sid: string;
|
45
|
-
/** user assigned name, derived from JWT token */
|
46
|
-
name: string;
|
47
43
|
/** the current participant */
|
48
44
|
localParticipant: LocalParticipant;
|
49
|
-
/** room metadata */
|
50
|
-
metadata: string | undefined;
|
51
45
|
/** options of room */
|
52
46
|
options: InternalRoomOptions;
|
53
|
-
private
|
47
|
+
private roomInfo?;
|
54
48
|
private identityToSid;
|
55
49
|
/** connect options of room */
|
56
50
|
private connOptions?;
|
@@ -61,11 +55,24 @@ declare class Room extends Room_base {
|
|
61
55
|
/** future holding client initiated connection attempt */
|
62
56
|
private connectFuture?;
|
63
57
|
private disconnectLock;
|
58
|
+
private cachedParticipantSids;
|
64
59
|
/**
|
65
60
|
* Creates a new Room, the primary construct for a LiveKit session.
|
66
61
|
* @param options
|
67
62
|
*/
|
68
63
|
constructor(options?: RoomOptions);
|
64
|
+
/**
|
65
|
+
* if the current room has a participant with `recorder: true` in its JWT grant
|
66
|
+
**/
|
67
|
+
get isRecording(): boolean;
|
68
|
+
/** server assigned unique room id */
|
69
|
+
get sid(): string;
|
70
|
+
/** user assigned name, derived from JWT token */
|
71
|
+
get name(): string;
|
72
|
+
/** room metadata */
|
73
|
+
get metadata(): string | undefined;
|
74
|
+
get numParticipants(): number;
|
75
|
+
get numPublishers(): number;
|
69
76
|
private maybeCreateEngine;
|
70
77
|
/**
|
71
78
|
* getLocalDevices abstracts navigator.mediaDevices.enumerateDevices.
|
@@ -100,14 +107,10 @@ declare class Room extends Room_base {
|
|
100
107
|
*/
|
101
108
|
getParticipantByIdentity(identity: string): Participant | undefined;
|
102
109
|
private clearConnectionFutures;
|
103
|
-
/**
|
104
|
-
* if the current room has a participant with `recorder: true` in its JWT grant
|
105
|
-
**/
|
106
|
-
get isRecording(): boolean;
|
107
110
|
/**
|
108
111
|
* @internal for testing
|
109
112
|
*/
|
110
|
-
simulateScenario(scenario:
|
113
|
+
simulateScenario(scenario: SimulationScenario): Promise<void>;
|
111
114
|
private onPageLeave;
|
112
115
|
/**
|
113
116
|
* Browsers have different policies regarding audio playback. Most requiring
|
@@ -144,7 +147,7 @@ declare class Room extends Room_base {
|
|
144
147
|
private recreateEngine;
|
145
148
|
private onTrackAdded;
|
146
149
|
private handleRestarting;
|
147
|
-
private
|
150
|
+
private handleSignalRestarted;
|
148
151
|
private handleDisconnect;
|
149
152
|
private handleParticipantUpdates;
|
150
153
|
private handleParticipantDisconnected;
|
@@ -170,6 +173,7 @@ declare class Room extends Room_base {
|
|
170
173
|
private setAndEmitConnectionState;
|
171
174
|
private emitWhenConnected;
|
172
175
|
private onLocalParticipantMetadataChanged;
|
176
|
+
private onLocalParticipantNameChanged;
|
173
177
|
private onLocalTrackMuted;
|
174
178
|
private onLocalTrackUnmuted;
|
175
179
|
private onLocalTrackPublished;
|
@@ -208,6 +212,7 @@ export type RoomEventCallbacks = {
|
|
208
212
|
localTrackUnpublished: (publication: LocalTrackPublication, participant: LocalParticipant) => void;
|
209
213
|
localAudioSilenceDetected: (publication: LocalTrackPublication) => void;
|
210
214
|
participantMetadataChanged: (metadata: string | undefined, participant: RemoteParticipant | LocalParticipant) => void;
|
215
|
+
participantNameChanged: (name: string, participant: RemoteParticipant | LocalParticipant) => void;
|
211
216
|
participantPermissionsChanged: (prevPermissions: ParticipantPermission | undefined, participant: RemoteParticipant | LocalParticipant) => void;
|
212
217
|
activeSpeakersChanged: (speakers: Array<Participant>) => void;
|
213
218
|
roomMetadataChanged: (metadata: string) => void;
|