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.
- package/README.md +3 -2
- package/dist/livekit-client.esm.mjs +13470 -13341
- 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/RTCEngine.d.ts +5 -3
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +19 -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/types.d.ts +1 -0
- package/dist/src/room/types.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 +19 -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/types.d.ts +1 -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/RTCEngine.ts +32 -11
- package/src/room/RegionUrlProvider.ts +1 -1
- package/src/room/Room.ts +102 -70
- package/src/room/events.ts +17 -0
- package/src/room/participant/LocalParticipant.ts +30 -7
- 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 +1 -1
- 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/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 {
|
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
|
14
|
+
import { Track, attachToElement, detachTrack } from './Track';
|
15
15
|
import type { AdaptiveStreamSettings } from './types';
|
16
16
|
|
17
17
|
const REACTION_DELAY = 100;
|
package/src/room/track/create.ts
CHANGED
@@ -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';
|