livekit-client 1.12.0 → 1.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. package/README.md +19 -1
  2. package/dist/livekit-client.e2ee.worker.js +1 -1
  3. package/dist/livekit-client.e2ee.worker.js.map +1 -1
  4. package/dist/livekit-client.e2ee.worker.mjs +442 -334
  5. package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
  6. package/dist/livekit-client.esm.mjs +12303 -14499
  7. package/dist/livekit-client.esm.mjs.map +1 -1
  8. package/dist/livekit-client.umd.js +1 -1
  9. package/dist/livekit-client.umd.js.map +1 -1
  10. package/dist/src/api/SignalClient.d.ts +2 -2
  11. package/dist/src/api/SignalClient.d.ts.map +1 -1
  12. package/dist/src/connectionHelper/ConnectionCheck.d.ts +3 -2
  13. package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
  14. package/dist/src/connectionHelper/checks/Checker.d.ts +3 -2
  15. package/dist/src/connectionHelper/checks/Checker.d.ts.map +1 -1
  16. package/dist/src/connectionHelper/checks/webrtc.d.ts.map +1 -1
  17. package/dist/src/connectionHelper/checks/websocket.d.ts.map +1 -1
  18. package/dist/src/e2ee/E2eeManager.d.ts +4 -2
  19. package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
  20. package/dist/src/e2ee/KeyProvider.d.ts +4 -2
  21. package/dist/src/e2ee/KeyProvider.d.ts.map +1 -1
  22. package/dist/src/e2ee/constants.d.ts +1 -0
  23. package/dist/src/e2ee/constants.d.ts.map +1 -1
  24. package/dist/src/e2ee/types.d.ts +1 -0
  25. package/dist/src/e2ee/types.d.ts.map +1 -1
  26. package/dist/src/e2ee/worker/FrameCryptor.d.ts +4 -3
  27. package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
  28. package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts +21 -2
  29. package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -1
  30. package/dist/src/index.d.ts +1 -1
  31. package/dist/src/index.d.ts.map +1 -1
  32. package/dist/src/proto/livekit_models_pb.d.ts +1264 -0
  33. package/dist/src/proto/livekit_models_pb.d.ts.map +1 -0
  34. package/dist/src/proto/livekit_rtc_pb.d.ts +1373 -0
  35. package/dist/src/proto/livekit_rtc_pb.d.ts.map +1 -0
  36. package/dist/src/room/PCTransport.d.ts +2 -1
  37. package/dist/src/room/PCTransport.d.ts.map +1 -1
  38. package/dist/src/room/RTCEngine.d.ts +9 -5
  39. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  40. package/dist/src/room/RegionUrlProvider.d.ts +4 -1
  41. package/dist/src/room/RegionUrlProvider.d.ts.map +1 -1
  42. package/dist/src/room/Room.d.ts +15 -11
  43. package/dist/src/room/Room.d.ts.map +1 -1
  44. package/dist/src/room/participant/LocalParticipant.d.ts +2 -2
  45. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  46. package/dist/src/room/participant/Participant.d.ts +5 -3
  47. package/dist/src/room/participant/Participant.d.ts.map +1 -1
  48. package/dist/src/room/participant/ParticipantTrackPermission.d.ts +1 -1
  49. package/dist/src/room/participant/ParticipantTrackPermission.d.ts.map +1 -1
  50. package/dist/src/room/participant/RemoteParticipant.d.ts +8 -7
  51. package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
  52. package/dist/src/room/timers.d.ts +5 -4
  53. package/dist/src/room/timers.d.ts.map +1 -1
  54. package/dist/src/room/track/LocalTrack.d.ts +3 -0
  55. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  56. package/dist/src/room/track/LocalTrackPublication.d.ts +1 -1
  57. package/dist/src/room/track/LocalTrackPublication.d.ts.map +1 -1
  58. package/dist/src/room/track/LocalVideoTrack.d.ts +2 -2
  59. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  60. package/dist/src/room/track/RemoteTrackPublication.d.ts +1 -1
  61. package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
  62. package/dist/src/room/track/Track.d.ts +6 -4
  63. package/dist/src/room/track/Track.d.ts.map +1 -1
  64. package/dist/src/room/track/TrackPublication.d.ts +7 -5
  65. package/dist/src/room/track/TrackPublication.d.ts.map +1 -1
  66. package/dist/src/room/track/create.d.ts.map +1 -1
  67. package/dist/src/room/track/options.d.ts +7 -0
  68. package/dist/src/room/track/options.d.ts.map +1 -1
  69. package/dist/src/room/track/utils.d.ts +5 -1
  70. package/dist/src/room/track/utils.d.ts.map +1 -1
  71. package/dist/src/room/utils.d.ts +3 -1
  72. package/dist/src/room/utils.d.ts.map +1 -1
  73. package/dist/src/test/mocks.d.ts +4 -3
  74. package/dist/src/test/mocks.d.ts.map +1 -1
  75. package/dist/src/utils/browserParser.d.ts +2 -0
  76. package/dist/src/utils/browserParser.d.ts.map +1 -1
  77. package/dist/ts4.2/src/api/SignalClient.d.ts +2 -2
  78. package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +3 -2
  79. package/dist/ts4.2/src/connectionHelper/checks/Checker.d.ts +3 -2
  80. package/dist/ts4.2/src/e2ee/E2eeManager.d.ts +4 -2
  81. package/dist/ts4.2/src/e2ee/KeyProvider.d.ts +4 -2
  82. package/dist/ts4.2/src/e2ee/constants.d.ts +1 -0
  83. package/dist/ts4.2/src/e2ee/types.d.ts +1 -0
  84. package/dist/ts4.2/src/e2ee/worker/FrameCryptor.d.ts +4 -3
  85. package/dist/ts4.2/src/e2ee/worker/ParticipantKeyHandler.d.ts +21 -2
  86. package/dist/ts4.2/src/index.d.ts +1 -1
  87. package/dist/ts4.2/src/proto/livekit_models_pb.d.ts +1264 -0
  88. package/dist/ts4.2/src/proto/livekit_rtc_pb.d.ts +1373 -0
  89. package/dist/ts4.2/src/room/PCTransport.d.ts +2 -1
  90. package/dist/ts4.2/src/room/RTCEngine.d.ts +9 -5
  91. package/dist/ts4.2/src/room/RegionUrlProvider.d.ts +4 -1
  92. package/dist/ts4.2/src/room/Room.d.ts +15 -11
  93. package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +2 -2
  94. package/dist/ts4.2/src/room/participant/Participant.d.ts +5 -3
  95. package/dist/ts4.2/src/room/participant/ParticipantTrackPermission.d.ts +1 -1
  96. package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +8 -7
  97. package/dist/ts4.2/src/room/timers.d.ts +5 -4
  98. package/dist/ts4.2/src/room/track/LocalTrack.d.ts +3 -0
  99. package/dist/ts4.2/src/room/track/LocalTrackPublication.d.ts +1 -1
  100. package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +2 -2
  101. package/dist/ts4.2/src/room/track/RemoteTrackPublication.d.ts +1 -1
  102. package/dist/ts4.2/src/room/track/Track.d.ts +6 -4
  103. package/dist/ts4.2/src/room/track/TrackPublication.d.ts +7 -5
  104. package/dist/ts4.2/src/room/track/options.d.ts +7 -0
  105. package/dist/ts4.2/src/room/track/utils.d.ts +5 -1
  106. package/dist/ts4.2/src/room/utils.d.ts +3 -1
  107. package/dist/ts4.2/src/test/mocks.d.ts +4 -3
  108. package/dist/ts4.2/src/utils/browserParser.d.ts +2 -0
  109. package/package.json +10 -10
  110. package/src/api/SignalClient.ts +104 -101
  111. package/src/connectionHelper/ConnectionCheck.ts +3 -2
  112. package/src/connectionHelper/checks/Checker.ts +3 -3
  113. package/src/connectionHelper/checks/webrtc.ts +66 -2
  114. package/src/connectionHelper/checks/websocket.ts +4 -0
  115. package/src/e2ee/E2eeManager.ts +4 -3
  116. package/src/e2ee/KeyProvider.ts +3 -2
  117. package/src/e2ee/constants.ts +4 -0
  118. package/src/e2ee/types.ts +1 -0
  119. package/src/e2ee/worker/FrameCryptor.test.ts +1 -3
  120. package/src/e2ee/worker/FrameCryptor.ts +14 -16
  121. package/src/e2ee/worker/ParticipantKeyHandler.ts +48 -2
  122. package/src/e2ee/worker/e2ee.worker.ts +12 -6
  123. package/src/index.ts +1 -1
  124. package/src/proto/livekit_models_pb.ts +2096 -0
  125. package/src/proto/livekit_rtc_pb.ts +2332 -0
  126. package/src/room/PCTransport.ts +1 -1
  127. package/src/room/RTCEngine.ts +24 -18
  128. package/src/room/RegionUrlProvider.ts +11 -2
  129. package/src/room/Room.test.ts +1 -0
  130. package/src/room/Room.ts +175 -86
  131. package/src/room/participant/LocalParticipant.ts +43 -59
  132. package/src/room/participant/Participant.ts +6 -4
  133. package/src/room/participant/ParticipantTrackPermission.ts +3 -3
  134. package/src/room/participant/RemoteParticipant.ts +24 -21
  135. package/src/room/participant/publishUtils.test.ts +1 -0
  136. package/src/room/track/LocalTrack.ts +24 -9
  137. package/src/room/track/LocalTrackPublication.ts +1 -1
  138. package/src/room/track/LocalVideoTrack.test.ts +2 -1
  139. package/src/room/track/LocalVideoTrack.ts +22 -22
  140. package/src/room/track/RemoteTrackPublication.ts +12 -7
  141. package/src/room/track/RemoteVideoTrack.test.ts +5 -4
  142. package/src/room/track/Track.ts +9 -6
  143. package/src/room/track/TrackPublication.ts +7 -5
  144. package/src/room/track/create.ts +18 -17
  145. package/src/room/track/facingMode.test.ts +1 -0
  146. package/src/room/track/options.ts +6 -0
  147. package/src/room/track/utils.test.ts +1 -0
  148. package/src/room/track/utils.ts +44 -2
  149. package/src/room/utils.test.ts +16 -0
  150. package/src/room/utils.ts +20 -4
  151. package/src/test/mocks.ts +7 -5
  152. package/src/utils/AsyncQueue.test.ts +1 -0
  153. package/src/utils/browserParser.test.ts +33 -3
  154. package/src/utils/browserParser.ts +5 -0
  155. package/dist/src/proto/google/protobuf/timestamp.d.ts +0 -146
  156. package/dist/src/proto/google/protobuf/timestamp.d.ts.map +0 -1
  157. package/dist/src/proto/livekit_models.d.ts +0 -2399
  158. package/dist/src/proto/livekit_models.d.ts.map +0 -1
  159. package/dist/src/proto/livekit_rtc.d.ts +0 -14352
  160. package/dist/src/proto/livekit_rtc.d.ts.map +0 -1
  161. package/dist/ts4.2/src/proto/google/protobuf/timestamp.d.ts +0 -150
  162. package/dist/ts4.2/src/proto/livekit_models.d.ts +0 -2659
  163. package/dist/ts4.2/src/proto/livekit_rtc.d.ts +0 -15764
  164. package/src/proto/google/protobuf/timestamp.ts +0 -230
  165. package/src/proto/livekit_models.ts +0 -4006
  166. package/src/proto/livekit_rtc.ts +0 -4672
@@ -1,14 +1,15 @@
1
- import EventEmitter from 'eventemitter3';
2
- import { Encryption_Type } from '../../proto/livekit_models';
3
- import type { SubscriptionError, TrackInfo } from '../../proto/livekit_models';
4
- import type { UpdateSubscription, UpdateTrackSettings } from '../../proto/livekit_rtc';
1
+ import type TypedEventEmitter from 'typed-emitter';
2
+ import { Encryption_Type } from '../../proto/livekit_models_pb';
3
+ import type { SubscriptionError, TrackInfo } from '../../proto/livekit_models_pb';
4
+ import type { UpdateSubscription, UpdateTrackSettings } from '../../proto/livekit_rtc_pb';
5
5
  import LocalAudioTrack from './LocalAudioTrack';
6
6
  import LocalVideoTrack from './LocalVideoTrack';
7
7
  import RemoteAudioTrack from './RemoteAudioTrack';
8
8
  import type RemoteTrack from './RemoteTrack';
9
9
  import RemoteVideoTrack from './RemoteVideoTrack';
10
10
  import { Track } from './Track';
11
- export declare class TrackPublication extends EventEmitter<PublicationEventCallbacks> {
11
+ declare const TrackPublication_base: new () => TypedEventEmitter<PublicationEventCallbacks>;
12
+ export declare class TrackPublication extends TrackPublication_base {
12
13
  kind: Track.Kind;
13
14
  trackName: string;
14
15
  trackSid: Track.SID;
@@ -67,4 +68,5 @@ export type PublicationEventCallbacks = {
67
68
  subscriptionStatusChanged: (status: TrackPublication.SubscriptionStatus, prevStatus: TrackPublication.SubscriptionStatus) => void;
68
69
  subscriptionFailed: (error: SubscriptionError) => void;
69
70
  };
71
+ export {};
70
72
  //# sourceMappingURL=TrackPublication.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TrackPublication.d.ts","sourceRoot":"","sources":["../../../../src/room/track/TrackPublication.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,4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,iBAAiB,KAAK,IAAI,CAAC;CACxD,CAAC"}
@@ -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;AAGhD,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACpB,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"}
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;AAGhD,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,WAAW,CAAC;AAOnB;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAoD5B;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,CA4B5B"}
@@ -127,6 +127,13 @@ export interface ScreenShareCaptureOptions {
127
127
  * screenshare is limited: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#browser_compatibility
128
128
  */
129
129
  audio?: boolean | AudioCaptureOptions;
130
+ /**
131
+ * only allows for 'true' and chrome allows for additional options to be passed in
132
+ * https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#displaySurface
133
+ */
134
+ video?: true | {
135
+ displaySurface?: 'window' | 'browser' | 'monitor';
136
+ };
130
137
  /** capture resolution, defaults to full HD */
131
138
  resolution?: VideoResolution;
132
139
  /** a CaptureController object instance containing methods that can be used to further manipulate the capture session if included. */
@@ -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;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAG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G,UAAU,CAAC;AAElD,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"}
@@ -1,5 +1,5 @@
1
1
  import { Track } from './Track';
2
- import type { AudioCaptureOptions, CreateLocalTracksOptions, VideoCaptureOptions } from './options';
2
+ import type { AudioCaptureOptions, CreateLocalTracksOptions, ScreenShareCaptureOptions, VideoCaptureOptions } from './options';
3
3
  import type { AudioTrack } from './types';
4
4
  export declare function mergeDefaultOptions(options?: CreateLocalTracksOptions, audioDefaults?: AudioCaptureOptions, videoDefaults?: VideoCaptureOptions): CreateLocalTracksOptions;
5
5
  export declare function constraintsForOptions(options: CreateLocalTracksOptions): MediaStreamConstraints;
@@ -20,4 +20,8 @@ export declare function kindToSource(kind: MediaDeviceKind): Track.Source.Camera
20
20
  * @internal
21
21
  */
22
22
  export declare function sourceToKind(source: Track.Source): MediaDeviceKind | undefined;
23
+ /**
24
+ * @internal
25
+ */
26
+ export declare function screenCaptureToDisplayMediaStreamOptions(options: ScreenShareCaptureOptions): DisplayMediaStreamOptions;
23
27
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/room/track/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,m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AAO,CAAC,CAkBzF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,GAAG,IAAI,CAOxD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,wEAQjD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,eAAe,GAAG,SAAS,CAQ9E;AAED;;GAEG;AACH,wBAAgB,wCAAwC,CACtD,OAAO,EAAE,yBAAyB,GACjC,yBAAyB,CA8B3B"}
@@ -1,4 +1,4 @@
1
- import { ClientInfo } from '../proto/livekit_models';
1
+ import { ClientInfo } from '../proto/livekit_models_pb';
2
2
  import type LocalAudioTrack from './track/LocalAudioTrack';
3
3
  import type RemoteAudioTrack from './track/RemoteAudioTrack';
4
4
  import { VideoCodec } from './track/options';
@@ -87,4 +87,6 @@ export declare class Mutex {
87
87
  }
88
88
  export declare function isVideoCodec(maybeCodec: string): maybeCodec is VideoCodec;
89
89
  export declare function unwrapConstraint(constraint: ConstrainDOMString): string;
90
+ export declare function toWebsocketUrl(url: string): string;
91
+ export declare function toHttpUrl(url: string): string;
90
92
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/room/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,yBAAyB,CAAC;AAIrE,OAAO,KAAK,eAAe,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAe,MAAM,iBAAiB,CAAC;AAK1D,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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ACrB;;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;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,IAAI,UAAU,CAEzE;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAqBvE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAK7C"}
@@ -1,10 +1,11 @@
1
+ import { MockedClass } from 'vitest';
1
2
  import { SignalClient } from '../api/SignalClient';
2
3
  import RTCEngine from '../room/RTCEngine';
3
4
  declare const mocks: {
4
- SignalClient: jest.MockedClass<typeof SignalClient>;
5
- RTCEngine: jest.MockedClass<typeof RTCEngine>;
5
+ SignalClient: MockedClass<typeof SignalClient>;
6
+ RTCEngine: MockedClass<typeof RTCEngine>;
6
7
  MockLocalVideoTrack: {
7
- stop: jest.Mock<any, any, any>;
8
+ stop: import("@vitest/spy").Mock<any, any>;
8
9
  };
9
10
  };
10
11
  export default mocks;
@@ -1 +1 @@
1
- {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/test/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAO1C,QAAA,MAAM,KAAK;;;;;;CAMV,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/test/mocks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAM,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAO1C,QAAA,MAAM,KAAK;;;;;;CAMV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,7 +1,9 @@
1
1
  export type DetectableBrowser = 'Chrome' | 'Firefox' | 'Safari';
2
+ export type DetectableOS = 'iOS' | 'macOS';
2
3
  export type BrowserDetails = {
3
4
  name: DetectableBrowser;
4
5
  version: string;
6
+ os?: DetectableOS;
5
7
  };
6
8
  /**
7
9
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"browserParser.d.ts","sourceRoot":"","sources":["../../../src/utils/browserParser.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF;;GAEG;AACH,wBAAgB,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,UAAO,8BAU1D"}
1
+ {"version":3,"file":"browserParser.d.ts","sourceRoot":"","sources":["../../../src/utils/browserParser.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,OAAO,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,YAAY,CAAC;CACnB,CAAC;AAIF;;GAEG;AACH,wBAAgB,UAAU,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,UAAO,8BAU1D"}
@@ -1,5 +1,5 @@
1
- import { ParticipantInfo, ReconnectReason, Room, SpeakerInfo, VideoLayer } from '../proto/livekit_models';
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';
1
+ import { ParticipantInfo, ReconnectReason, Room, SpeakerInfo, VideoLayer } from '../proto/livekit_models_pb';
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
4
  interface ConnectOpts {
5
5
  autoSubscribe: boolean;
@@ -1,8 +1,9 @@
1
- import EventEmitter from 'eventemitter3';
1
+ import type TypedEmitter from 'typed-emitter';
2
2
  import { CheckStatus, Checker } from './checks/Checker';
3
3
  import type { CheckInfo, InstantiableCheck } from './checks/Checker';
4
4
  export type { CheckInfo, CheckStatus };
5
- export declare class ConnectionCheck extends EventEmitter<ConnectionCheckCallbacks> {
5
+ declare const ConnectionCheck_base: new () => TypedEmitter<ConnectionCheckCallbacks>;
6
+ export declare class ConnectionCheck extends ConnectionCheck_base {
6
7
  token: string;
7
8
  url: string;
8
9
  private checkResults;
@@ -1,4 +1,4 @@
1
- import EventEmitter from 'eventemitter3';
1
+ import type TypedEmitter from 'typed-emitter';
2
2
  import type { RoomConnectOptions, RoomOptions } from '../../options';
3
3
  import type RTCEngine from '../../room/RTCEngine';
4
4
  import Room from '../../room/Room';
@@ -24,7 +24,8 @@ export interface CheckerOptions {
24
24
  roomOptions?: RoomOptions;
25
25
  connectOptions?: RoomConnectOptions;
26
26
  }
27
- export declare abstract class Checker extends EventEmitter<CheckerCallbacks> {
27
+ declare const Checker_base: new () => TypedEmitter<CheckerCallbacks>;
28
+ export declare abstract class Checker extends Checker_base {
28
29
  protected url: string;
29
30
  protected token: string;
30
31
  room: Room;
@@ -1,11 +1,12 @@
1
- import EventEmitter from 'eventemitter3';
1
+ import type TypedEventEmitter from 'typed-emitter';
2
2
  import type RTCEngine from '../room/RTCEngine';
3
3
  import type Room from '../room/Room';
4
4
  import type { E2EEManagerCallbacks, E2EEOptions } from './types';
5
+ declare const E2EEManager_base: new () => TypedEventEmitter<E2EEManagerCallbacks>;
5
6
  /**
6
7
  * @experimental
7
8
  */
8
- export declare class E2EEManager extends EventEmitter<E2EEManagerCallbacks> {
9
+ export declare class E2EEManager extends E2EEManager_base {
9
10
  protected worker: Worker;
10
11
  protected room?: Room;
11
12
  private encryptionEnabled;
@@ -42,4 +43,5 @@ export declare class E2EEManager extends EventEmitter<E2EEManagerCallbacks> {
42
43
  */
43
44
  private handleSender;
44
45
  }
46
+ export {};
45
47
  //# sourceMappingURL=E2eeManager.d.ts.map
@@ -1,9 +1,10 @@
1
- import EventEmitter from 'eventemitter3';
1
+ import type TypedEventEmitter from 'typed-emitter';
2
2
  import type { KeyInfo, KeyProviderCallbacks, KeyProviderOptions } from './types';
3
+ declare const BaseKeyProvider_base: new () => TypedEventEmitter<KeyProviderCallbacks>;
3
4
  /**
4
5
  * @experimental
5
6
  */
6
- export declare class BaseKeyProvider extends EventEmitter<KeyProviderCallbacks> {
7
+ export declare class BaseKeyProvider extends BaseKeyProvider_base {
7
8
  private keyInfoMap;
8
9
  private options;
9
10
  constructor(options?: Partial<KeyProviderOptions>);
@@ -39,4 +40,5 @@ export declare class ExternalE2EEKeyProvider extends BaseKeyProvider {
39
40
  */
40
41
  setKey(key: string): Promise<void>;
41
42
  }
43
+ export {};
42
44
  //# sourceMappingURL=KeyProvider.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import type { KeyProviderOptions } from './types';
2
2
  export declare const ENCRYPTION_ALGORITHM = "AES-GCM";
3
3
  export declare const KEYRING_SIZE = 16;
4
+ export declare const DECRYPTION_FAILURE_TOLERANCE = 10;
4
5
  export declare const UNENCRYPTED_BYTES: {
5
6
  readonly key: 10;
6
7
  readonly delta: 3;
@@ -87,6 +87,7 @@ export type KeyProviderOptions = {
87
87
  sharedKey: boolean;
88
88
  ratchetSalt: string;
89
89
  ratchetWindowSize: number;
90
+ failureTolerance: number;
90
91
  };
91
92
  export type KeyProviderCallbacks = {
92
93
  setKey: (keyInfo: KeyInfo) => void;
@@ -1,4 +1,4 @@
1
- import EventEmitter from 'eventemitter3';
1
+ import type TypedEventEmitter from 'typed-emitter';
2
2
  import type { VideoCodec } from '../../room/track/options';
3
3
  import { CryptorCallbacks, DecodeRatchetOptions, KeyProviderOptions, KeySet } from '../types';
4
4
  import type { ParticipantKeyHandler } from './ParticipantKeyHandler';
@@ -11,7 +11,8 @@ export interface TransformerInfo {
11
11
  transformer: TransformStream;
12
12
  abortController: AbortController;
13
13
  }
14
- export declare class BaseFrameCryptor extends EventEmitter<CryptorCallbacks> {
14
+ declare const BaseFrameCryptor_base: new () => TypedEventEmitter<CryptorCallbacks>;
15
+ export declare class BaseFrameCryptor extends BaseFrameCryptor_base {
15
16
  encodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<any>;
16
17
  decodeFunction(encodedFrame: RTCEncodedVideoFrame | RTCEncodedAudioFrame, controller: TransformStreamDefaultController): Promise<any>;
17
18
  }
@@ -21,7 +22,6 @@ export declare class BaseFrameCryptor extends EventEmitter<CryptorCallbacks> {
21
22
  */
22
23
  export declare class FrameCryptor extends BaseFrameCryptor {
23
24
  private sendCounts;
24
- private isKeyInvalid;
25
25
  private participantId;
26
26
  private trackId;
27
27
  private keys;
@@ -172,4 +172,5 @@ export declare enum NALUType {
172
172
  * @internal
173
173
  */
174
174
  export declare function isFrameServerInjected(frameData: ArrayBuffer, trailerBytes: Uint8Array): boolean;
175
+ export {};
175
176
  //# sourceMappingURL=FrameCryptor.d.ts.map
@@ -1,5 +1,6 @@
1
- import EventEmitter from 'eventemitter3';
1
+ import type TypedEventEmitter from 'typed-emitter';
2
2
  import type { KeyProviderOptions, KeySet, ParticipantKeyHandlerCallbacks } from '../types';
3
+ declare const ParticipantKeyHandler_base: new () => TypedEventEmitter<ParticipantKeyHandlerCallbacks>;
3
4
  /**
4
5
  * ParticipantKeyHandler is responsible for providing a cryptor instance with the
5
6
  * en-/decryption key of a participant. It assumes that all tracks of a specific participant
@@ -8,15 +9,25 @@ import type { KeyProviderOptions, KeySet, ParticipantKeyHandlerCallbacks } from
8
9
  * if decryption fails or can be triggered manually on both sender and receiver side.
9
10
  *
10
11
  */
11
- export declare class ParticipantKeyHandler extends EventEmitter<ParticipantKeyHandlerCallbacks> {
12
+ export declare class ParticipantKeyHandler extends ParticipantKeyHandler_base {
12
13
  private currentKeyIndex;
13
14
  private cryptoKeyRing;
14
15
  private enabled;
15
16
  private keyProviderOptions;
16
17
  private ratchetPromiseMap;
17
18
  private participantId;
19
+ private decryptionFailureCount;
20
+ private _hasValidKey;
21
+ get hasValidKey(): boolean;
18
22
  constructor(participantId: string | undefined, isEnabled: boolean, keyProviderOptions: KeyProviderOptions);
19
23
  setEnabled(enabled: boolean): void;
24
+ decryptionFailure(): void;
25
+ decryptionSuccess(): void;
26
+ /**
27
+ * Call this after user initiated ratchet or a new key has been set in order to make sure to mark potentially
28
+ * invalid keys as valid again
29
+ */
30
+ resetKeyStatus(): void;
20
31
  /**
21
32
  * Ratchets the current key (or the one at keyIndex if provided) and
22
33
  * returns the ratcheted material
@@ -25,6 +36,13 @@ export declare class ParticipantKeyHandler extends EventEmitter<ParticipantKeyHa
25
36
  * @param setKey
26
37
  */
27
38
  ratchetKey(keyIndex?: number, setKey?: boolean): Promise<CryptoKey>;
39
+ /**
40
+ * takes in a key material with `deriveBits` and `deriveKey` set as key usages
41
+ * and derives encryption keys from the material and sets it on the key ring buffer
42
+ * together with the material
43
+ * also resets the valid key property and updates the currentKeyIndex
44
+ */
45
+ setKey(material: CryptoKey, keyIndex?: number): Promise<void>;
28
46
  /**
29
47
  * takes in a key material with `deriveBits` and `deriveKey` set as key usages
30
48
  * and derives encryption keys from the material and sets it on the key ring buffer
@@ -43,4 +61,5 @@ export declare class ParticipantKeyHandler extends EventEmitter<ParticipantKeyHa
43
61
  */
44
62
  getKeySet(keyIndex?: number): KeySet;
45
63
  }
64
+ export {};
46
65
  //# sourceMappingURL=ParticipantKeyHandler.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { LogLevel, setLogExtension, setLogLevel } from './logger';
2
- import { DataPacket_Kind, DisconnectReason, VideoQuality } from './proto/livekit_models';
2
+ import { DataPacket_Kind, DisconnectReason, VideoQuality } from './proto/livekit_models_pb';
3
3
  import DefaultReconnectPolicy from './room/DefaultReconnectPolicy';
4
4
  import Room, { ConnectionState, RoomState } from './room/Room';
5
5
  import LocalParticipant from './room/participant/LocalParticipant';