livekit-client 1.9.6 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +1318 -885
- 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 -1
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/proto/livekit_models.d.ts +108 -10
- package/dist/src/proto/livekit_models.d.ts.map +1 -1
- package/dist/src/proto/livekit_rtc.d.ts +513 -194
- package/dist/src/proto/livekit_rtc.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +3 -2
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +5 -1
- package/dist/src/room/events.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +2 -2
- package/dist/src/room/participant/Participant.d.ts.map +1 -1
- package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/publishUtils.d.ts +8 -0
- package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts +32 -0
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteTrackPublication.d.ts +4 -1
- package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
- package/dist/src/room/track/TrackPublication.d.ts +2 -1
- package/dist/src/room/track/TrackPublication.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +1 -1
- package/dist/src/room/track/options.d.ts.map +1 -1
- package/dist/src/room/track/processor/types.d.ts +19 -0
- package/dist/src/room/track/processor/types.d.ts.map +1 -0
- package/dist/src/utils/browserParser.d.ts.map +1 -1
- package/dist/ts4.2/src/api/SignalClient.d.ts +2 -1
- package/dist/ts4.2/src/index.d.ts +1 -0
- package/dist/ts4.2/src/proto/livekit_models.d.ts +126 -12
- package/dist/ts4.2/src/proto/livekit_rtc.d.ts +617 -254
- package/dist/ts4.2/src/room/Room.d.ts +3 -2
- package/dist/ts4.2/src/room/events.d.ts +5 -1
- package/dist/ts4.2/src/room/participant/Participant.d.ts +2 -2
- package/dist/ts4.2/src/room/participant/publishUtils.d.ts +8 -0
- package/dist/ts4.2/src/room/track/LocalTrack.d.ts +32 -0
- package/dist/ts4.2/src/room/track/RemoteTrackPublication.d.ts +4 -1
- package/dist/ts4.2/src/room/track/TrackPublication.d.ts +2 -1
- package/dist/ts4.2/src/room/track/options.d.ts +1 -1
- package/dist/ts4.2/src/room/track/processor/types.d.ts +19 -0
- package/package.json +14 -13
- package/src/api/SignalClient.ts +8 -1
- package/src/index.ts +1 -0
- package/src/proto/google/protobuf/timestamp.ts +3 -3
- package/src/proto/livekit_models.ts +254 -161
- package/src/proto/livekit_rtc.ts +334 -180
- package/src/room/Room.ts +26 -1
- package/src/room/events.ts +4 -0
- package/src/room/participant/LocalParticipant.ts +23 -3
- package/src/room/participant/Participant.ts +2 -1
- package/src/room/participant/RemoteParticipant.ts +4 -1
- package/src/room/participant/publishUtils.ts +68 -12
- package/src/room/track/LocalTrack.ts +120 -16
- package/src/room/track/LocalVideoTrack.ts +96 -33
- package/src/room/track/RemoteTrackPublication.ts +8 -1
- package/src/room/track/Track.ts +3 -3
- package/src/room/track/TrackPublication.ts +2 -1
- package/src/room/track/options.ts +1 -1
- package/src/room/track/processor/types.ts +20 -0
- package/src/utils/browserParser.ts +1 -4
@@ -1,7 +1,7 @@
|
|
1
1
|
import { EventEmitter } from 'events';
|
2
2
|
import type TypedEventEmitter from 'typed-emitter';
|
3
3
|
import log from '../../logger';
|
4
|
-
import type { TrackInfo } from '../../proto/livekit_models';
|
4
|
+
import type { SubscriptionError, TrackInfo } from '../../proto/livekit_models';
|
5
5
|
import type { UpdateSubscription, UpdateTrackSettings } from '../../proto/livekit_rtc';
|
6
6
|
import { TrackEvent } from '../events';
|
7
7
|
import LocalAudioTrack from './LocalAudioTrack';
|
@@ -146,4 +146,5 @@ export type PublicationEventCallbacks = {
|
|
146
146
|
status: TrackPublication.SubscriptionStatus,
|
147
147
|
prevStatus: TrackPublication.SubscriptionStatus,
|
148
148
|
) => void;
|
149
|
+
subscriptionFailed: (error: SubscriptionError) => void;
|
149
150
|
};
|
@@ -284,7 +284,7 @@ export function isCodecEqual(c1: string | undefined, c2: string | undefined): bo
|
|
284
284
|
/**
|
285
285
|
* scalability modes for svc, only supprot l3t3 now.
|
286
286
|
*/
|
287
|
-
export type ScalabilityMode = 'L3T3';
|
287
|
+
export type ScalabilityMode = 'L3T3' | 'L3T3_KEY';
|
288
288
|
|
289
289
|
export namespace AudioPresets {
|
290
290
|
export const telephone: AudioPreset = {
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { Track } from '../Track';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @experimental
|
5
|
+
*/
|
6
|
+
export type ProcessorOptions<T extends Track.Kind> = {
|
7
|
+
kind: T;
|
8
|
+
track: MediaStreamTrack;
|
9
|
+
element?: HTMLMediaElement;
|
10
|
+
};
|
11
|
+
|
12
|
+
/**
|
13
|
+
* @experimental
|
14
|
+
*/
|
15
|
+
export interface TrackProcessor<T extends Track.Kind> {
|
16
|
+
name: string;
|
17
|
+
init: (opts: ProcessorOptions<T>) => void;
|
18
|
+
destroy: () => Promise<void>;
|
19
|
+
processedTrack?: MediaStreamTrack;
|
20
|
+
}
|
@@ -16,10 +16,7 @@ let browserDetails: BrowserDetails | undefined;
|
|
16
16
|
* @internal
|
17
17
|
*/
|
18
18
|
export function getBrowser(userAgent?: string, force = true) {
|
19
|
-
if (
|
20
|
-
userAgent === undefined &&
|
21
|
-
(typeof document !== 'undefined' || typeof navigator === 'undefined')
|
22
|
-
) {
|
19
|
+
if (typeof userAgent === 'undefined' && typeof navigator === 'undefined') {
|
23
20
|
return;
|
24
21
|
}
|
25
22
|
const ua = (userAgent ?? navigator.userAgent).toLowerCase();
|