livekit-client 1.12.2 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/dist/livekit-client.e2ee.worker.js +1 -1
  2. package/dist/livekit-client.e2ee.worker.js.map +1 -1
  3. package/dist/livekit-client.e2ee.worker.mjs +83 -9
  4. package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
  5. package/dist/livekit-client.esm.mjs +2239 -1975
  6. package/dist/livekit-client.esm.mjs.map +1 -1
  7. package/dist/livekit-client.umd.js +1 -1
  8. package/dist/livekit-client.umd.js.map +1 -1
  9. package/dist/src/api/SignalClient.d.ts +2 -5
  10. package/dist/src/api/SignalClient.d.ts.map +1 -1
  11. package/dist/src/connectionHelper/checks/turn.d.ts.map +1 -1
  12. package/dist/src/connectionHelper/checks/webrtc.d.ts.map +1 -1
  13. package/dist/src/connectionHelper/checks/websocket.d.ts.map +1 -1
  14. package/dist/src/e2ee/E2eeManager.d.ts +5 -0
  15. package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
  16. package/dist/src/e2ee/KeyProvider.d.ts +4 -2
  17. package/dist/src/e2ee/KeyProvider.d.ts.map +1 -1
  18. package/dist/src/e2ee/constants.d.ts +2 -0
  19. package/dist/src/e2ee/constants.d.ts.map +1 -1
  20. package/dist/src/e2ee/types.d.ts +7 -1
  21. package/dist/src/e2ee/types.d.ts.map +1 -1
  22. package/dist/src/e2ee/utils.d.ts +1 -0
  23. package/dist/src/e2ee/utils.d.ts.map +1 -1
  24. package/dist/src/e2ee/worker/FrameCryptor.d.ts +4 -2
  25. package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
  26. package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -1
  27. package/dist/src/e2ee/worker/SifGuard.d.ts +11 -0
  28. package/dist/src/e2ee/worker/SifGuard.d.ts.map +1 -0
  29. package/dist/src/options.d.ts +5 -0
  30. package/dist/src/options.d.ts.map +1 -1
  31. package/dist/src/proto/livekit_models_pb.d.ts.map +1 -1
  32. package/dist/src/proto/livekit_rtc_pb.d.ts.map +1 -1
  33. package/dist/src/room/DeviceManager.d.ts +1 -0
  34. package/dist/src/room/DeviceManager.d.ts.map +1 -1
  35. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  36. package/dist/src/room/Room.d.ts +1 -1
  37. package/dist/src/room/Room.d.ts.map +1 -1
  38. package/dist/src/room/defaults.d.ts.map +1 -1
  39. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  40. package/dist/src/room/participant/Participant.d.ts +5 -0
  41. package/dist/src/room/participant/Participant.d.ts.map +1 -1
  42. package/dist/src/room/participant/RemoteParticipant.d.ts +0 -5
  43. package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
  44. package/dist/src/room/participant/publishUtils.d.ts +1 -1
  45. package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
  46. package/dist/src/room/timers.d.ts +2 -2
  47. package/dist/src/room/timers.d.ts.map +1 -1
  48. package/dist/src/room/track/LocalAudioTrack.d.ts +9 -1
  49. package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
  50. package/dist/src/room/track/LocalTrack.d.ts +3 -3
  51. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  52. package/dist/src/room/track/LocalVideoTrack.d.ts +6 -0
  53. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  54. package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
  55. package/dist/src/room/track/options.d.ts +1 -0
  56. package/dist/src/room/track/options.d.ts.map +1 -1
  57. package/dist/src/room/track/processor/types.d.ts +13 -2
  58. package/dist/src/room/track/processor/types.d.ts.map +1 -1
  59. package/dist/src/room/types.d.ts +1 -1
  60. package/dist/src/room/types.d.ts.map +1 -1
  61. package/dist/ts4.2/src/api/SignalClient.d.ts +2 -5
  62. package/dist/ts4.2/src/e2ee/E2eeManager.d.ts +5 -0
  63. package/dist/ts4.2/src/e2ee/KeyProvider.d.ts +4 -2
  64. package/dist/ts4.2/src/e2ee/constants.d.ts +2 -0
  65. package/dist/ts4.2/src/e2ee/types.d.ts +7 -1
  66. package/dist/ts4.2/src/e2ee/utils.d.ts +1 -0
  67. package/dist/ts4.2/src/e2ee/worker/FrameCryptor.d.ts +4 -2
  68. package/dist/ts4.2/src/e2ee/worker/SifGuard.d.ts +11 -0
  69. package/dist/ts4.2/src/options.d.ts +5 -0
  70. package/dist/ts4.2/src/room/DeviceManager.d.ts +1 -0
  71. package/dist/ts4.2/src/room/Room.d.ts +1 -1
  72. package/dist/ts4.2/src/room/participant/Participant.d.ts +5 -0
  73. package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +0 -5
  74. package/dist/ts4.2/src/room/participant/publishUtils.d.ts +1 -1
  75. package/dist/ts4.2/src/room/timers.d.ts +2 -2
  76. package/dist/ts4.2/src/room/track/LocalAudioTrack.d.ts +9 -1
  77. package/dist/ts4.2/src/room/track/LocalTrack.d.ts +3 -3
  78. package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +6 -0
  79. package/dist/ts4.2/src/room/track/options.d.ts +1 -0
  80. package/dist/ts4.2/src/room/track/processor/types.d.ts +13 -2
  81. package/dist/ts4.2/src/room/types.d.ts +1 -1
  82. package/package.json +15 -16
  83. package/src/api/SignalClient.ts +13 -9
  84. package/src/connectionHelper/checks/turn.ts +1 -0
  85. package/src/connectionHelper/checks/webrtc.ts +9 -7
  86. package/src/connectionHelper/checks/websocket.ts +1 -0
  87. package/src/e2ee/E2eeManager.ts +27 -2
  88. package/src/e2ee/KeyProvider.ts +9 -4
  89. package/src/e2ee/constants.ts +3 -0
  90. package/src/e2ee/types.ts +9 -1
  91. package/src/e2ee/utils.ts +9 -0
  92. package/src/e2ee/worker/FrameCryptor.ts +46 -17
  93. package/src/e2ee/worker/ParticipantKeyHandler.ts +1 -0
  94. package/src/e2ee/worker/SifGuard.ts +47 -0
  95. package/src/e2ee/worker/e2ee.worker.ts +14 -0
  96. package/src/options.ts +6 -0
  97. package/src/proto/livekit_models_pb.ts +14 -0
  98. package/src/proto/livekit_rtc_pb.ts +14 -0
  99. package/src/room/DeviceManager.ts +7 -2
  100. package/src/room/RTCEngine.ts +7 -5
  101. package/src/room/Room.ts +27 -7
  102. package/src/room/defaults.ts +1 -0
  103. package/src/room/participant/LocalParticipant.ts +14 -2
  104. package/src/room/participant/Participant.ts +16 -0
  105. package/src/room/participant/RemoteParticipant.ts +0 -12
  106. package/src/room/participant/publishUtils.ts +4 -2
  107. package/src/room/track/LocalAudioTrack.ts +45 -0
  108. package/src/room/track/LocalTrack.ts +4 -4
  109. package/src/room/track/LocalVideoTrack.ts +49 -8
  110. package/src/room/track/RemoteAudioTrack.ts +9 -1
  111. package/src/room/track/RemoteTrackPublication.ts +2 -2
  112. package/src/room/track/options.ts +17 -16
  113. package/src/room/track/processor/types.ts +17 -2
  114. package/src/room/types.ts +5 -1
@@ -327,11 +327,11 @@ export namespace AudioPresets {
327
327
  * Sane presets for video resolution/encoding
328
328
  */
329
329
  export const VideoPresets = {
330
- h90: new VideoPreset(160, 90, 60_000, 15),
331
- h180: new VideoPreset(320, 180, 120_000, 15),
332
- h216: new VideoPreset(384, 216, 180_000, 15),
333
- h360: new VideoPreset(640, 360, 300_000, 20),
334
- h540: new VideoPreset(960, 540, 600_000, 25),
330
+ h90: new VideoPreset(160, 90, 90_000, 20),
331
+ h180: new VideoPreset(320, 180, 160_000, 20),
332
+ h216: new VideoPreset(384, 216, 180_000, 20),
333
+ h360: new VideoPreset(640, 360, 450_000, 20),
334
+ h540: new VideoPreset(960, 540, 800_000, 25),
335
335
  h720: new VideoPreset(1280, 720, 1_700_000, 30),
336
336
  h1080: new VideoPreset(1920, 1080, 3_000_000, 30),
337
337
  h1440: new VideoPreset(2560, 1440, 5_000_000, 30),
@@ -342,21 +342,22 @@ export const VideoPresets = {
342
342
  * Four by three presets
343
343
  */
344
344
  export const VideoPresets43 = {
345
- h120: new VideoPreset(160, 120, 80_000, 15),
346
- h180: new VideoPreset(240, 180, 100_000, 15),
347
- h240: new VideoPreset(320, 240, 150_000, 15),
345
+ h120: new VideoPreset(160, 120, 70_000, 20),
346
+ h180: new VideoPreset(240, 180, 125_000, 20),
347
+ h240: new VideoPreset(320, 240, 140_000, 20),
348
348
  h360: new VideoPreset(480, 360, 225_000, 20),
349
- h480: new VideoPreset(640, 480, 300_000, 20),
350
- h540: new VideoPreset(720, 540, 450_000, 25),
351
- h720: new VideoPreset(960, 720, 1_500_000, 30),
352
- h1080: new VideoPreset(1440, 1080, 2_500_000, 30),
353
- h1440: new VideoPreset(1920, 1440, 3_500_000, 30),
349
+ h480: new VideoPreset(640, 480, 500_000, 20),
350
+ h540: new VideoPreset(720, 540, 600_000, 25),
351
+ h720: new VideoPreset(960, 720, 1_300_000, 30),
352
+ h1080: new VideoPreset(1440, 1080, 2_300_000, 30),
353
+ h1440: new VideoPreset(1920, 1440, 3_800_000, 30),
354
354
  } as const;
355
355
 
356
356
  export const ScreenSharePresets = {
357
357
  h360fps3: new VideoPreset(640, 360, 200_000, 3, 'medium'),
358
358
  h720fps5: new VideoPreset(1280, 720, 400_000, 5, 'medium'),
359
- h720fps15: new VideoPreset(1280, 720, 1_000_000, 15, 'medium'),
360
- h1080fps15: new VideoPreset(1920, 1080, 1_500_000, 15, 'medium'),
361
- h1080fps30: new VideoPreset(1920, 1080, 3_000_000, 30, 'medium'),
359
+ h720fps15: new VideoPreset(1280, 720, 1_500_000, 15, 'medium'),
360
+ h720fps30: new VideoPreset(1280, 720, 2_000_000, 30, 'medium'),
361
+ h1080fps15: new VideoPreset(1920, 1080, 2_500_000, 15, 'medium'),
362
+ h1080fps30: new VideoPreset(1920, 1080, 4_000_000, 30, 'medium'),
362
363
  } as const;
@@ -12,9 +12,24 @@ export type ProcessorOptions<T extends Track.Kind> = {
12
12
  /**
13
13
  * @experimental
14
14
  */
15
- export interface TrackProcessor<T extends Track.Kind> {
15
+ export interface AudioProcessorOptions extends ProcessorOptions<Track.Kind.Audio> {
16
+ audioContext: AudioContext;
17
+ }
18
+
19
+ /**
20
+ * @experimental
21
+ */
22
+ export interface VideoProcessorOptions extends ProcessorOptions<Track.Kind.Video> {}
23
+
24
+ /**
25
+ * @experimental
26
+ */
27
+ export interface TrackProcessor<
28
+ T extends Track.Kind,
29
+ U extends ProcessorOptions<T> = ProcessorOptions<T>,
30
+ > {
16
31
  name: string;
17
- init: (opts: ProcessorOptions<T>) => void;
32
+ init: (opts: U) => void;
18
33
  destroy: () => Promise<void>;
19
34
  processedTrack?: MediaStreamTrack;
20
35
  }
package/src/room/types.ts CHANGED
@@ -36,4 +36,8 @@ export type SimulationScenario =
36
36
  | 'resume-reconnect'
37
37
  | 'force-tcp'
38
38
  | 'force-tls'
39
- | 'full-reconnect';
39
+ | 'full-reconnect'
40
+ // overrides server-side bandwidth estimator with set bandwidth
41
+ // this can be used to test application behavior when congested or
42
+ // to disable congestion control entirely (by setting bandwidth to 100Mbps)
43
+ | 'subscriber-bandwidth';