livekit-client 1.12.3 → 1.13.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.e2ee.worker.js +1 -1
- package/dist/livekit-client.e2ee.worker.js.map +1 -1
- package/dist/livekit-client.e2ee.worker.mjs +198 -107
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +515 -192
- 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 +2 -5
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/turn.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/webrtc.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/websocket.d.ts.map +1 -1
- package/dist/src/e2ee/E2eeManager.d.ts +9 -3
- package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
- package/dist/src/e2ee/KeyProvider.d.ts +10 -7
- package/dist/src/e2ee/KeyProvider.d.ts.map +1 -1
- package/dist/src/e2ee/constants.d.ts +2 -0
- package/dist/src/e2ee/constants.d.ts.map +1 -1
- package/dist/src/e2ee/events.d.ts +34 -0
- package/dist/src/e2ee/events.d.ts.map +1 -0
- package/dist/src/e2ee/index.d.ts +1 -0
- package/dist/src/e2ee/index.d.ts.map +1 -1
- package/dist/src/e2ee/types.d.ts +23 -33
- package/dist/src/e2ee/types.d.ts.map +1 -1
- package/dist/src/e2ee/utils.d.ts +1 -0
- package/dist/src/e2ee/utils.d.ts.map +1 -1
- package/dist/src/e2ee/worker/FrameCryptor.d.ts +18 -13
- package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
- package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts +6 -8
- package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -1
- package/dist/src/e2ee/worker/SifGuard.d.ts +11 -0
- package/dist/src/e2ee/worker/SifGuard.d.ts.map +1 -0
- package/dist/src/options.d.ts +5 -0
- package/dist/src/options.d.ts.map +1 -1
- package/dist/src/proto/livekit_models_pb.d.ts.map +1 -1
- package/dist/src/proto/livekit_rtc_pb.d.ts.map +1 -1
- package/dist/src/room/DeviceManager.d.ts +1 -0
- package/dist/src/room/DeviceManager.d.ts.map +1 -1
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +1 -1
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/defaults.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts +1 -0
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +5 -0
- package/dist/src/room/participant/Participant.d.ts.map +1 -1
- package/dist/src/room/participant/RemoteParticipant.d.ts +0 -5
- package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
- package/dist/src/room/timers.d.ts +2 -2
- package/dist/src/room/timers.d.ts.map +1 -1
- package/dist/src/room/track/LocalAudioTrack.d.ts +9 -1
- package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts +3 -3
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts +6 -0
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/processor/types.d.ts +14 -2
- package/dist/src/room/track/processor/types.d.ts.map +1 -1
- package/dist/src/room/types.d.ts +1 -1
- package/dist/src/room/types.d.ts.map +1 -1
- package/dist/ts4.2/src/api/SignalClient.d.ts +2 -5
- package/dist/ts4.2/src/e2ee/E2eeManager.d.ts +9 -3
- package/dist/ts4.2/src/e2ee/KeyProvider.d.ts +10 -7
- package/dist/ts4.2/src/e2ee/constants.d.ts +2 -0
- package/dist/ts4.2/src/e2ee/events.d.ts +34 -0
- package/dist/ts4.2/src/e2ee/index.d.ts +1 -0
- package/dist/ts4.2/src/e2ee/types.d.ts +23 -33
- package/dist/ts4.2/src/e2ee/utils.d.ts +1 -0
- package/dist/ts4.2/src/e2ee/worker/FrameCryptor.d.ts +18 -13
- package/dist/ts4.2/src/e2ee/worker/ParticipantKeyHandler.d.ts +6 -8
- package/dist/ts4.2/src/e2ee/worker/SifGuard.d.ts +11 -0
- package/dist/ts4.2/src/options.d.ts +5 -0
- package/dist/ts4.2/src/room/DeviceManager.d.ts +1 -0
- package/dist/ts4.2/src/room/Room.d.ts +1 -1
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +1 -0
- package/dist/ts4.2/src/room/participant/Participant.d.ts +5 -0
- package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +0 -5
- package/dist/ts4.2/src/room/timers.d.ts +2 -2
- package/dist/ts4.2/src/room/track/LocalAudioTrack.d.ts +9 -1
- package/dist/ts4.2/src/room/track/LocalTrack.d.ts +3 -3
- package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +6 -0
- package/dist/ts4.2/src/room/track/processor/types.d.ts +14 -2
- package/dist/ts4.2/src/room/types.d.ts +1 -1
- package/package.json +15 -16
- package/src/api/SignalClient.ts +13 -9
- package/src/connectionHelper/checks/turn.ts +1 -0
- package/src/connectionHelper/checks/webrtc.ts +9 -7
- package/src/connectionHelper/checks/websocket.ts +1 -0
- package/src/e2ee/E2eeManager.ts +129 -76
- package/src/e2ee/KeyProvider.ts +31 -16
- package/src/e2ee/constants.ts +3 -0
- package/src/e2ee/events.ts +48 -0
- package/src/e2ee/index.ts +1 -0
- package/src/e2ee/types.ts +27 -41
- package/src/e2ee/utils.ts +9 -0
- package/src/e2ee/worker/FrameCryptor.ts +90 -47
- package/src/e2ee/worker/ParticipantKeyHandler.ts +25 -26
- package/src/e2ee/worker/SifGuard.ts +47 -0
- package/src/e2ee/worker/e2ee.worker.ts +75 -68
- package/src/options.ts +6 -0
- package/src/proto/livekit_models_pb.ts +14 -0
- package/src/proto/livekit_rtc_pb.ts +14 -0
- package/src/room/DeviceManager.ts +7 -2
- package/src/room/PCTransport.ts +12 -2
- package/src/room/RTCEngine.ts +3 -2
- package/src/room/Room.ts +47 -22
- package/src/room/defaults.ts +1 -0
- package/src/room/participant/LocalParticipant.ts +18 -2
- package/src/room/participant/Participant.ts +16 -0
- package/src/room/participant/RemoteParticipant.ts +0 -12
- package/src/room/track/LocalAudioTrack.ts +45 -0
- package/src/room/track/LocalTrack.ts +22 -14
- package/src/room/track/LocalVideoTrack.ts +39 -0
- package/src/room/track/RemoteAudioTrack.ts +9 -1
- package/src/room/track/RemoteTrackPublication.ts +2 -2
- package/src/room/track/facingMode.ts +1 -1
- package/src/room/track/processor/types.ts +18 -2
- package/src/room/types.ts +5 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteAudioTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteAudioTrack.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,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;
|
1
|
+
{"version":3,"file":"RemoteAudioTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteAudioTrack.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,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;IAexB;;OAEG;IACH,SAAS,IAAI,MAAM;IAiBnB;;;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"}
|
@@ -10,9 +10,21 @@ export type ProcessorOptions<T extends Track.Kind> = {
|
|
10
10
|
/**
|
11
11
|
* @experimental
|
12
12
|
*/
|
13
|
-
export interface
|
13
|
+
export interface AudioProcessorOptions extends ProcessorOptions<Track.Kind.Audio> {
|
14
|
+
audioContext: AudioContext;
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* @experimental
|
18
|
+
*/
|
19
|
+
export interface VideoProcessorOptions extends ProcessorOptions<Track.Kind.Video> {
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* @experimental
|
23
|
+
*/
|
24
|
+
export interface TrackProcessor<T extends Track.Kind, U extends ProcessorOptions<T> = ProcessorOptions<T>> {
|
14
25
|
name: string;
|
15
|
-
init: (opts:
|
26
|
+
init: (opts: U) => Promise<void>;
|
27
|
+
restart: (opts: U) => Promise<void>;
|
16
28
|
destroy: () => Promise<void>;
|
17
29
|
processedTrack?: MediaStreamTrack;
|
18
30
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/room/track/processor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,KAAK,CAAC,IAAI,IAAI;IACnD,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/room/track/processor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,KAAK,CAAC,IAAI,IAAI;IACnD,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;IAC/E,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;CAAG;AAEpF;;GAEG;AACH,MAAM,WAAW,cAAc,CAC7B,CAAC,SAAS,KAAK,CAAC,IAAI,EACpB,CAAC,SAAS,gBAAgB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC;IAEnD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,cAAc,CAAC,EAAE,gBAAgB,CAAC;CACnC"}
|
package/dist/src/room/types.d.ts
CHANGED
@@ -22,5 +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
|
+
export type SimulationScenario = 'signal-reconnect' | 'speaker' | 'node-failure' | 'server-leave' | 'migration' | 'resume-reconnect' | 'force-tcp' | 'force-tls' | 'full-reconnect' | 'subscriber-bandwidth';
|
26
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;AAEF,MAAM,MAAM,kBAAkB,GAC1B,kBAAkB,GAClB,SAAS,GACT,cAAc,GACd,cAAc,GACd,WAAW,GACX,kBAAkB,GAClB,WAAW,GACX,WAAW,GACX,gBAAgB,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,GAIhB,sBAAsB,CAAC"}
|
@@ -1,17 +1,13 @@
|
|
1
1
|
import { ParticipantInfo, ReconnectReason, Room, SpeakerInfo, VideoLayer } from '../proto/livekit_models_pb';
|
2
2
|
import { AddTrackRequest, ConnectionQualityUpdate, JoinResponse, LeaveRequest, ReconnectResponse, SessionDescription, SignalRequest, SignalTarget, SimulateScenario, StreamStateUpdate, SubscribedQualityUpdate, SubscriptionPermissionUpdate, SubscriptionResponse, SyncState, TrackPermission, TrackPublishedResponse, TrackUnpublishedResponse, UpdateSubscription, UpdateTrackSettings } from '../proto/livekit_rtc_pb';
|
3
3
|
import { AsyncQueue } from '../utils/AsyncQueue';
|
4
|
-
interface ConnectOpts {
|
5
|
-
autoSubscribe: boolean;
|
4
|
+
interface ConnectOpts extends SignalOptions {
|
6
5
|
/** internal */
|
7
6
|
reconnect?: boolean;
|
8
7
|
/** internal */
|
9
8
|
reconnectReason?: number;
|
10
9
|
/** internal */
|
11
10
|
sid?: string;
|
12
|
-
/** @deprecated */
|
13
|
-
publishOnly?: string;
|
14
|
-
adaptiveStream?: boolean;
|
15
11
|
}
|
16
12
|
export interface SignalOptions {
|
17
13
|
autoSubscribe: boolean;
|
@@ -20,6 +16,7 @@ export interface SignalOptions {
|
|
20
16
|
adaptiveStream?: boolean;
|
21
17
|
maxRetries: number;
|
22
18
|
e2eeEnabled: boolean;
|
19
|
+
websocketTimeout: number;
|
23
20
|
}
|
24
21
|
type SignalMessage = SignalRequest['message'];
|
25
22
|
/** @internal */
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import type TypedEventEmitter from 'typed-emitter';
|
2
2
|
import type RTCEngine from '../room/RTCEngine';
|
3
3
|
import type Room from '../room/Room';
|
4
|
-
import type { E2EEManagerCallbacks
|
4
|
+
import type { E2EEManagerCallbacks } from './events';
|
5
|
+
import type { E2EEOptions } from './types';
|
5
6
|
declare const E2EEManager_base: new () => TypedEventEmitter<E2EEManagerCallbacks>;
|
6
7
|
/**
|
7
8
|
* @experimental
|
@@ -11,7 +12,6 @@ export declare class E2EEManager extends E2EEManager_base {
|
|
11
12
|
protected room?: Room;
|
12
13
|
private encryptionEnabled;
|
13
14
|
private keyProvider;
|
14
|
-
get isEnabled(): boolean;
|
15
15
|
constructor(options: E2EEOptions);
|
16
16
|
/**
|
17
17
|
* @internal
|
@@ -20,14 +20,20 @@ export declare class E2EEManager extends E2EEManager_base {
|
|
20
20
|
/**
|
21
21
|
* @internal
|
22
22
|
*/
|
23
|
-
setParticipantCryptorEnabled(enabled: boolean,
|
23
|
+
setParticipantCryptorEnabled(enabled: boolean, participantIdentity: string): void;
|
24
|
+
/**
|
25
|
+
* @internal
|
26
|
+
*/
|
27
|
+
setSifTrailer(trailer: Uint8Array): void;
|
24
28
|
private onWorkerMessage;
|
25
29
|
private onWorkerError;
|
26
30
|
setupEngine(engine: RTCEngine): void;
|
27
31
|
private setupEventListeners;
|
28
32
|
private postRatchetRequest;
|
29
33
|
private postKey;
|
34
|
+
private postEnable;
|
30
35
|
private postRTPMap;
|
36
|
+
private postSifTrailer;
|
31
37
|
private setupE2EEReceiver;
|
32
38
|
private setupE2EESender;
|
33
39
|
/**
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type TypedEventEmitter from 'typed-emitter';
|
2
|
-
import type {
|
2
|
+
import type { KeyProviderCallbacks } from './events';
|
3
|
+
import type { KeyInfo, KeyProviderOptions } from './types';
|
3
4
|
declare const BaseKeyProvider_base: new () => TypedEventEmitter<KeyProviderCallbacks>;
|
4
5
|
/**
|
5
6
|
* @experimental
|
@@ -11,12 +12,12 @@ export declare class BaseKeyProvider extends BaseKeyProvider_base {
|
|
11
12
|
/**
|
12
13
|
* callback to invoke once a key has been set for a participant
|
13
14
|
* @param key
|
14
|
-
* @param
|
15
|
+
* @param participantIdentity
|
15
16
|
* @param keyIndex
|
16
17
|
*/
|
17
|
-
protected onSetEncryptionKey(key: CryptoKey,
|
18
|
+
protected onSetEncryptionKey(key: CryptoKey, participantIdentity?: string, keyIndex?: number): void;
|
18
19
|
/**
|
19
|
-
* callback being invoked after a ratchet request has been performed on
|
20
|
+
* callback being invoked after a ratchet request has been performed on a participant
|
20
21
|
* that surfaces the new key material.
|
21
22
|
* @param material
|
22
23
|
* @param keyIndex
|
@@ -24,7 +25,7 @@ export declare class BaseKeyProvider extends BaseKeyProvider_base {
|
|
24
25
|
protected onKeyRatcheted: (material: CryptoKey, keyIndex?: number) => void;
|
25
26
|
getKeys(): KeyInfo[];
|
26
27
|
getOptions(): KeyProviderOptions;
|
27
|
-
ratchetKey(
|
28
|
+
ratchetKey(participantIdentity?: string, keyIndex?: number): void;
|
28
29
|
}
|
29
30
|
/**
|
30
31
|
* A basic KeyProvider implementation intended for a single shared
|
@@ -35,10 +36,12 @@ export declare class ExternalE2EEKeyProvider extends BaseKeyProvider {
|
|
35
36
|
ratchetInterval: number | undefined;
|
36
37
|
constructor(options?: Partial<Omit<KeyProviderOptions, 'sharedKey'>>);
|
37
38
|
/**
|
38
|
-
* Accepts a passphrase that's used to create the crypto keys
|
39
|
+
* Accepts a passphrase that's used to create the crypto keys.
|
40
|
+
* When passing in a string, PBKDF2 is used.
|
41
|
+
* When passing in an Array buffer of cryptographically random numbers, HKDF is being used. (recommended)
|
39
42
|
* @param key
|
40
43
|
*/
|
41
|
-
setKey(key: string): Promise<void>;
|
44
|
+
setKey(key: string | ArrayBuffer): Promise<void>;
|
42
45
|
}
|
43
46
|
export {};
|
44
47
|
//# sourceMappingURL=KeyProvider.d.ts.map
|
@@ -12,4 +12,6 @@ export declare const IV_LENGTH = 12;
|
|
12
12
|
export declare const E2EE_FLAG = "lk_e2ee";
|
13
13
|
export declare const SALT = "LKFrameEncryptionKey";
|
14
14
|
export declare const KEY_PROVIDER_DEFAULTS: KeyProviderOptions;
|
15
|
+
export declare const MAX_SIF_COUNT = 100;
|
16
|
+
export declare const MAX_SIF_DURATION = 2000;
|
15
17
|
//# sourceMappingURL=constants.d.ts.map
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import type Participant from '../room/participant/Participant';
|
2
|
+
import type { CryptorError } from './errors';
|
3
|
+
import type { KeyInfo } from './types';
|
4
|
+
export declare enum KeyProviderEvent {
|
5
|
+
SetKey = "setKey",
|
6
|
+
RatchetRequest = "ratchetRequest",
|
7
|
+
KeyRatcheted = "keyRatcheted"
|
8
|
+
}
|
9
|
+
export type KeyProviderCallbacks = {
|
10
|
+
[KeyProviderEvent.SetKey]: (keyInfo: KeyInfo) => void;
|
11
|
+
[KeyProviderEvent.RatchetRequest]: (participantIdentity?: string, keyIndex?: number) => void;
|
12
|
+
[KeyProviderEvent.KeyRatcheted]: (material: CryptoKey, keyIndex?: number) => void;
|
13
|
+
};
|
14
|
+
export declare enum KeyHandlerEvent {
|
15
|
+
KeyRatcheted = "keyRatcheted"
|
16
|
+
}
|
17
|
+
export type ParticipantKeyHandlerCallbacks = {
|
18
|
+
[KeyHandlerEvent.KeyRatcheted]: (material: CryptoKey, participantIdentity: string, keyIndex?: number) => void;
|
19
|
+
};
|
20
|
+
export declare enum EncryptionEvent {
|
21
|
+
ParticipantEncryptionStatusChanged = "participantEncryptionStatusChanged",
|
22
|
+
EncryptionError = "encryptionError"
|
23
|
+
}
|
24
|
+
export type E2EEManagerCallbacks = {
|
25
|
+
[EncryptionEvent.ParticipantEncryptionStatusChanged]: (enabled: boolean, participant: Participant) => void;
|
26
|
+
[EncryptionEvent.EncryptionError]: (error: Error) => void;
|
27
|
+
};
|
28
|
+
export type CryptorCallbacks = {
|
29
|
+
[CryptorEvent.Error]: (error: CryptorError) => void;
|
30
|
+
};
|
31
|
+
export declare enum CryptorEvent {
|
32
|
+
Error = "cryptorError"
|
33
|
+
}
|
34
|
+
//# sourceMappingURL=events.d.ts.map
|
@@ -1,7 +1,5 @@
|
|
1
|
-
import type Participant from '../room/participant/Participant';
|
2
1
|
import type { VideoCodec } from '../room/track/options';
|
3
2
|
import type { BaseKeyProvider } from './KeyProvider';
|
4
|
-
import type { CryptorError } from './errors';
|
5
3
|
export interface BaseMessage {
|
6
4
|
kind: string;
|
7
5
|
data?: unknown;
|
@@ -15,7 +13,8 @@ export interface InitMessage extends BaseMessage {
|
|
15
13
|
export interface SetKeyMessage extends BaseMessage {
|
16
14
|
kind: 'setKey';
|
17
15
|
data: {
|
18
|
-
|
16
|
+
participantIdentity?: string;
|
17
|
+
isPublisher: boolean;
|
19
18
|
key: CryptoKey;
|
20
19
|
keyIndex?: number;
|
21
20
|
};
|
@@ -24,12 +23,19 @@ export interface RTPVideoMapMessage extends BaseMessage {
|
|
24
23
|
kind: 'setRTPMap';
|
25
24
|
data: {
|
26
25
|
map: Map<number, VideoCodec>;
|
26
|
+
participantIdentity: string;
|
27
|
+
};
|
28
|
+
}
|
29
|
+
export interface SifTrailerMessage extends BaseMessage {
|
30
|
+
kind: 'setSifTrailer';
|
31
|
+
data: {
|
32
|
+
trailer: Uint8Array;
|
27
33
|
};
|
28
34
|
}
|
29
35
|
export interface EncodeMessage extends BaseMessage {
|
30
36
|
kind: 'decode' | 'encode';
|
31
37
|
data: {
|
32
|
-
|
38
|
+
participantIdentity: string;
|
33
39
|
readableStream: ReadableStream;
|
34
40
|
writableStream: WritableStream;
|
35
41
|
trackId: string;
|
@@ -39,14 +45,14 @@ export interface EncodeMessage extends BaseMessage {
|
|
39
45
|
export interface RemoveTransformMessage extends BaseMessage {
|
40
46
|
kind: 'removeTransform';
|
41
47
|
data: {
|
42
|
-
|
48
|
+
participantIdentity: string;
|
43
49
|
trackId: string;
|
44
50
|
};
|
45
51
|
}
|
46
52
|
export interface UpdateCodecMessage extends BaseMessage {
|
47
53
|
kind: 'updateCodec';
|
48
54
|
data: {
|
49
|
-
|
55
|
+
participantIdentity: string;
|
50
56
|
trackId: string;
|
51
57
|
codec: VideoCodec;
|
52
58
|
};
|
@@ -54,13 +60,14 @@ export interface UpdateCodecMessage extends BaseMessage {
|
|
54
60
|
export interface RatchetRequestMessage extends BaseMessage {
|
55
61
|
kind: 'ratchetRequest';
|
56
62
|
data: {
|
57
|
-
|
63
|
+
participantIdentity?: string;
|
58
64
|
keyIndex?: number;
|
59
65
|
};
|
60
66
|
}
|
61
67
|
export interface RatchetMessage extends BaseMessage {
|
62
68
|
kind: 'ratchetKey';
|
63
69
|
data: {
|
70
|
+
participantIdentity: string;
|
64
71
|
keyIndex?: number;
|
65
72
|
material: CryptoKey;
|
66
73
|
};
|
@@ -74,11 +81,17 @@ export interface ErrorMessage extends BaseMessage {
|
|
74
81
|
export interface EnableMessage extends BaseMessage {
|
75
82
|
kind: 'enable';
|
76
83
|
data: {
|
77
|
-
|
84
|
+
participantIdentity: string;
|
85
|
+
enabled: boolean;
|
86
|
+
};
|
87
|
+
}
|
88
|
+
export interface InitAck extends BaseMessage {
|
89
|
+
kind: 'initAck';
|
90
|
+
data: {
|
78
91
|
enabled: boolean;
|
79
92
|
};
|
80
93
|
}
|
81
|
-
export type E2EEWorkerMessage = InitMessage | SetKeyMessage | EncodeMessage | ErrorMessage | EnableMessage | RemoveTransformMessage | RTPVideoMapMessage | UpdateCodecMessage | RatchetRequestMessage | RatchetMessage;
|
94
|
+
export type E2EEWorkerMessage = InitMessage | SetKeyMessage | EncodeMessage | ErrorMessage | EnableMessage | RemoveTransformMessage | RTPVideoMapMessage | UpdateCodecMessage | RatchetRequestMessage | RatchetMessage | SifTrailerMessage | InitAck;
|
82
95
|
export type KeySet = {
|
83
96
|
material: CryptoKey;
|
84
97
|
encryptionKey: CryptoKey;
|
@@ -89,32 +102,9 @@ export type KeyProviderOptions = {
|
|
89
102
|
ratchetWindowSize: number;
|
90
103
|
failureTolerance: number;
|
91
104
|
};
|
92
|
-
export type KeyProviderCallbacks = {
|
93
|
-
setKey: (keyInfo: KeyInfo) => void;
|
94
|
-
ratchetRequest: (participantId?: string, keyIndex?: number) => void;
|
95
|
-
/** currently only emitted for local participant */
|
96
|
-
keyRatcheted: (material: CryptoKey, keyIndex?: number) => void;
|
97
|
-
};
|
98
|
-
export type ParticipantKeyHandlerCallbacks = {
|
99
|
-
keyRatcheted: (material: CryptoKey, keyIndex?: number, participantId?: string) => void;
|
100
|
-
};
|
101
|
-
export type E2EEManagerCallbacks = {
|
102
|
-
participantEncryptionStatusChanged: (enabled: boolean, participant?: Participant) => void;
|
103
|
-
encryptionError: (error: Error) => void;
|
104
|
-
};
|
105
|
-
export declare const EncryptionEvent: {
|
106
|
-
readonly ParticipantEncryptionStatusChanged: "participantEncryptionStatusChanged";
|
107
|
-
readonly Error: "encryptionError";
|
108
|
-
};
|
109
|
-
export type CryptorCallbacks = {
|
110
|
-
cryptorError: (error: CryptorError) => void;
|
111
|
-
};
|
112
|
-
export declare const CryptorEvent: {
|
113
|
-
readonly Error: "cryptorError";
|
114
|
-
};
|
115
105
|
export type KeyInfo = {
|
116
106
|
key: CryptoKey;
|
117
|
-
|
107
|
+
participantIdentity?: string;
|
118
108
|
keyIndex?: number;
|
119
109
|
};
|
120
110
|
export type E2EEOptions = {
|
@@ -6,6 +6,7 @@ export declare function importKey(keyBytes: Uint8Array | ArrayBuffer, algorithm?
|
|
6
6
|
name: string;
|
7
7
|
}, usage?: 'derive' | 'encrypt'): Promise<CryptoKey>;
|
8
8
|
export declare function createKeyMaterialFromString(password: string): Promise<CryptoKey>;
|
9
|
+
export declare function createKeyMaterialFromBuffer(cryptoBuffer: ArrayBuffer): Promise<CryptoKey>;
|
9
10
|
/**
|
10
11
|
* Derives a set of keys from the master key.
|
11
12
|
* See https://tools.ietf.org/html/draft-omara-sframe-00#section-4.3.1
|
@@ -1,7 +1,9 @@
|
|
1
1
|
import type TypedEventEmitter from 'typed-emitter';
|
2
2
|
import type { VideoCodec } from '../../room/track/options';
|
3
|
-
import { CryptorCallbacks
|
3
|
+
import { CryptorCallbacks } from '../events';
|
4
|
+
import type { KeyProviderOptions } from '../types';
|
4
5
|
import type { ParticipantKeyHandler } from './ParticipantKeyHandler';
|
6
|
+
export declare const encryptionEnabledMap: Map<string, boolean>;
|
5
7
|
export interface FrameCryptorConstructor {
|
6
8
|
new (opts?: unknown): BaseFrameCryptor;
|
7
9
|
}
|
@@ -13,8 +15,8 @@ export interface TransformerInfo {
|
|
13
15
|
}
|
14
16
|
declare const BaseFrameCryptor_base: new () => TypedEventEmitter<CryptorCallbacks>;
|
15
17
|
export declare class BaseFrameCryptor extends BaseFrameCryptor_base {
|
16
|
-
encodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<any>;
|
17
|
-
decodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<any>;
|
18
|
+
protected encodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<any>;
|
19
|
+
protected decodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<any>;
|
18
20
|
}
|
19
21
|
/**
|
20
22
|
* Cryptor is responsible for en-/decrypting media frames.
|
@@ -22,7 +24,7 @@ export declare class BaseFrameCryptor extends BaseFrameCryptor_base {
|
|
22
24
|
*/
|
23
25
|
export declare class FrameCryptor extends BaseFrameCryptor {
|
24
26
|
private sendCounts;
|
25
|
-
private
|
27
|
+
private participantIdentity;
|
26
28
|
private trackId;
|
27
29
|
private keys;
|
28
30
|
private videoCodec?;
|
@@ -31,12 +33,13 @@ export declare class FrameCryptor extends BaseFrameCryptor {
|
|
31
33
|
/**
|
32
34
|
* used for detecting server injected unencrypted frames
|
33
35
|
*/
|
34
|
-
private
|
36
|
+
private sifTrailer;
|
37
|
+
private sifGuard;
|
35
38
|
constructor(opts: {
|
36
39
|
keys: ParticipantKeyHandler;
|
37
|
-
|
40
|
+
participantIdentity: string;
|
38
41
|
keyProviderOptions: KeyProviderOptions;
|
39
|
-
|
42
|
+
sifTrailer?: Uint8Array;
|
40
43
|
});
|
41
44
|
/**
|
42
45
|
* Assign a different participant to the cryptor.
|
@@ -46,7 +49,8 @@ export declare class FrameCryptor extends BaseFrameCryptor {
|
|
46
49
|
*/
|
47
50
|
setParticipant(id: string, keys: ParticipantKeyHandler): void;
|
48
51
|
unsetParticipant(): void;
|
49
|
-
|
52
|
+
isEnabled(): boolean | undefined;
|
53
|
+
getParticipantIdentity(): string | undefined;
|
50
54
|
getTrackId(): string | undefined;
|
51
55
|
/**
|
52
56
|
* Update the video codec used by the mediaStreamTrack
|
@@ -59,6 +63,7 @@ export declare class FrameCryptor extends BaseFrameCryptor {
|
|
59
63
|
*/
|
60
64
|
setRtpMap(map: Map<number, VideoCodec>): void;
|
61
65
|
setupTransform(operation: 'encode' | 'decode', readable: ReadableStream, writable: WritableStream, trackId: string, codec?: VideoCodec): void;
|
66
|
+
setSifTrailer(trailer: Uint8Array): void;
|
62
67
|
/**
|
63
68
|
* Function that will be injected in a stream and will encrypt the given encoded frames.
|
64
69
|
*
|
@@ -81,19 +86,19 @@ export declare class FrameCryptor extends BaseFrameCryptor {
|
|
81
86
|
* 8) Append a single byte for the key identifier.
|
82
87
|
* 9) Enqueue the encrypted frame for sending.
|
83
88
|
*/
|
84
|
-
encodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<void>;
|
89
|
+
protected encodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<void>;
|
85
90
|
/**
|
86
91
|
* Function that will be injected in a stream and will decrypt the given encoded frames.
|
87
92
|
*
|
88
93
|
* @param {RTCEncodedVideoFrame|RTCEncodedAudioFrame} encodedFrame - Encoded video frame.
|
89
94
|
* @param {TransformStreamDefaultController} controller - TransportStreamController.
|
90
95
|
*/
|
91
|
-
decodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<void>;
|
96
|
+
protected decodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<void>;
|
92
97
|
/**
|
93
98
|
* Function that will decrypt the given encoded frame. If the decryption fails, it will
|
94
99
|
* ratchet the key for up to RATCHET_WINDOW_SIZE times.
|
95
100
|
*/
|
96
|
-
decryptFrame
|
101
|
+
private decryptFrame;
|
97
102
|
/**
|
98
103
|
* Construct the IV used for AES-GCM and sent (in plain) with the packet similar to
|
99
104
|
* https://tools.ietf.org/html/rfc7714#section-8.1
|
@@ -114,11 +119,11 @@ export declare class FrameCryptor extends BaseFrameCryptor {
|
|
114
119
|
* See also https://developer.mozilla.org/en-US/docs/Web/API/AesGcmParams
|
115
120
|
*/
|
116
121
|
private makeIV;
|
117
|
-
getUnencryptedBytes
|
122
|
+
private getUnencryptedBytes;
|
118
123
|
/**
|
119
124
|
* inspects frame payloadtype if available and maps it to the codec specified in rtpMap
|
120
125
|
*/
|
121
|
-
getVideoCodec
|
126
|
+
private getVideoCodec;
|
122
127
|
}
|
123
128
|
/**
|
124
129
|
* Slice the NALUs present in the supplied buffer, assuming it is already byte-aligned
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type TypedEventEmitter from 'typed-emitter';
|
2
|
-
import type {
|
2
|
+
import type { ParticipantKeyHandlerCallbacks } from '../events';
|
3
|
+
import type { KeyProviderOptions, KeySet } from '../types';
|
3
4
|
declare const ParticipantKeyHandler_base: new () => TypedEventEmitter<ParticipantKeyHandlerCallbacks>;
|
4
5
|
/**
|
5
6
|
* ParticipantKeyHandler is responsible for providing a cryptor instance with the
|
@@ -12,15 +13,13 @@ declare const ParticipantKeyHandler_base: new () => TypedEventEmitter<Participan
|
|
12
13
|
export declare class ParticipantKeyHandler extends ParticipantKeyHandler_base {
|
13
14
|
private currentKeyIndex;
|
14
15
|
private cryptoKeyRing;
|
15
|
-
private enabled;
|
16
16
|
private keyProviderOptions;
|
17
17
|
private ratchetPromiseMap;
|
18
|
-
private
|
18
|
+
private participantIdentity;
|
19
19
|
private decryptionFailureCount;
|
20
20
|
private _hasValidKey;
|
21
21
|
get hasValidKey(): boolean;
|
22
|
-
constructor(
|
23
|
-
setEnabled(enabled: boolean): void;
|
22
|
+
constructor(participantIdentity: string, keyProviderOptions: KeyProviderOptions);
|
24
23
|
decryptionFailure(): void;
|
25
24
|
decryptionSuccess(): void;
|
26
25
|
/**
|
@@ -50,16 +49,15 @@ export declare class ParticipantKeyHandler extends ParticipantKeyHandler_base {
|
|
50
49
|
* also updates the currentKeyIndex
|
51
50
|
*/
|
52
51
|
setKeyFromMaterial(material: CryptoKey, keyIndex?: number, emitRatchetEvent?: boolean): Promise<void>;
|
53
|
-
setKeySet(keySet: KeySet, keyIndex: number, emitRatchetEvent?: boolean):
|
52
|
+
setKeySet(keySet: KeySet, keyIndex: number, emitRatchetEvent?: boolean): void;
|
54
53
|
setCurrentKeyIndex(index: number): Promise<void>;
|
55
|
-
isEnabled(): boolean;
|
56
54
|
getCurrentKeyIndex(): number;
|
57
55
|
/**
|
58
56
|
* returns currently used KeySet or the one at `keyIndex` if provided
|
59
57
|
* @param keyIndex
|
60
58
|
* @returns
|
61
59
|
*/
|
62
|
-
getKeySet(keyIndex?: number): KeySet;
|
60
|
+
getKeySet(keyIndex?: number): KeySet | undefined;
|
63
61
|
}
|
64
62
|
export {};
|
65
63
|
//# sourceMappingURL=ParticipantKeyHandler.d.ts.map
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export declare class SifGuard {
|
2
|
+
private consecutiveSifCount;
|
3
|
+
private sifSequenceStartedAt;
|
4
|
+
private lastSifReceivedAt;
|
5
|
+
private userFramesSinceSif;
|
6
|
+
recordSif(): void;
|
7
|
+
recordUserFrame(): void;
|
8
|
+
isSifAllowed(): boolean;
|
9
|
+
reset(): void;
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=SifGuard.d.ts.map
|
@@ -23,6 +23,9 @@ export interface InternalRoomOptions {
|
|
23
23
|
* enable Dynacast, off by default. With Dynacast dynamically pauses
|
24
24
|
* video layers that are not being consumed by any subscribers, significantly
|
25
25
|
* reducing publishing CPU and bandwidth usage.
|
26
|
+
*
|
27
|
+
* Dynacast will be enabled if SVC codecs (VP9/AV1) are used. Multi-codec simulcast
|
28
|
+
* requires dynacast
|
26
29
|
*/
|
27
30
|
dynacast: boolean;
|
28
31
|
/**
|
@@ -95,6 +98,8 @@ export interface InternalRoomConnectOptions {
|
|
95
98
|
publishOnly?: string;
|
96
99
|
/** specifies how often an initial join connection is allowed to retry (only applicable if server is not reachable) */
|
97
100
|
maxRetries: number;
|
101
|
+
/** amount of time for Websocket connection to be established, defaults to 15s */
|
102
|
+
websocketTimeout: number;
|
98
103
|
}
|
99
104
|
/**
|
100
105
|
* Options for Room.connect()
|
@@ -5,5 +5,6 @@ export default class DeviceManager {
|
|
5
5
|
static userMediaPromiseMap: Map<MediaDeviceKind, Promise<MediaStream>>;
|
6
6
|
getDevices(kind?: MediaDeviceKind, requestPermissions?: boolean): Promise<MediaDeviceInfo[]>;
|
7
7
|
normalizeDeviceId(kind: MediaDeviceKind, deviceId?: string, groupId?: string): Promise<string | undefined>;
|
8
|
+
private hasDeviceInUse;
|
8
9
|
}
|
9
10
|
//# sourceMappingURL=DeviceManager.d.ts.map
|
@@ -123,7 +123,7 @@ declare class Room extends Room_base {
|
|
123
123
|
/**
|
124
124
|
* @internal for testing
|
125
125
|
*/
|
126
|
-
simulateScenario(scenario: SimulationScenario): Promise<void>;
|
126
|
+
simulateScenario(scenario: SimulationScenario, arg?: any): Promise<void>;
|
127
127
|
private onPageLeave;
|
128
128
|
/**
|
129
129
|
* Browsers have different policies regarding audio playback. Most requiring
|
@@ -32,6 +32,7 @@ export default class LocalParticipant extends Participant {
|
|
32
32
|
constructor(sid: string, identity: string, engine: RTCEngine, options: InternalRoomOptions);
|
33
33
|
get lastCameraError(): Error | undefined;
|
34
34
|
get lastMicrophoneError(): Error | undefined;
|
35
|
+
get isE2EEEnabled(): boolean;
|
35
36
|
getTrack(source: Track.Source): LocalTrackPublication | undefined;
|
36
37
|
getTrackByName(name: string): LocalTrackPublication | undefined;
|
37
38
|
/**
|
@@ -33,6 +33,7 @@ export default class Participant extends Participant_base {
|
|
33
33
|
lastSpokeAt?: Date | undefined;
|
34
34
|
permissions?: ParticipantPermission;
|
35
35
|
private _connectionQuality;
|
36
|
+
protected audioContext?: AudioContext;
|
36
37
|
get isEncrypted(): boolean;
|
37
38
|
/** @internal */
|
38
39
|
constructor(sid: string, identity: string, name?: string, metadata?: string);
|
@@ -68,6 +69,10 @@ export default class Participant extends Participant_base {
|
|
68
69
|
setIsSpeaking(speaking: boolean): void;
|
69
70
|
/** @internal */
|
70
71
|
setConnectionQuality(q: ProtoQuality): void;
|
72
|
+
/**
|
73
|
+
* @internal
|
74
|
+
*/
|
75
|
+
setAudioContext(ctx: AudioContext | undefined): void;
|
71
76
|
protected addTrackPublication(publication: TrackPublication): void;
|
72
77
|
}
|
73
78
|
export type ParticipantEventCallbacks = {
|
@@ -12,7 +12,6 @@ export default class RemoteParticipant extends Participant {
|
|
12
12
|
tracks: Map<string, RemoteTrackPublication>;
|
13
13
|
signalClient: SignalClient;
|
14
14
|
private volumeMap;
|
15
|
-
private audioContext?;
|
16
15
|
private audioOutput?;
|
17
16
|
/** @internal */
|
18
17
|
static fromParticipantInfo(signalClient: SignalClient, pi: ParticipantInfo): RemoteParticipant;
|
@@ -41,10 +40,6 @@ export default class RemoteParticipant extends Participant {
|
|
41
40
|
updateInfo(info: ParticipantInfo): boolean;
|
42
41
|
/** @internal */
|
43
42
|
unpublishTrack(sid: Track.SID, sendUnpublish?: boolean): void;
|
44
|
-
/**
|
45
|
-
* @internal
|
46
|
-
*/
|
47
|
-
setAudioContext(ctx: AudioContext | undefined): void;
|
48
43
|
/**
|
49
44
|
* @internal
|
50
45
|
*/
|
@@ -7,7 +7,7 @@
|
|
7
7
|
export default class CriticalTimers {
|
8
8
|
static setTimeout: (callback: (args: void) => void, ms?: number | undefined) => NodeJS.Timeout;
|
9
9
|
static setInterval: (callback: (args: void) => void, ms?: number | undefined) => NodeJS.Timer;
|
10
|
-
static clearTimeout: (timeoutId: NodeJS.Timeout) => void;
|
11
|
-
static clearInterval: (intervalId: NodeJS.Timeout) => void;
|
10
|
+
static clearTimeout: (timeoutId: string | number | NodeJS.Timeout | undefined) => void;
|
11
|
+
static clearInterval: (intervalId: string | number | NodeJS.Timeout | undefined) => void;
|
12
12
|
}
|
13
13
|
//# sourceMappingURL=timers.d.ts.map
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import type { AudioSenderStats } from '../stats';
|
2
2
|
import LocalTrack from './LocalTrack';
|
3
3
|
import type { AudioCaptureOptions } from './options';
|
4
|
+
import type { TrackProcessor } from './processor/types';
|
4
5
|
export default class LocalAudioTrack extends LocalTrack {
|
5
6
|
/** @internal */
|
6
7
|
stopOnMute: boolean;
|
8
|
+
private audioContext?;
|
7
9
|
private prevStats?;
|
8
10
|
/**
|
9
11
|
*
|
@@ -11,7 +13,7 @@ export default class LocalAudioTrack extends LocalTrack {
|
|
11
13
|
* @param constraints MediaTrackConstraints that are being used when restarting or reacquiring tracks
|
12
14
|
* @param userProvidedTrack Signals to the SDK whether or not the mediaTrack should be managed (i.e. released and reacquired) internally by the SDK
|
13
15
|
*/
|
14
|
-
constructor(mediaTrack: MediaStreamTrack, constraints?: MediaTrackConstraints, userProvidedTrack?: boolean);
|
16
|
+
constructor(mediaTrack: MediaStreamTrack, constraints?: MediaTrackConstraints, userProvidedTrack?: boolean, audioContext?: AudioContext);
|
15
17
|
setDeviceId(deviceId: ConstrainDOMString): Promise<boolean>;
|
16
18
|
mute(): Promise<LocalAudioTrack>;
|
17
19
|
unmute(): Promise<LocalAudioTrack>;
|
@@ -19,6 +21,12 @@ export default class LocalAudioTrack extends LocalTrack {
|
|
19
21
|
protected restart(constraints?: MediaTrackConstraints): Promise<LocalTrack>;
|
20
22
|
startMonitor(): void;
|
21
23
|
protected monitorSender: () => Promise<void>;
|
24
|
+
setProcessor(processor: TrackProcessor<typeof this.kind>): Promise<void>;
|
25
|
+
/**
|
26
|
+
* @internal
|
27
|
+
* @experimental
|
28
|
+
*/
|
29
|
+
setAudioContext(audioContext: AudioContext | undefined): void;
|
22
30
|
getSenderStats(): Promise<AudioSenderStats | undefined>;
|
23
31
|
checkForSilence(): Promise<boolean>;
|
24
32
|
}
|