livekit-client 1.15.10 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +21 -17
- package/dist/livekit-client.esm.mjs +1603 -1493
- 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 +1 -3
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/options.d.ts +3 -9
- package/dist/src/options.d.ts.map +1 -1
- package/dist/src/proto/livekit_models_pb.d.ts +47 -0
- package/dist/src/proto/livekit_models_pb.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +1 -0
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +14 -16
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/defaults.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +0 -4
- package/dist/src/room/events.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts +8 -25
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +6 -10
- package/dist/src/room/participant/Participant.d.ts.map +1 -1
- package/dist/src/room/participant/RemoteParticipant.d.ts +9 -6
- package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
- package/dist/src/room/timers.d.ts +4 -5
- package/dist/src/room/timers.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts +3 -3
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteTrackPublication.d.ts +2 -2
- package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
- package/dist/src/room/track/Track.d.ts +5 -0
- package/dist/src/room/track/Track.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +0 -5
- package/dist/src/room/track/options.d.ts.map +1 -1
- package/dist/src/room/types.d.ts +11 -3
- package/dist/src/room/types.d.ts.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/ts4.2/src/api/SignalClient.d.ts +1 -3
- package/dist/ts4.2/src/index.d.ts +3 -3
- package/dist/ts4.2/src/options.d.ts +3 -9
- package/dist/ts4.2/src/proto/livekit_models_pb.d.ts +47 -0
- package/dist/ts4.2/src/room/RTCEngine.d.ts +1 -0
- package/dist/ts4.2/src/room/Room.d.ts +14 -16
- package/dist/ts4.2/src/room/events.d.ts +0 -4
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +8 -25
- package/dist/ts4.2/src/room/participant/Participant.d.ts +6 -10
- package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +9 -6
- package/dist/ts4.2/src/room/timers.d.ts +4 -5
- package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +3 -3
- package/dist/ts4.2/src/room/track/RemoteTrackPublication.d.ts +2 -2
- package/dist/ts4.2/src/room/track/Track.d.ts +5 -0
- package/dist/ts4.2/src/room/track/options.d.ts +0 -5
- package/dist/ts4.2/src/room/types.d.ts +11 -3
- package/dist/ts4.2/src/version.d.ts +1 -1
- package/package.json +8 -7
- package/src/api/SignalClient.ts +10 -10
- package/src/e2ee/E2eeManager.ts +2 -2
- package/src/index.ts +2 -4
- package/src/options.ts +3 -10
- package/src/proto/livekit_models_pb.ts +66 -0
- package/src/room/RTCEngine.ts +6 -1
- package/src/room/Room.ts +169 -129
- package/src/room/defaults.ts +1 -5
- package/src/room/events.ts +0 -5
- package/src/room/participant/LocalParticipant.ts +36 -77
- package/src/room/participant/Participant.ts +23 -24
- package/src/room/participant/RemoteParticipant.ts +27 -24
- package/src/room/track/LocalVideoTrack.test.ts +1 -1
- package/src/room/track/LocalVideoTrack.ts +11 -7
- package/src/room/track/RemoteTrackPublication.ts +2 -7
- package/src/room/track/Track.ts +10 -1
- package/src/room/track/options.ts +0 -6
- package/src/room/types.ts +11 -4
- package/src/version.ts +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Participant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/Participant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAY,EAAe,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAC7E,OAAO,EACL,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,iBAAiB,IAAI,YAAY,EACjC,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,qBAAqB,MAAM,gCAAgC,CAAC;AAExE,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,sBAAsB,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,oBAAY,iBAAiB;IAC3B,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;IACb;;;OAGG;IACH,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;0CAiBmE,aAAa,yBAAyB,CAAC;AAA3G,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,gBAAmE;IAC1G,SAAS,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;IAE5C,
|
1
|
+
{"version":3,"file":"Participant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/Participant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAY,EAAe,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAC7E,OAAO,EACL,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,iBAAiB,IAAI,YAAY,EACjC,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,qBAAqB,MAAM,gCAAgC,CAAC;AAExE,OAAO,KAAK,WAAW,MAAM,sBAAsB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AK,IAAI,CAAC;IAC1C,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,6BAA6B,EAAE,CAAC,eAAe,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjF,8BAA8B,EAAE,CAC9B,WAAW,EAAE,sBAAsB,EACnC,MAAM,EAAE,gBAAgB,CAAC,kBAAkB,KACxC,IAAI,CAAC;CACX,CAAC"}
|
@@ -8,9 +8,9 @@ import type { LoggerOptions } from '../types';
|
|
8
8
|
import Participant from './Participant';
|
9
9
|
import type { ParticipantEventCallbacks } from './Participant';
|
10
10
|
export default class RemoteParticipant extends Participant {
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
audioTrackPublications: Map<string, RemoteTrackPublication>;
|
12
|
+
videoTrackPublications: Map<string, RemoteTrackPublication>;
|
13
|
+
trackPublications: Map<string, RemoteTrackPublication>;
|
14
14
|
signalClient: SignalClient;
|
15
15
|
private volumeMap;
|
16
16
|
private audioOutput?;
|
@@ -19,8 +19,8 @@ export default class RemoteParticipant extends Participant {
|
|
19
19
|
/** @internal */
|
20
20
|
constructor(signalClient: SignalClient, sid: string, identity?: string, name?: string, metadata?: string, loggerOptions?: LoggerOptions);
|
21
21
|
protected addTrackPublication(publication: RemoteTrackPublication): void;
|
22
|
-
|
23
|
-
|
22
|
+
getTrackPublication(source: Track.Source): RemoteTrackPublication | undefined;
|
23
|
+
getTrackPublicationByName(name: string): RemoteTrackPublication | undefined;
|
24
24
|
/**
|
25
25
|
* sets the volume on the participant's audio track
|
26
26
|
* by default, this affects the microphone publication
|
@@ -36,7 +36,10 @@ export default class RemoteParticipant extends Participant {
|
|
36
36
|
addSubscribedMediaTrack(mediaTrack: MediaStreamTrack, sid: Track.SID, mediaStream: MediaStream, receiver?: RTCRtpReceiver, adaptiveStreamSettings?: AdaptiveStreamSettings, triesLeft?: number): RemoteTrackPublication | undefined;
|
37
37
|
/** @internal */
|
38
38
|
get hasMetadata(): boolean;
|
39
|
-
|
39
|
+
/**
|
40
|
+
* @internal
|
41
|
+
*/
|
42
|
+
getTrackPublicationBySid(sid: Track.SID): RemoteTrackPublication | undefined;
|
40
43
|
/** @internal */
|
41
44
|
updateInfo(info: ParticipantInfo): boolean;
|
42
45
|
/** @internal */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/RemoteParticipant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,+BAA+B,CAAC;AAKxF,OAAO,sBAAsB,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE/D,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,
|
1
|
+
{"version":3,"file":"RemoteParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/RemoteParticipant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,+BAA+B,CAAC;AAKxF,OAAO,sBAAsB,MAAM,iCAAiC,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7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0C;IAS3F,gBAAgB;IAChB,uBAAuB,CACrB,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,WAAW,EAAE,WAAW,EACxB,QAAQ,CAAC,EAAE,cAAc,EACzB,sBAAsB,CAAC,EAAE,sBAAsB,EAC/C,SAAS,CAAC,EAAE,MAAM;IA8EpB,gBAAgB;IAChB,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;OAEG;IACH,wBAAwB,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,GAAG,sBAAsB,GAAG,SAAS;IAI5E,gBAAgB;IAChB,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO;IAmE1C,gBAAgB;IAChB,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,aAAa,CAAC,EAAE,OAAO;IAiCtD;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,kBAAkB;IAW/C,gBAAgB;IAChB,IAAI,CAAC,CAAC,SAAS,MAAM,yBAAyB,EAC5C,KAAK,EAAE,CAAC,EACR,GAAG,IAAI,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,GAChD,OAAO;CAIX"}
|
@@ -1,13 +1,12 @@
|
|
1
|
-
/// <reference types="node" />
|
2
1
|
/**
|
3
2
|
* Timers that can be overridden with platform specific implementations
|
4
3
|
* that ensure that they are fired. These should be used when it is critical
|
5
4
|
* that the timer fires on time.
|
6
5
|
*/
|
7
6
|
export default class CriticalTimers {
|
8
|
-
static setTimeout: (
|
9
|
-
static setInterval: (
|
10
|
-
static clearTimeout: (
|
11
|
-
static clearInterval: (
|
7
|
+
static setTimeout: (handler: TimerHandler, timeout?: number | undefined, ...arguments: any[]) => number;
|
8
|
+
static setInterval: (handler: TimerHandler, timeout?: number | undefined, ...arguments: any[]) => number;
|
9
|
+
static clearTimeout: (id: number | undefined) => void;
|
10
|
+
static clearInterval: (id: number | undefined) => void;
|
12
11
|
}
|
13
12
|
//# sourceMappingURL=timers.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"timers.d.ts","sourceRoot":"","sources":["../../../src/room/timers.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"timers.d.ts","sourceRoot":"","sources":["../../../src/room/timers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IAEjC,MAAM,CAAC,UAAU,uFAAmE;IAGpF,MAAM,CAAC,WAAW,uFAAqE;IAEvF,MAAM,CAAC,YAAY,mCAAuE;IAE1F,MAAM,CAAC,aAAa,mCAAyE;CAC9F"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import type { SignalClient } from '../../api/SignalClient';
|
2
|
-
import { VideoLayer
|
2
|
+
import { VideoLayer } from '../../proto/livekit_models_pb';
|
3
3
|
import { SubscribedCodec, SubscribedQuality } from '../../proto/livekit_rtc_pb';
|
4
4
|
import type { VideoSenderStats } from '../stats';
|
5
5
|
import type { LoggerOptions } from '../types';
|
6
6
|
import LocalTrack from './LocalTrack';
|
7
|
-
import { Track } from './Track';
|
7
|
+
import { Track, VideoQuality } from './Track';
|
8
8
|
import type { VideoCaptureOptions, VideoCodec } from './options';
|
9
9
|
import type { TrackProcessor } from './processor/types';
|
10
10
|
export declare class SimulcastTrackInfo {
|
@@ -41,7 +41,7 @@ export default class LocalVideoTrack extends LocalTrack {
|
|
41
41
|
setDeviceId(deviceId: ConstrainDOMString): Promise<boolean>;
|
42
42
|
restartTrack(options?: VideoCaptureOptions): Promise<void>;
|
43
43
|
setProcessor(processor: TrackProcessor<Track.Kind>, showProcessedStreamLocally?: boolean): Promise<void>;
|
44
|
-
addSimulcastTrack(codec: VideoCodec, encodings?: RTCRtpEncodingParameters[]): SimulcastTrackInfo;
|
44
|
+
addSimulcastTrack(codec: VideoCodec, encodings?: RTCRtpEncodingParameters[]): SimulcastTrackInfo | undefined;
|
45
45
|
setSimulcastTrackSender(codec: VideoCodec, sender: RTCRtpSender): void;
|
46
46
|
/**
|
47
47
|
* @internal
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalVideoTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/LocalVideoTrack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,
|
1
|
+
{"version":3,"file":"LocalVideoTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/LocalVideoTrack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAqC,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,qBAAa,kBAAkB;IAC7B,KAAK,EAAE,UAAU,CAAC;IAElB,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB,SAAS,CAAC,EAAE,wBAAwB,EAAE,CAAC;gBAE3B,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,gBAAgB;CAIlE;AAID,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU;IAErD,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,OAAO,CAAC,SAAS,CAAC,CAAgC;IAElD,OAAO,CAAC,SAAS,CAAC,CAA6B;IAG/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E,MAAM,GAAG,YAAY,CAW5D;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,wBAAwB,EAAE,EACtC,GAAG,CAAC,EAAE,OAAO,GACZ,UAAU,EAAE,CA6Cd"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { SubscriptionError, TrackInfo
|
1
|
+
import { SubscriptionError, TrackInfo } from '../../proto/livekit_models_pb';
|
2
2
|
import type { LoggerOptions } from '../types';
|
3
3
|
import type RemoteTrack from './RemoteTrack';
|
4
|
-
import { Track } from './Track';
|
4
|
+
import { Track, VideoQuality } from './Track';
|
5
5
|
import { TrackPublication } from './TrackPublication';
|
6
6
|
export default class RemoteTrackPublication extends TrackPublication {
|
7
7
|
track?: RemoteTrack;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteTrackPublication.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteTrackPublication.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"RemoteTrackPublication.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteTrackPublication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,iBAAiB,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAGhG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,gBAAgB;IAClE,KAAK,CAAC,EAAE,WAAW,CAAa;IAEhC,gBAAgB;IAChB,SAAS,CAAC,OAAO,UAAQ;IAGzB,SAAS,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAE/B,SAAS,CAAC,QAA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WAAW,UAGzC;IAEF,SAAS,KAAK,gBAAgB,IAAI,OAAO,CAExC;IAED,SAAS,CAAC,sBAAsB,YAAa,OAAO,UAOlD;IAEF,SAAS,CAAC,2BAA2B,eAAgB,MAAM,UAAU,UAOnE;IAGF,eAAe;CAkBhB"}
|
@@ -4,6 +4,11 @@ import { StructuredLogger } from '../../logger';
|
|
4
4
|
import { TrackSource, TrackType } from '../../proto/livekit_models_pb';
|
5
5
|
import { StreamState as ProtoStreamState } from '../../proto/livekit_rtc_pb';
|
6
6
|
import type { LoggerOptions } from '../types';
|
7
|
+
export declare enum VideoQuality {
|
8
|
+
LOW = 0,
|
9
|
+
MEDIUM = 1,
|
10
|
+
HIGH = 2
|
11
|
+
}
|
7
12
|
declare const Track_base: new () => TypedEventEmitter<TrackEventCallbacks>;
|
8
13
|
export declare abstract class Track extends Track_base {
|
9
14
|
kind: Track.Kind;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Track.d.ts","sourceRoot":"","sources":["../../../../src/room/track/Track.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAY,EAAe,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAC7E,OAAO,
|
1
|
+
{"version":3,"file":"Track.d.ts","sourceRoot":"","sources":["../../../../src/room/track/Track.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAY,EAAe,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAC7E,OAAO,EAEL,WAAW,EACX,SAAS,EACV,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC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AC;IACrC,eAAe,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACvC,CAAC"}
|
@@ -28,11 +28,6 @@ export interface TrackPublishDefaults {
|
|
28
28
|
* as backup. (TBD)
|
29
29
|
*/
|
30
30
|
videoCodec?: VideoCodec;
|
31
|
-
/**
|
32
|
-
* max audio bitrate, defaults to [[AudioPresets.music]]
|
33
|
-
* @deprecated use `audioPreset` instead
|
34
|
-
*/
|
35
|
-
audioBitrate?: number;
|
36
31
|
/**
|
37
32
|
* which audio preset should be used for publishing (audio) tracks
|
38
33
|
* defaults to [[AudioPresets.music]]
|
@@ -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;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG;QAAE,KAAK,EAAE,gBAAgB,CAAC;QAAC,QAAQ,CAAC,EAAE,aAAa,CAAA;KAAE,CAAC;IAEnF;;OAEG;IACH,mBAAmB,CAAC,EAAE,aAAa,CAAC;IAEpC;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,
|
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;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG;QAAE,KAAK,EAAE,gBAAgB,CAAC;QAAC,QAAQ,CAAC,EAAE,aAAa,CAAA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,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;;;;;;;;;CAUrB,CAAC"}
|
package/dist/src/room/types.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import type RemoteParticipant from './participant/RemoteParticipant';
|
2
1
|
export type SimulationOptions = {
|
3
2
|
publish?: {
|
4
3
|
audio?: boolean;
|
@@ -13,8 +12,17 @@ export type SimulationOptions = {
|
|
13
12
|
};
|
14
13
|
};
|
15
14
|
export type DataPublishOptions = {
|
16
|
-
/**
|
17
|
-
|
15
|
+
/**
|
16
|
+
* whether to send this as reliable or lossy.
|
17
|
+
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
18
|
+
* For data that should arrive as quickly as possible, but you are ok with dropped
|
19
|
+
* packets, use Lossy.
|
20
|
+
*/
|
21
|
+
reliable?: boolean;
|
22
|
+
/**
|
23
|
+
* the identities of participants who will receive the message, will be sent to every one if empty
|
24
|
+
*/
|
25
|
+
destinationIdentities?: string[];
|
18
26
|
/** the topic under which the message gets published */
|
19
27
|
topic?: string;
|
20
28
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/room/types.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/room/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IAEnC,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACrE,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,kBAAkB,GAClB,SAAS,GACT,cAAc,GACd,cAAc,GACd,WAAW,GACX,kBAAkB,GAClB,WAAW,GACX,WAAW,GACX,gBAAgB,GAIhB,sBAAsB,GACtB,6BAA6B,GAC7B,yCAAyC,CAAC;AAE9C,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD,CAAC"}
|
package/dist/src/version.d.ts
CHANGED
@@ -12,8 +12,6 @@ interface ConnectOpts extends SignalOptions {
|
|
12
12
|
}
|
13
13
|
export interface SignalOptions {
|
14
14
|
autoSubscribe: boolean;
|
15
|
-
/** @deprecated */
|
16
|
-
publishOnly?: string;
|
17
15
|
adaptiveStream?: boolean;
|
18
16
|
maxRetries: number;
|
19
17
|
e2eeEnabled: boolean;
|
@@ -76,7 +74,7 @@ export declare class SignalClient {
|
|
76
74
|
private connect;
|
77
75
|
/** @internal */
|
78
76
|
resetCallbacks: () => void;
|
79
|
-
close(): Promise<void>;
|
77
|
+
close(updateState?: boolean): Promise<void>;
|
80
78
|
sendOffer(offer: RTCSessionDescriptionInit): void;
|
81
79
|
sendAnswer(answer: RTCSessionDescriptionInit): Promise<void>;
|
82
80
|
sendIceCandidate(candidate: RTCIceCandidateInit, target: SignalTarget): Promise<void>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { LogLevel, getLogger, setLogExtension, setLogLevel } from './logger';
|
2
|
-
import { DataPacket_Kind, DisconnectReason
|
2
|
+
import { DataPacket_Kind, DisconnectReason } from './proto/livekit_models_pb';
|
3
3
|
import DefaultReconnectPolicy from './room/DefaultReconnectPolicy';
|
4
|
-
import Room, { ConnectionState
|
4
|
+
import Room, { ConnectionState } from './room/Room';
|
5
5
|
import LocalParticipant from './room/participant/LocalParticipant';
|
6
6
|
import Participant, { ConnectionQuality } from './room/participant/Participant';
|
7
7
|
import type { ParticipantTrackPermission } from './room/participant/ParticipantTrackPermission';
|
@@ -33,6 +33,6 @@ export type { DataPublishOptions, SimulationScenario } from './room/types';
|
|
33
33
|
export * from './version';
|
34
34
|
export * from './e2ee';
|
35
35
|
export * from './room/track/processor/types';
|
36
|
-
export { setLogLevel, setLogExtension, getEmptyAudioStreamTrack, getEmptyVideoStreamTrack, isBrowserSupported, supportsAdaptiveStream, supportsDynacast, supportsAV1, supportsVP9, createAudioAnalyser, LogLevel, getLogger, Room, ConnectionState,
|
36
|
+
export { setLogLevel, setLogExtension, getEmptyAudioStreamTrack, getEmptyVideoStreamTrack, isBrowserSupported, supportsAdaptiveStream, supportsDynacast, supportsAV1, supportsVP9, createAudioAnalyser, LogLevel, getLogger, Room, ConnectionState, DataPacket_Kind, DisconnectReason, Participant, RemoteParticipant, LocalParticipant, LocalAudioTrack, LocalVideoTrack, LocalTrack, LocalTrackPublication, RemoteTrack, RemoteAudioTrack, RemoteVideoTrack, RemoteTrackPublication, TrackPublication, ConnectionQuality, DefaultReconnectPolicy, CriticalTimers, };
|
37
37
|
export type { ElementInfo, ParticipantTrackPermission, AudioAnalyserOptions, LiveKitReactNativeInfo, };
|
38
38
|
//# sourceMappingURL=index.d.ts.map
|
@@ -64,11 +64,10 @@ export interface InternalRoomOptions {
|
|
64
64
|
*/
|
65
65
|
expSignalLatency?: number;
|
66
66
|
/**
|
67
|
-
*
|
68
|
-
*
|
69
|
-
* experimental flag, mix all audio tracks in web audio
|
67
|
+
* mix all audio tracks in web audio, helps to tackle some audio auto playback issues
|
68
|
+
* allows for passing in your own AudioContext instance, too
|
70
69
|
*/
|
71
|
-
|
70
|
+
webAudioMix: boolean | WebAudioSettings;
|
72
71
|
/**
|
73
72
|
* @experimental
|
74
73
|
*/
|
@@ -92,11 +91,6 @@ export interface InternalRoomConnectOptions {
|
|
92
91
|
* use to override any RTCConfiguration options.
|
93
92
|
*/
|
94
93
|
rtcConfig?: RTCConfiguration;
|
95
|
-
/**
|
96
|
-
* @deprecated
|
97
|
-
* publish only mode
|
98
|
-
*/
|
99
|
-
publishOnly?: string;
|
100
94
|
/** specifies how often an initial join connection is allowed to retry (only applicable if server is not reachable) */
|
101
95
|
maxRetries: number;
|
102
96
|
/** amount of time for Websocket connection to be established, defaults to 15s */
|
@@ -283,6 +283,10 @@ export declare class Room extends Message<Room> {
|
|
283
283
|
* @generated from field: bool active_recording = 10;
|
284
284
|
*/
|
285
285
|
activeRecording: boolean;
|
286
|
+
/**
|
287
|
+
* @generated from field: livekit.TimedVersion version = 13;
|
288
|
+
*/
|
289
|
+
version?: TimedVersion;
|
286
290
|
constructor(data?: PartialMessage<Room>);
|
287
291
|
static readonly runtime: typeof proto3;
|
288
292
|
static readonly typeName = "livekit.Room";
|
@@ -452,6 +456,10 @@ export declare class ParticipantInfo extends Message<ParticipantInfo> {
|
|
452
456
|
* @generated from field: bool is_publisher = 13;
|
453
457
|
*/
|
454
458
|
isPublisher: boolean;
|
459
|
+
/**
|
460
|
+
* @generated from field: livekit.ParticipantInfo.Kind kind = 14;
|
461
|
+
*/
|
462
|
+
kind: ParticipantInfo_Kind;
|
455
463
|
constructor(data?: PartialMessage<ParticipantInfo>);
|
456
464
|
static readonly runtime: typeof proto3;
|
457
465
|
static readonly typeName = "livekit.ParticipantInfo";
|
@@ -490,6 +498,41 @@ export declare enum ParticipantInfo_State {
|
|
490
498
|
*/
|
491
499
|
DISCONNECTED = 3
|
492
500
|
}
|
501
|
+
/**
|
502
|
+
* @generated from enum livekit.ParticipantInfo.Kind
|
503
|
+
*/
|
504
|
+
export declare enum ParticipantInfo_Kind {
|
505
|
+
/**
|
506
|
+
* standard participants, e.g. web clients
|
507
|
+
*
|
508
|
+
* @generated from enum value: STANDARD = 0;
|
509
|
+
*/
|
510
|
+
STANDARD = 0,
|
511
|
+
/**
|
512
|
+
* only ingests streams
|
513
|
+
*
|
514
|
+
* @generated from enum value: INGRESS = 1;
|
515
|
+
*/
|
516
|
+
INGRESS = 1,
|
517
|
+
/**
|
518
|
+
* only consumes streams
|
519
|
+
*
|
520
|
+
* @generated from enum value: EGRESS = 2;
|
521
|
+
*/
|
522
|
+
EGRESS = 2,
|
523
|
+
/**
|
524
|
+
* SIP participants
|
525
|
+
*
|
526
|
+
* @generated from enum value: SIP = 3;
|
527
|
+
*/
|
528
|
+
SIP = 3,
|
529
|
+
/**
|
530
|
+
* LiveKit agents
|
531
|
+
*
|
532
|
+
* @generated from enum value: AGENT = 4;
|
533
|
+
*/
|
534
|
+
AGENT = 4
|
535
|
+
}
|
493
536
|
/**
|
494
537
|
* @generated from message livekit.Encryption
|
495
538
|
*/
|
@@ -636,6 +679,10 @@ export declare class TrackInfo extends Message<TrackInfo> {
|
|
636
679
|
* @generated from field: string stream = 17;
|
637
680
|
*/
|
638
681
|
stream: string;
|
682
|
+
/**
|
683
|
+
* @generated from field: livekit.TimedVersion version = 18;
|
684
|
+
*/
|
685
|
+
version?: TimedVersion;
|
639
686
|
constructor(data?: PartialMessage<TrackInfo>);
|
640
687
|
static readonly runtime: typeof proto3;
|
641
688
|
static readonly typeName = "livekit.TrackInfo";
|
@@ -19,8 +19,6 @@ export declare enum ConnectionState {
|
|
19
19
|
Connected = "connected",
|
20
20
|
Reconnecting = "reconnecting"
|
21
21
|
}
|
22
|
-
/** @deprecated RoomState has been renamed to [[ConnectionState]] */
|
23
|
-
export declare const RoomState: typeof ConnectionState;
|
24
22
|
declare const Room_base: new () => TypedEmitter<RoomEventCallbacks>;
|
25
23
|
/**
|
26
24
|
* In LiveKit, a room is the logical grouping for a list of participants.
|
@@ -32,8 +30,10 @@ declare const Room_base: new () => TypedEmitter<RoomEventCallbacks>;
|
|
32
30
|
*/
|
33
31
|
declare class Room extends Room_base {
|
34
32
|
state: ConnectionState;
|
35
|
-
/**
|
36
|
-
|
33
|
+
/**
|
34
|
+
* map of identity: [[RemoteParticipant]]
|
35
|
+
*/
|
36
|
+
remoteParticipants: Map<string, RemoteParticipant>;
|
37
37
|
/**
|
38
38
|
* list of participants that are actively speaking. when this changes
|
39
39
|
* a [[RoomEvent.ActiveSpeakersChanged]] event is fired
|
@@ -48,7 +48,7 @@ declare class Room extends Room_base {
|
|
48
48
|
/** reflects the sender encryption status of the local participant */
|
49
49
|
isE2EEEnabled: boolean;
|
50
50
|
private roomInfo?;
|
51
|
-
private
|
51
|
+
private sidToIdentity;
|
52
52
|
/** connect options of room */
|
53
53
|
private connOptions?;
|
54
54
|
private audioEnabled;
|
@@ -59,12 +59,13 @@ declare class Room extends Room_base {
|
|
59
59
|
private connectFuture?;
|
60
60
|
private disconnectLock;
|
61
61
|
private e2eeManager;
|
62
|
-
private cachedParticipantSids;
|
63
62
|
private connectionReconcileInterval?;
|
64
63
|
private regionUrlProvider?;
|
65
64
|
private regionUrl?;
|
66
65
|
private isVideoPlaybackBlocked;
|
67
66
|
private log;
|
67
|
+
private bufferedEvents;
|
68
|
+
private isResuming;
|
68
69
|
/**
|
69
70
|
* Creates a new Room, the primary construct for a LiveKit session.
|
70
71
|
* @param options
|
@@ -80,8 +81,11 @@ declare class Room extends Room_base {
|
|
80
81
|
* if the current room has a participant with `recorder: true` in its JWT grant
|
81
82
|
**/
|
82
83
|
get isRecording(): boolean;
|
83
|
-
/**
|
84
|
-
|
84
|
+
/**
|
85
|
+
* server assigned unique room id.
|
86
|
+
* returns once a sid has been issued by the server.
|
87
|
+
*/
|
88
|
+
getSid(): Promise<string>;
|
85
89
|
/** user assigned name, derived from JWT token */
|
86
90
|
get name(): string;
|
87
91
|
/** room metadata */
|
@@ -145,12 +149,6 @@ declare class Room extends Room_base {
|
|
145
149
|
* Returns true if video playback is enabled
|
146
150
|
*/
|
147
151
|
get canPlaybackVideo(): boolean;
|
148
|
-
/**
|
149
|
-
* Returns the active audio output device used in this room.
|
150
|
-
* @return the previously successfully set audio output device ID or an empty string if the default device is used.
|
151
|
-
* @deprecated use `getActiveDevice('audiooutput')` instead
|
152
|
-
*/
|
153
|
-
getActiveAudioOutputDevice(): string;
|
154
152
|
getActiveDevice(kind: MediaDeviceKind): string | undefined;
|
155
153
|
/**
|
156
154
|
* Switches all active devices used in this room to the given device.
|
@@ -193,9 +191,11 @@ declare class Room extends Room_base {
|
|
193
191
|
* subscription settings.
|
194
192
|
*/
|
195
193
|
private updateSubscriptions;
|
194
|
+
private getRemoteParticipantBySid;
|
196
195
|
private registerConnectionReconcile;
|
197
196
|
private clearConnectionReconcile;
|
198
197
|
private setAndEmitConnectionState;
|
198
|
+
private emitBufferedEvents;
|
199
199
|
private emitWhenConnected;
|
200
200
|
private onLocalParticipantMetadataChanged;
|
201
201
|
private onLocalParticipantNameChanged;
|
@@ -220,8 +220,6 @@ export type RoomEventCallbacks = {
|
|
220
220
|
reconnecting: () => void;
|
221
221
|
reconnected: () => void;
|
222
222
|
disconnected: (reason?: DisconnectReason) => void;
|
223
|
-
/** @deprecated stateChanged has been renamed to connectionStateChanged */
|
224
|
-
stateChanged: (state: ConnectionState) => void;
|
225
223
|
connectionStateChanged: (state: ConnectionState) => void;
|
226
224
|
mediaDevicesChanged: () => void;
|
227
225
|
participantConnected: (participant: RemoteParticipant) => void;
|
@@ -32,10 +32,6 @@ export declare enum RoomEvent {
|
|
32
32
|
* args: ([[ConnectionState]])
|
33
33
|
*/
|
34
34
|
ConnectionStateChanged = "connectionStateChanged",
|
35
|
-
/**
|
36
|
-
* @deprecated StateChanged has been renamed to ConnectionStateChanged
|
37
|
-
*/
|
38
|
-
StateChanged = "connectionStateChanged",
|
39
35
|
/**
|
40
36
|
* When input or output devices on the machine have changed.
|
41
37
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { InternalRoomOptions } from '../../options';
|
2
|
-
import {
|
2
|
+
import { ParticipantInfo, ParticipantPermission } from '../../proto/livekit_models_pb';
|
3
3
|
import type RTCEngine from '../RTCEngine';
|
4
4
|
import LocalTrack from '../track/LocalTrack';
|
5
5
|
import LocalTrackPublication from '../track/LocalTrackPublication';
|
@@ -8,12 +8,11 @@ import type { AudioCaptureOptions, BackupVideoCodec, CreateLocalTracksOptions, S
|
|
8
8
|
import type { DataPublishOptions } from '../types';
|
9
9
|
import Participant from './Participant';
|
10
10
|
import type { ParticipantTrackPermission } from './ParticipantTrackPermission';
|
11
|
-
import RemoteParticipant from './RemoteParticipant';
|
12
11
|
export default class LocalParticipant extends Participant {
|
13
|
-
|
14
|
-
|
12
|
+
audioTrackPublications: Map<string, LocalTrackPublication>;
|
13
|
+
videoTrackPublications: Map<string, LocalTrackPublication>;
|
15
14
|
/** map of track sid => all published tracks */
|
16
|
-
|
15
|
+
trackPublications: Map<string, LocalTrackPublication>;
|
17
16
|
/** @internal */
|
18
17
|
engine: RTCEngine;
|
19
18
|
/** @internal */
|
@@ -32,8 +31,8 @@ export default class LocalParticipant extends Participant {
|
|
32
31
|
get lastCameraError(): Error | undefined;
|
33
32
|
get lastMicrophoneError(): Error | undefined;
|
34
33
|
get isE2EEEnabled(): boolean;
|
35
|
-
|
36
|
-
|
34
|
+
getTrackPublication(source: Track.Source): LocalTrackPublication | undefined;
|
35
|
+
getTrackPublicationByName(name: string): LocalTrackPublication | undefined;
|
37
36
|
/**
|
38
37
|
* @internal
|
39
38
|
*/
|
@@ -123,25 +122,9 @@ export default class LocalParticipant extends Participant {
|
|
123
122
|
* participant in the room if the destination field in publishOptions is empty
|
124
123
|
*
|
125
124
|
* @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
|
126
|
-
* @param
|
127
|
-
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
128
|
-
* For data that should arrive as quickly as possible, but you are ok with dropped
|
129
|
-
* packets, use Lossy.
|
130
|
-
* @param publishOptions optionally specify a `topic` and `destination`
|
125
|
+
* @param options optionally specify a `reliable`, `topic` and `destination`
|
131
126
|
*/
|
132
|
-
publishData(data: Uint8Array,
|
133
|
-
/**
|
134
|
-
* Publish a new data payload to the room. Data will be forwarded to each
|
135
|
-
* participant in the room if the destination argument is empty
|
136
|
-
*
|
137
|
-
* @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
|
138
|
-
* @param kind whether to send this as reliable or lossy.
|
139
|
-
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
140
|
-
* For data that should arrive as quickly as possible, but you are ok with dropped
|
141
|
-
* packets, use Lossy.
|
142
|
-
* @param destination the participants who will receive the message
|
143
|
-
*/
|
144
|
-
publishData(data: Uint8Array, kind: DataPacket_Kind, destination?: RemoteParticipant[] | string[]): Promise<void>;
|
127
|
+
publishData(data: Uint8Array, options?: DataPublishOptions): Promise<void>;
|
145
128
|
/**
|
146
129
|
* Control who can subscribe to LocalParticipant's published tracks.
|
147
130
|
*
|
@@ -21,10 +21,10 @@ export declare enum ConnectionQuality {
|
|
21
21
|
declare const Participant_base: new () => TypedEmitter<ParticipantEventCallbacks>;
|
22
22
|
export default class Participant extends Participant_base {
|
23
23
|
protected participantInfo?: ParticipantInfo;
|
24
|
-
|
25
|
-
|
24
|
+
audioTrackPublications: Map<string, TrackPublication>;
|
25
|
+
videoTrackPublications: Map<string, TrackPublication>;
|
26
26
|
/** map of track sid => all published tracks */
|
27
|
-
|
27
|
+
trackPublications: Map<string, TrackPublication>;
|
28
28
|
/** audio level between 0-1.0, 1 being loudest, 0 being softest */
|
29
29
|
audioLevel: number;
|
30
30
|
/** if participant is currently speaking */
|
@@ -51,20 +51,16 @@ export default class Participant extends Participant_base {
|
|
51
51
|
get isAgent(): boolean;
|
52
52
|
/** @internal */
|
53
53
|
constructor(sid: string, identity: string, name?: string, metadata?: string, loggerOptions?: LoggerOptions);
|
54
|
-
|
54
|
+
getTrackPublications(): TrackPublication[];
|
55
55
|
/**
|
56
56
|
* Finds the first track that matches the source filter, for example, getting
|
57
57
|
* the user's camera track with getTrackBySource(Track.Source.Camera).
|
58
|
-
* @param source
|
59
|
-
* @returns
|
60
58
|
*/
|
61
|
-
|
59
|
+
getTrackPublication(source: Track.Source): TrackPublication | undefined;
|
62
60
|
/**
|
63
61
|
* Finds the first track that matches the track's name.
|
64
|
-
* @param name
|
65
|
-
* @returns
|
66
62
|
*/
|
67
|
-
|
63
|
+
getTrackPublicationByName(name: string): TrackPublication | undefined;
|
68
64
|
get connectionQuality(): ConnectionQuality;
|
69
65
|
get isCameraEnabled(): boolean;
|
70
66
|
get isMicrophoneEnabled(): boolean;
|