livekit-client 1.8.0 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. package/README.md +3 -2
  2. package/dist/livekit-client.esm.mjs +13470 -13341
  3. package/dist/livekit-client.esm.mjs.map +1 -1
  4. package/dist/livekit-client.umd.js +1 -1
  5. package/dist/livekit-client.umd.js.map +1 -1
  6. package/dist/src/api/SignalClient.d.ts +11 -10
  7. package/dist/src/api/SignalClient.d.ts.map +1 -1
  8. package/dist/src/connectionHelper/ConnectionCheck.d.ts +1 -1
  9. package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
  10. package/dist/src/connectionHelper/checks/Checker.d.ts +1 -1
  11. package/dist/src/connectionHelper/checks/Checker.d.ts.map +1 -1
  12. package/dist/src/index.d.ts +5 -7
  13. package/dist/src/index.d.ts.map +1 -1
  14. package/dist/src/proto/livekit_models.d.ts +5 -0
  15. package/dist/src/proto/livekit_models.d.ts.map +1 -1
  16. package/dist/src/proto/livekit_rtc.d.ts +32 -0
  17. package/dist/src/proto/livekit_rtc.d.ts.map +1 -1
  18. package/dist/src/room/RTCEngine.d.ts +5 -3
  19. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  20. package/dist/src/room/Room.d.ts +19 -15
  21. package/dist/src/room/Room.d.ts.map +1 -1
  22. package/dist/src/room/events.d.ts +15 -0
  23. package/dist/src/room/events.d.ts.map +1 -1
  24. package/dist/src/room/participant/LocalParticipant.d.ts +14 -2
  25. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  26. package/dist/src/room/participant/Participant.d.ts +4 -2
  27. package/dist/src/room/participant/Participant.d.ts.map +1 -1
  28. package/dist/src/room/participant/RemoteParticipant.d.ts +2 -2
  29. package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
  30. package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
  31. package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
  32. package/dist/src/room/track/LocalTrack.d.ts +1 -1
  33. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  34. package/dist/src/room/track/LocalTrackPublication.d.ts +1 -1
  35. package/dist/src/room/track/LocalTrackPublication.d.ts.map +1 -1
  36. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  37. package/dist/src/room/track/RemoteAudioTrack.d.ts +1 -1
  38. package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
  39. package/dist/src/room/track/create.d.ts.map +1 -1
  40. package/dist/src/room/types.d.ts +1 -0
  41. package/dist/src/room/types.d.ts.map +1 -1
  42. package/dist/ts4.2/src/api/SignalClient.d.ts +14 -10
  43. package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +1 -1
  44. package/dist/ts4.2/src/connectionHelper/checks/Checker.d.ts +1 -1
  45. package/dist/ts4.2/src/index.d.ts +6 -7
  46. package/dist/ts4.2/src/proto/livekit_models.d.ts +5 -0
  47. package/dist/ts4.2/src/proto/livekit_rtc.d.ts +32 -0
  48. package/dist/ts4.2/src/room/RTCEngine.d.ts +5 -3
  49. package/dist/ts4.2/src/room/Room.d.ts +19 -15
  50. package/dist/ts4.2/src/room/events.d.ts +15 -0
  51. package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +14 -2
  52. package/dist/ts4.2/src/room/participant/Participant.d.ts +4 -2
  53. package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +2 -2
  54. package/dist/ts4.2/src/room/track/LocalTrack.d.ts +1 -1
  55. package/dist/ts4.2/src/room/track/LocalTrackPublication.d.ts +1 -1
  56. package/dist/ts4.2/src/room/track/RemoteAudioTrack.d.ts +1 -1
  57. package/dist/ts4.2/src/room/types.d.ts +1 -0
  58. package/package.json +4 -3
  59. package/src/api/SignalClient.ts +38 -26
  60. package/src/connectionHelper/ConnectionCheck.ts +1 -2
  61. package/src/connectionHelper/checks/Checker.ts +1 -1
  62. package/src/connectionHelper/checks/reconnect.ts +1 -1
  63. package/src/index.ts +8 -10
  64. package/src/proto/livekit_models.ts +15 -0
  65. package/src/room/RTCEngine.ts +32 -11
  66. package/src/room/RegionUrlProvider.ts +1 -1
  67. package/src/room/Room.ts +102 -70
  68. package/src/room/events.ts +17 -0
  69. package/src/room/participant/LocalParticipant.ts +30 -7
  70. package/src/room/participant/Participant.ts +27 -3
  71. package/src/room/participant/RemoteParticipant.ts +6 -3
  72. package/src/room/participant/publishUtils.test.ts +1 -1
  73. package/src/room/participant/publishUtils.ts +1 -1
  74. package/src/room/track/LocalAudioTrack.ts +1 -1
  75. package/src/room/track/LocalTrack.ts +2 -2
  76. package/src/room/track/LocalTrackPublication.ts +1 -1
  77. package/src/room/track/LocalVideoTrack.ts +3 -3
  78. package/src/room/track/RemoteAudioTrack.ts +1 -1
  79. package/src/room/track/RemoteVideoTrack.test.ts +1 -1
  80. package/src/room/track/RemoteVideoTrack.ts +3 -3
  81. package/src/room/track/create.ts +2 -2
  82. package/src/room/types.ts +11 -0
@@ -1,17 +1,17 @@
1
1
  import { debounce } from 'ts-debounce';
2
2
  import log from '../../logger';
3
3
  import { TrackEvent } from '../events';
4
- import { computeBitrate, VideoReceiverStats } from '../stats';
4
+ import { VideoReceiverStats, computeBitrate } from '../stats';
5
5
  import CriticalTimers from '../timers';
6
6
  import {
7
+ ObservableMediaElement,
7
8
  getDevicePixelRatio,
8
9
  getIntersectionObserver,
9
10
  getResizeObserver,
10
11
  isWeb,
11
- ObservableMediaElement,
12
12
  } from '../utils';
13
13
  import RemoteTrack from './RemoteTrack';
14
- import { attachToElement, detachTrack, Track } from './Track';
14
+ import { Track, attachToElement, detachTrack } from './Track';
15
15
  import type { AdaptiveStreamSettings } from './types';
16
16
 
17
17
  const REACTION_DELAY = 100;
@@ -1,10 +1,11 @@
1
1
  import DeviceManager from '../DeviceManager';
2
+ import { audioDefaults, videoDefaults } from '../defaults';
2
3
  import { DeviceUnsupportedError, TrackInvalidError } from '../errors';
3
4
  import { mediaTrackToLocalTrack } from '../participant/publishUtils';
4
- import { audioDefaults, videoDefaults } from '../defaults';
5
5
  import LocalAudioTrack from './LocalAudioTrack';
6
6
  import type LocalTrack from './LocalTrack';
7
7
  import LocalVideoTrack from './LocalVideoTrack';
8
+ import { Track } from './Track';
8
9
  import {
9
10
  AudioCaptureOptions,
10
11
  CreateLocalTracksOptions,
@@ -12,7 +13,6 @@ import {
12
13
  VideoCaptureOptions,
13
14
  VideoPresets,
14
15
  } from './options';
15
- import { Track } from './Track';
16
16
  import { constraintsForOptions, mergeDefaultOptions } from './utils';
17
17
 
18
18
  /**
package/src/room/types.ts CHANGED
@@ -26,3 +26,14 @@ export type LiveKitReactNativeInfo = {
26
26
  platform: 'ios' | 'android' | 'windows' | 'macos' | 'web' | 'native';
27
27
  devicePixelRatio: number;
28
28
  };
29
+
30
+ export type SimulationScenario =
31
+ | 'signal-reconnect'
32
+ | 'speaker'
33
+ | 'node-failure'
34
+ | 'server-leave'
35
+ | 'migration'
36
+ | 'resume-reconnect'
37
+ | 'force-tcp'
38
+ | 'force-tls'
39
+ | 'full-reconnect';