livekit-client 2.5.2 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +545 -154
- 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/room/Room.d.ts +4 -1
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +4 -1
- package/dist/src/room/events.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts +11 -1
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +2 -1
- package/dist/src/room/participant/Participant.d.ts.map +1 -1
- package/dist/src/room/types.d.ts +6 -0
- package/dist/src/room/types.d.ts.map +1 -1
- package/dist/src/room/utils.d.ts +3 -2
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/ts4.2/src/room/Room.d.ts +4 -1
- package/dist/ts4.2/src/room/events.d.ts +4 -1
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +11 -1
- package/dist/ts4.2/src/room/participant/Participant.d.ts +2 -1
- package/dist/ts4.2/src/room/types.d.ts +6 -0
- package/dist/ts4.2/src/room/utils.d.ts +3 -2
- package/package.json +4 -4
- package/src/room/Room.ts +27 -2
- package/src/room/events.ts +4 -0
- package/src/room/participant/LocalParticipant.ts +132 -44
- package/src/room/participant/Participant.ts +2 -1
- package/src/room/types.ts +7 -0
- package/src/room/utils.ts +17 -2
package/dist/src/room/Room.d.ts
CHANGED
@@ -12,7 +12,7 @@ import type RemoteTrack from './track/RemoteTrack';
|
|
12
12
|
import RemoteTrackPublication from './track/RemoteTrackPublication';
|
13
13
|
import { Track } from './track/Track';
|
14
14
|
import type { TrackPublication } from './track/TrackPublication';
|
15
|
-
import type { SimulationOptions, SimulationScenario, TranscriptionSegment } from './types';
|
15
|
+
import type { ChatMessage, SimulationOptions, SimulationScenario, TranscriptionSegment } from './types';
|
16
16
|
export declare enum ConnectionState {
|
17
17
|
Disconnected = "disconnected",
|
18
18
|
Connecting = "connecting",
|
@@ -183,6 +183,7 @@ declare class Room extends Room_base {
|
|
183
183
|
private handleSipDtmf;
|
184
184
|
bufferedSegments: Map<string, TranscriptionSegmentModel>;
|
185
185
|
private handleTranscription;
|
186
|
+
private handleChatMessage;
|
186
187
|
private handleAudioPlaybackStarted;
|
187
188
|
private handleAudioPlaybackFailed;
|
188
189
|
private handleVideoPlaybackStarted;
|
@@ -217,6 +218,7 @@ declare class Room extends Room_base {
|
|
217
218
|
private onLocalConnectionQualityChanged;
|
218
219
|
private onMediaDevicesError;
|
219
220
|
private onLocalParticipantPermissionsChanged;
|
221
|
+
private onLocalChatMessageSent;
|
220
222
|
/**
|
221
223
|
* Allows to populate a room with simulated participants.
|
222
224
|
* No actual connection to a server will be established, all state is
|
@@ -268,6 +270,7 @@ export type RoomEventCallbacks = {
|
|
268
270
|
encryptionError: (error: Error) => void;
|
269
271
|
dcBufferStatusChanged: (isLow: boolean, kind: DataPacket_Kind) => void;
|
270
272
|
activeDeviceChanged: (kind: MediaDeviceKind, deviceId: string) => void;
|
273
|
+
chatMessage: (message: ChatMessage, participant?: RemoteParticipant | LocalParticipant) => void;
|
271
274
|
localTrackSubscribed: (publication: LocalTrackPublication, participant: LocalParticipant) => void;
|
272
275
|
};
|
273
276
|
//# sourceMappingURL=Room.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/room/Room.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/room/Room.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,eAAe,EACf,gBAAgB,EAMhB,qBAAqB,EAIrB,OAAO,EAGP,iBAAiB,EAOjB,oBAAoB,IAAI,yBAAyB,EAGlD,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,gBA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,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACvE,mBAAmB,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvE,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,iBAAiB,GAAG,gBAAgB,KAAK,IAAI,CAAC;IAChG,oBAAoB,EAAE,CAAC,WAAW,EAAE,qBAAqB,EAAE,WAAW,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACnG,CAAC"}
|
@@ -283,6 +283,7 @@ export declare enum RoomEvent {
|
|
283
283
|
* args: (kind: MediaDeviceKind, deviceId: string)
|
284
284
|
*/
|
285
285
|
ActiveDeviceChanged = "activeDeviceChanged",
|
286
|
+
ChatMessage = "chatMessage",
|
286
287
|
/**
|
287
288
|
* fired when the first remote participant has subscribed to the localParticipant's track
|
288
289
|
*/
|
@@ -450,7 +451,9 @@ export declare enum ParticipantEvent {
|
|
450
451
|
/**
|
451
452
|
* fired on local participant only, when the first remote participant has subscribed to the track specified in the payload
|
452
453
|
*/
|
453
|
-
LocalTrackSubscribed = "localTrackSubscribed"
|
454
|
+
LocalTrackSubscribed = "localTrackSubscribed",
|
455
|
+
/** only emitted on local participant */
|
456
|
+
ChatMessage = "chatMessage"
|
454
457
|
}
|
455
458
|
/** @internal */
|
456
459
|
export declare enum EngineEvent {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/room/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,oBAAY,SAAS;IACnB;;OAEG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;;;OAIG;IACH,kBAAkB,uBAAuB;IAEzC;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;;;;;;;;;OAUG;IACH,YAAY,iBAAiB;IAE7B;;;;OAIG;IACH,sBAAsB,2BAA2B;IAEjD;;OA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,sBAAsB,2BAA2B;IACjD,gBAAgB;IAChB,oBAAoB,yBAAyB;IAC7C,gBAAgB;IAChB,mBAAmB,wBAAwB;IAC3C,gBAAgB;IAChB,eAAe,oBAAoB;IACnC,gBAAgB;IAChB,eAAe,oBAAoB;IACnC;;;OAGG;IACH,cAAc,mBAAmB;IACjC;;;OAGG;IACH,eAAe,oBAAoB;IACnC;;;OAGG;IACH,6BAA6B,kCAAkC;IAC/D;;OAEG;IACH,yBAAyB,8BAA8B;IACvD;;OAEG;IACH,kBAAkB,uBAAuB;IACzC;;OAEG;IACH,oBAAoB,yBAAyB;IAE7C;;OAEG;IACH,uBAAuB,4BAA4B;IAEnD;;OAEG;IACH,qBAAqB,0BAA0B;IAE/C;;OAEG;IACH,cAAc,mBAAmB;CAClC"}
|
@@ -5,7 +5,7 @@ import LocalTrack from '../track/LocalTrack';
|
|
5
5
|
import LocalTrackPublication from '../track/LocalTrackPublication';
|
6
6
|
import { Track } from '../track/Track';
|
7
7
|
import type { AudioCaptureOptions, BackupVideoCodec, CreateLocalTracksOptions, ScreenShareCaptureOptions, TrackPublishOptions, VideoCaptureOptions } from '../track/options';
|
8
|
-
import type { DataPublishOptions } from '../types';
|
8
|
+
import type { ChatMessage, DataPublishOptions } from '../types';
|
9
9
|
import Participant from './Participant';
|
10
10
|
import type { ParticipantTrackPermission } from './ParticipantTrackPermission';
|
11
11
|
export default class LocalParticipant extends Participant {
|
@@ -19,6 +19,7 @@ export default class LocalParticipant extends Participant {
|
|
19
19
|
activeDeviceMap: Map<MediaDeviceKind, string>;
|
20
20
|
private pendingPublishing;
|
21
21
|
private pendingPublishPromises;
|
22
|
+
private republishPromise;
|
22
23
|
private cameraError;
|
23
24
|
private microphoneError;
|
24
25
|
private participantTrackPermissions;
|
@@ -117,6 +118,7 @@ export default class LocalParticipant extends Participant {
|
|
117
118
|
* @param options
|
118
119
|
*/
|
119
120
|
publishTrack(track: LocalTrack | MediaStreamTrack, options?: TrackPublishOptions): Promise<LocalTrackPublication>;
|
121
|
+
private publishOrRepublishTrack;
|
120
122
|
private publish;
|
121
123
|
get isLocal(): boolean;
|
122
124
|
/** @internal
|
@@ -134,6 +136,13 @@ export default class LocalParticipant extends Participant {
|
|
134
136
|
* @param options optionally specify a `reliable`, `topic` and `destination`
|
135
137
|
*/
|
136
138
|
publishData(data: Uint8Array, options?: DataPublishOptions): Promise<void>;
|
139
|
+
sendChatMessage(text: string): Promise<ChatMessage>;
|
140
|
+
editChatMessage(editText: string, originalMessage: ChatMessage): Promise<{
|
141
|
+
readonly message: string;
|
142
|
+
readonly editTimestamp: number;
|
143
|
+
readonly id: string;
|
144
|
+
readonly timestamp: number;
|
145
|
+
}>;
|
137
146
|
/**
|
138
147
|
* Control who can subscribe to LocalParticipant's published tracks.
|
139
148
|
*
|
@@ -168,5 +177,6 @@ export default class LocalParticipant extends Participant {
|
|
168
177
|
private handleLocalTrackUnpublished;
|
169
178
|
private handleTrackEnded;
|
170
179
|
private getPublicationForTrack;
|
180
|
+
private waitForPendingPublicationOfSource;
|
171
181
|
}
|
172
182
|
//# sourceMappingURL=LocalParticipant.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/LocalParticipant.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"LocalParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/LocalParticipant.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,EAIL,eAAe,EACf,qBAAqB,EAStB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAW1C,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,qBAAqB,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,O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AA+B,CAC7B,sBAAsB,EAAE,OAAO,EAC/B,2BAA2B,GAAE,0BAA0B,EAAO;IAShE,gBAAgB;IAChB,uBAAuB,CAAC,MAAM,EAAE,KAAK,EAAE;IAMvC,gBAAgB;IAChB,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO;IA+B1C,OAAO,CAAC,kCAAkC,CAUxC;IAEF,gBAAgB;IAChB,OAAO,CAAC,cAAc,CAEpB;IAGF,gBAAgB;IAChB,OAAO,CAAC,YAAY,CAclB;IAEF,OAAO,CAAC,qBAAqB,CAM3B;IAEF,OAAO,CAAC,sBAAsB,CAM5B;IAEF,OAAO,CAAC,oBAAoB,CAU1B;IAEF,OAAO,CAAC,6BAA6B,CA6BnC;IAEF,OAAO,CAAC,2BAA2B,CAUjC;IAEF,OAAO,CAAC,gBAAgB,CA8DtB;IAEF,OAAO,CAAC,sBAAsB;YAwBhB,iCAAiC;CAQhD"}
|
@@ -6,7 +6,7 @@ import type RemoteTrack from '../track/RemoteTrack';
|
|
6
6
|
import type RemoteTrackPublication from '../track/RemoteTrackPublication';
|
7
7
|
import { Track } from '../track/Track';
|
8
8
|
import type { TrackPublication } from '../track/TrackPublication';
|
9
|
-
import type { LoggerOptions, TranscriptionSegment } from '../types';
|
9
|
+
import type { ChatMessage, LoggerOptions, TranscriptionSegment } from '../types';
|
10
10
|
export declare enum ConnectionQuality {
|
11
11
|
Excellent = "excellent",
|
12
12
|
Good = "good",
|
@@ -121,5 +121,6 @@ export type ParticipantEventCallbacks = {
|
|
121
121
|
trackSubscriptionStatusChanged: (publication: RemoteTrackPublication, status: TrackPublication.SubscriptionStatus) => void;
|
122
122
|
attributesChanged: (changedAttributes: Record<string, string>) => void;
|
123
123
|
localTrackSubscribed: (trackPublication: LocalTrackPublication) => void;
|
124
|
+
chatMessage: (msg: ChatMessage) => void;
|
124
125
|
};
|
125
126
|
//# sourceMappingURL=Participant.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Participant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/Participant.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,eAAe,EACf,oBAAoB,IAAI,eAAe,EACvC,qBAAqB,EACrB,iBAAiB,IAAI,YAAY,EACjC,KAAK,OAAO,EACZ,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAY,EAAe,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAG7E,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;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"Participant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/Participant.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,eAAe,EACf,oBAAoB,IAAI,eAAe,EACvC,qBAAqB,EACrB,iBAAiB,IAAI,YAAY,EACjC,KAAK,OAAO,EACZ,iBAAiB,EAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAY,EAAe,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAG7E,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;AAElE,OAAO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AC/C,wBAAwB,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACzE,uBAAuB,EAAE,CACvB,WAAW,EAAE,sBAAsB,EACnC,WAAW,EAAE,KAAK,CAAC,WAAW,KAC3B,IAAI,CAAC;IACV,kCAAkC,EAAE,CAClC,WAAW,EAAE,sBAAsB,EACnC,MAAM,EAAE,gBAAgB,CAAC,gBAAgB,KACtC,IAAI,CAAC;IACV,iBAAiB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,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;IACV,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACvE,oBAAoB,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACxE,WAAW,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CACzC,CAAC"}
|
package/dist/src/room/types.d.ts
CHANGED
@@ -45,4 +45,10 @@ export interface TranscriptionSegment {
|
|
45
45
|
firstReceivedTime: number;
|
46
46
|
lastReceivedTime: number;
|
47
47
|
}
|
48
|
+
export interface ChatMessage {
|
49
|
+
id: string;
|
50
|
+
timestamp: number;
|
51
|
+
message: string;
|
52
|
+
editTimestamp?: number;
|
53
|
+
}
|
48
54
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +1 @@
|
|
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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AAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
package/dist/src/room/utils.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ClientInfo, Transcription as TranscriptionModel } from '@livekit/protocol';
|
1
|
+
import { ChatMessage as ChatMessageModel, ClientInfo, Transcription as TranscriptionModel } from '@livekit/protocol';
|
2
2
|
import type LocalAudioTrack from './track/LocalAudioTrack';
|
3
3
|
import type RemoteAudioTrack from './track/RemoteAudioTrack';
|
4
4
|
import { VideoCodec } from './track/options';
|
5
|
-
import type { TranscriptionSegment } from './types';
|
5
|
+
import type { ChatMessage, TranscriptionSegment } from './types';
|
6
6
|
export declare const ddExtensionURI = "https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension";
|
7
7
|
export declare function unpackStreamId(packed: string): string[];
|
8
8
|
export declare function sleep(duration: number): Promise<void>;
|
@@ -96,4 +96,5 @@ export declare function unwrapConstraint(constraint: ConstrainULong): number;
|
|
96
96
|
export declare function toWebsocketUrl(url: string): string;
|
97
97
|
export declare function toHttpUrl(url: string): string;
|
98
98
|
export declare function extractTranscriptionSegments(transcription: TranscriptionModel, firstReceivedTimesMap: Map<string, number>): TranscriptionSegment[];
|
99
|
+
export declare function extractChatMessage(msg: ChatMessageModel): ChatMessage;
|
99
100
|
//# sourceMappingURL=utils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/room/utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/room/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,IAAI,gBAAgB,EAC/B,UAAU,EAEV,aAAa,IAAI,kBAAkB,EACpC,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,eAAe,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAe,MAAM,iBAAiB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAA0B,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGzF,eAAO,MAAM,cAAc,4FACgE,CAAC;AAE5F,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAMvD;AAED,wBAAsB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3D;AAED,gBAAgB;AAChB,wBAAgB,mBAAmB,YAElC;AAED,gBAAgB;AAChB,wBAAgB,gBAAgB,YAE/B;AAED,wBAAgB,sBAAsB,YAErC;AAED,wBAAgB,gBAAgB,YAE/B;AAED,wBAAgB,WAAW,IAAI,OAAO,CAmBrC;AAED,wBAAgB,WAAW,IAAI,OAAO,CA2BrC;AAED,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAQjE;AAED,wBAAgB,kBAAkB,YAKjC;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,wBAAgB,QAAQ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"}
|
@@ -12,7 +12,7 @@ import type RemoteTrack from './track/RemoteTrack';
|
|
12
12
|
import RemoteTrackPublication from './track/RemoteTrackPublication';
|
13
13
|
import { Track } from './track/Track';
|
14
14
|
import type { TrackPublication } from './track/TrackPublication';
|
15
|
-
import type { SimulationOptions, SimulationScenario, TranscriptionSegment } from './types';
|
15
|
+
import type { ChatMessage, SimulationOptions, SimulationScenario, TranscriptionSegment } from './types';
|
16
16
|
export declare enum ConnectionState {
|
17
17
|
Disconnected = "disconnected",
|
18
18
|
Connecting = "connecting",
|
@@ -183,6 +183,7 @@ declare class Room extends Room_base {
|
|
183
183
|
private handleSipDtmf;
|
184
184
|
bufferedSegments: Map<string, TranscriptionSegmentModel>;
|
185
185
|
private handleTranscription;
|
186
|
+
private handleChatMessage;
|
186
187
|
private handleAudioPlaybackStarted;
|
187
188
|
private handleAudioPlaybackFailed;
|
188
189
|
private handleVideoPlaybackStarted;
|
@@ -217,6 +218,7 @@ declare class Room extends Room_base {
|
|
217
218
|
private onLocalConnectionQualityChanged;
|
218
219
|
private onMediaDevicesError;
|
219
220
|
private onLocalParticipantPermissionsChanged;
|
221
|
+
private onLocalChatMessageSent;
|
220
222
|
/**
|
221
223
|
* Allows to populate a room with simulated participants.
|
222
224
|
* No actual connection to a server will be established, all state is
|
@@ -268,6 +270,7 @@ export type RoomEventCallbacks = {
|
|
268
270
|
encryptionError: (error: Error) => void;
|
269
271
|
dcBufferStatusChanged: (isLow: boolean, kind: DataPacket_Kind) => void;
|
270
272
|
activeDeviceChanged: (kind: MediaDeviceKind, deviceId: string) => void;
|
273
|
+
chatMessage: (message: ChatMessage, participant?: RemoteParticipant | LocalParticipant) => void;
|
271
274
|
localTrackSubscribed: (publication: LocalTrackPublication, participant: LocalParticipant) => void;
|
272
275
|
};
|
273
276
|
//# sourceMappingURL=Room.d.ts.map
|
@@ -283,6 +283,7 @@ export declare enum RoomEvent {
|
|
283
283
|
* args: (kind: MediaDeviceKind, deviceId: string)
|
284
284
|
*/
|
285
285
|
ActiveDeviceChanged = "activeDeviceChanged",
|
286
|
+
ChatMessage = "chatMessage",
|
286
287
|
/**
|
287
288
|
* fired when the first remote participant has subscribed to the localParticipant's track
|
288
289
|
*/
|
@@ -450,7 +451,9 @@ export declare enum ParticipantEvent {
|
|
450
451
|
/**
|
451
452
|
* fired on local participant only, when the first remote participant has subscribed to the track specified in the payload
|
452
453
|
*/
|
453
|
-
LocalTrackSubscribed = "localTrackSubscribed"
|
454
|
+
LocalTrackSubscribed = "localTrackSubscribed",
|
455
|
+
/** only emitted on local participant */
|
456
|
+
ChatMessage = "chatMessage"
|
454
457
|
}
|
455
458
|
/** @internal */
|
456
459
|
export declare enum EngineEvent {
|
@@ -5,7 +5,7 @@ import LocalTrack from '../track/LocalTrack';
|
|
5
5
|
import LocalTrackPublication from '../track/LocalTrackPublication';
|
6
6
|
import { Track } from '../track/Track';
|
7
7
|
import type { AudioCaptureOptions, BackupVideoCodec, CreateLocalTracksOptions, ScreenShareCaptureOptions, TrackPublishOptions, VideoCaptureOptions } from '../track/options';
|
8
|
-
import type { DataPublishOptions } from '../types';
|
8
|
+
import type { ChatMessage, DataPublishOptions } from '../types';
|
9
9
|
import Participant from './Participant';
|
10
10
|
import type { ParticipantTrackPermission } from './ParticipantTrackPermission';
|
11
11
|
export default class LocalParticipant extends Participant {
|
@@ -19,6 +19,7 @@ export default class LocalParticipant extends Participant {
|
|
19
19
|
activeDeviceMap: Map<MediaDeviceKind, string>;
|
20
20
|
private pendingPublishing;
|
21
21
|
private pendingPublishPromises;
|
22
|
+
private republishPromise;
|
22
23
|
private cameraError;
|
23
24
|
private microphoneError;
|
24
25
|
private participantTrackPermissions;
|
@@ -117,6 +118,7 @@ export default class LocalParticipant extends Participant {
|
|
117
118
|
* @param options
|
118
119
|
*/
|
119
120
|
publishTrack(track: LocalTrack | MediaStreamTrack, options?: TrackPublishOptions): Promise<LocalTrackPublication>;
|
121
|
+
private publishOrRepublishTrack;
|
120
122
|
private publish;
|
121
123
|
get isLocal(): boolean;
|
122
124
|
/** @internal
|
@@ -134,6 +136,13 @@ export default class LocalParticipant extends Participant {
|
|
134
136
|
* @param options optionally specify a `reliable`, `topic` and `destination`
|
135
137
|
*/
|
136
138
|
publishData(data: Uint8Array, options?: DataPublishOptions): Promise<void>;
|
139
|
+
sendChatMessage(text: string): Promise<ChatMessage>;
|
140
|
+
editChatMessage(editText: string, originalMessage: ChatMessage): Promise<{
|
141
|
+
readonly message: string;
|
142
|
+
readonly editTimestamp: number;
|
143
|
+
readonly id: string;
|
144
|
+
readonly timestamp: number;
|
145
|
+
}>;
|
137
146
|
/**
|
138
147
|
* Control who can subscribe to LocalParticipant's published tracks.
|
139
148
|
*
|
@@ -168,5 +177,6 @@ export default class LocalParticipant extends Participant {
|
|
168
177
|
private handleLocalTrackUnpublished;
|
169
178
|
private handleTrackEnded;
|
170
179
|
private getPublicationForTrack;
|
180
|
+
private waitForPendingPublicationOfSource;
|
171
181
|
}
|
172
182
|
//# sourceMappingURL=LocalParticipant.d.ts.map
|
@@ -7,7 +7,7 @@ import type RemoteTrack from '../track/RemoteTrack';
|
|
7
7
|
import type RemoteTrackPublication from '../track/RemoteTrackPublication';
|
8
8
|
import { Track } from '../track/Track';
|
9
9
|
import type { TrackPublication } from '../track/TrackPublication';
|
10
|
-
import type { LoggerOptions, TranscriptionSegment } from '../types';
|
10
|
+
import type { ChatMessage, LoggerOptions, TranscriptionSegment } from '../types';
|
11
11
|
export declare enum ConnectionQuality {
|
12
12
|
Excellent = "excellent",
|
13
13
|
Good = "good",
|
@@ -122,5 +122,6 @@ export type ParticipantEventCallbacks = {
|
|
122
122
|
trackSubscriptionStatusChanged: (publication: RemoteTrackPublication, status: TrackPublication.SubscriptionStatus) => void;
|
123
123
|
attributesChanged: (changedAttributes: Record<string, string>) => void;
|
124
124
|
localTrackSubscribed: (trackPublication: LocalTrackPublication) => void;
|
125
|
+
chatMessage: (msg: ChatMessage) => void;
|
125
126
|
};
|
126
127
|
//# sourceMappingURL=Participant.d.ts.map
|
@@ -45,4 +45,10 @@ export interface TranscriptionSegment {
|
|
45
45
|
firstReceivedTime: number;
|
46
46
|
lastReceivedTime: number;
|
47
47
|
}
|
48
|
+
export interface ChatMessage {
|
49
|
+
id: string;
|
50
|
+
timestamp: number;
|
51
|
+
message: string;
|
52
|
+
editTimestamp?: number;
|
53
|
+
}
|
48
54
|
//# sourceMappingURL=types.d.ts.map
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { ClientInfo, Transcription as TranscriptionModel } from '@livekit/protocol';
|
1
|
+
import { ChatMessage as ChatMessageModel, ClientInfo, Transcription as TranscriptionModel } from '@livekit/protocol';
|
2
2
|
import type LocalAudioTrack from './track/LocalAudioTrack';
|
3
3
|
import type RemoteAudioTrack from './track/RemoteAudioTrack';
|
4
4
|
import { VideoCodec } from './track/options';
|
5
|
-
import type { TranscriptionSegment } from './types';
|
5
|
+
import type { ChatMessage, TranscriptionSegment } from './types';
|
6
6
|
export declare const ddExtensionURI = "https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension";
|
7
7
|
export declare function unpackStreamId(packed: string): string[];
|
8
8
|
export declare function sleep(duration: number): Promise<void>;
|
@@ -96,4 +96,5 @@ export declare function unwrapConstraint(constraint: ConstrainULong): number;
|
|
96
96
|
export declare function toWebsocketUrl(url: string): string;
|
97
97
|
export declare function toHttpUrl(url: string): string;
|
98
98
|
export declare function extractTranscriptionSegments(transcription: TranscriptionModel, firstReceivedTimesMap: Map<string, number>): TranscriptionSegment[];
|
99
|
+
export declare function extractChatMessage(msg: ChatMessageModel): ChatMessage;
|
99
100
|
//# sourceMappingURL=utils.d.ts.map
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "livekit-client",
|
3
|
-
"version": "2.5.
|
3
|
+
"version": "2.5.3",
|
4
4
|
"description": "JavaScript/TypeScript client SDK for LiveKit",
|
5
5
|
"main": "./dist/livekit-client.umd.js",
|
6
6
|
"unpkg": "./dist/livekit-client.umd.js",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"author": "David Zhao <david@davidzhao.com>",
|
37
37
|
"license": "Apache-2.0",
|
38
38
|
"dependencies": {
|
39
|
-
"@livekit/protocol": "1.
|
39
|
+
"@livekit/protocol": "1.22.0",
|
40
40
|
"events": "^3.3.0",
|
41
41
|
"loglevel": "^1.8.0",
|
42
42
|
"sdp-transform": "^2.14.1",
|
@@ -73,7 +73,7 @@
|
|
73
73
|
"gh-pages": "6.1.1",
|
74
74
|
"jsdom": "^24.0.0",
|
75
75
|
"prettier": "^3.0.0",
|
76
|
-
"rollup": "4.
|
76
|
+
"rollup": "4.22.4",
|
77
77
|
"rollup-plugin-delete": "^2.0.0",
|
78
78
|
"rollup-plugin-re": "1.0.7",
|
79
79
|
"rollup-plugin-typescript2": "0.36.0",
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"typedoc": "0.26.6",
|
82
82
|
"typedoc-plugin-no-inherit": "1.4.0",
|
83
83
|
"typescript": "5.5.4",
|
84
|
-
"vite": "5.4.
|
84
|
+
"vite": "5.4.6",
|
85
85
|
"vitest": "^1.0.0"
|
86
86
|
},
|
87
87
|
"scripts": {
|
package/src/room/Room.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import {
|
2
|
+
ChatMessage as ChatMessageModel,
|
2
3
|
ConnectionQualityUpdate,
|
3
4
|
type DataPacket,
|
4
5
|
DataPacket_Kind,
|
@@ -67,11 +68,17 @@ import type { TrackPublication } from './track/TrackPublication';
|
|
67
68
|
import type { TrackProcessor } from './track/processor/types';
|
68
69
|
import type { AdaptiveStreamSettings } from './track/types';
|
69
70
|
import { getNewAudioContext, sourceToKind } from './track/utils';
|
70
|
-
import type {
|
71
|
+
import type {
|
72
|
+
ChatMessage,
|
73
|
+
SimulationOptions,
|
74
|
+
SimulationScenario,
|
75
|
+
TranscriptionSegment,
|
76
|
+
} from './types';
|
71
77
|
import {
|
72
78
|
Future,
|
73
79
|
Mutex,
|
74
80
|
createDummyVideoStreamTrack,
|
81
|
+
extractChatMessage,
|
75
82
|
extractTranscriptionSegments,
|
76
83
|
getEmptyAudioStreamTrack,
|
77
84
|
isBrowserSupported,
|
@@ -1156,6 +1163,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
1156
1163
|
.on(ParticipantEvent.ConnectionQualityChanged, this.onLocalConnectionQualityChanged)
|
1157
1164
|
.on(ParticipantEvent.MediaDevicesError, this.onMediaDevicesError)
|
1158
1165
|
.on(ParticipantEvent.AudioStreamAcquired, this.startAudio)
|
1166
|
+
.on(ParticipantEvent.ChatMessage, this.onLocalChatMessageSent)
|
1159
1167
|
.on(
|
1160
1168
|
ParticipantEvent.ParticipantPermissionsChanged,
|
1161
1169
|
this.onLocalParticipantPermissionsChanged,
|
@@ -1336,6 +1344,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
1336
1344
|
.off(ParticipantEvent.ConnectionQualityChanged, this.onLocalConnectionQualityChanged)
|
1337
1345
|
.off(ParticipantEvent.MediaDevicesError, this.onMediaDevicesError)
|
1338
1346
|
.off(ParticipantEvent.AudioStreamAcquired, this.startAudio)
|
1347
|
+
.off(ParticipantEvent.ChatMessage, this.onLocalChatMessageSent)
|
1339
1348
|
.off(
|
1340
1349
|
ParticipantEvent.ParticipantPermissionsChanged,
|
1341
1350
|
this.onLocalParticipantPermissionsChanged,
|
@@ -1529,6 +1538,8 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
1529
1538
|
this.handleTranscription(participant, packet.value.value);
|
1530
1539
|
} else if (packet.value.case === 'sipDtmf') {
|
1531
1540
|
this.handleSipDtmf(participant, packet.value.value);
|
1541
|
+
} else if (packet.value.case === 'chatMessage') {
|
1542
|
+
this.handleChatMessage(participant, packet.value.value);
|
1532
1543
|
}
|
1533
1544
|
};
|
1534
1545
|
|
@@ -1570,6 +1581,14 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
1570
1581
|
this.emit(RoomEvent.TranscriptionReceived, segments, participant, publication);
|
1571
1582
|
};
|
1572
1583
|
|
1584
|
+
private handleChatMessage = (
|
1585
|
+
participant: RemoteParticipant | undefined,
|
1586
|
+
chatMessage: ChatMessageModel,
|
1587
|
+
) => {
|
1588
|
+
const msg = extractChatMessage(chatMessage);
|
1589
|
+
this.emit(RoomEvent.ChatMessage, msg, participant);
|
1590
|
+
};
|
1591
|
+
|
1573
1592
|
private handleAudioPlaybackStarted = () => {
|
1574
1593
|
if (this.canPlaybackAudio) {
|
1575
1594
|
return;
|
@@ -1602,7 +1621,8 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
1602
1621
|
};
|
1603
1622
|
|
1604
1623
|
private handleDeviceChange = async () => {
|
1605
|
-
|
1624
|
+
// check for available devices, but don't request permissions in order to avoid prompts for kinds that haven't been used before
|
1625
|
+
const availableDevices = await DeviceManager.getInstance().getDevices(undefined, false);
|
1606
1626
|
// inputs are automatically handled via TrackEvent.Ended causing a TrackEvent.Restarted. Here we only need to worry about audiooutputs changing
|
1607
1627
|
const kinds: MediaDeviceKind[] = ['audiooutput'];
|
1608
1628
|
for (let kind of kinds) {
|
@@ -1997,6 +2017,10 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
|
|
1997
2017
|
this.emit(RoomEvent.ParticipantPermissionsChanged, prevPermissions, this.localParticipant);
|
1998
2018
|
};
|
1999
2019
|
|
2020
|
+
private onLocalChatMessageSent = (msg: ChatMessage) => {
|
2021
|
+
this.emit(RoomEvent.ChatMessage, msg, this.localParticipant);
|
2022
|
+
};
|
2023
|
+
|
2000
2024
|
/**
|
2001
2025
|
* Allows to populate a room with simulated participants.
|
2002
2026
|
* No actual connection to a server will be established, all state is
|
@@ -2263,5 +2287,6 @@ export type RoomEventCallbacks = {
|
|
2263
2287
|
encryptionError: (error: Error) => void;
|
2264
2288
|
dcBufferStatusChanged: (isLow: boolean, kind: DataPacket_Kind) => void;
|
2265
2289
|
activeDeviceChanged: (kind: MediaDeviceKind, deviceId: string) => void;
|
2290
|
+
chatMessage: (message: ChatMessage, participant?: RemoteParticipant | LocalParticipant) => void;
|
2266
2291
|
localTrackSubscribed: (publication: LocalTrackPublication, participant: LocalParticipant) => void;
|
2267
2292
|
};
|
package/src/room/events.ts
CHANGED
@@ -324,6 +324,7 @@ export enum RoomEvent {
|
|
324
324
|
*/
|
325
325
|
ActiveDeviceChanged = 'activeDeviceChanged',
|
326
326
|
|
327
|
+
ChatMessage = 'chatMessage',
|
327
328
|
/**
|
328
329
|
* fired when the first remote participant has subscribed to the localParticipant's track
|
329
330
|
*/
|
@@ -519,6 +520,9 @@ export enum ParticipantEvent {
|
|
519
520
|
* fired on local participant only, when the first remote participant has subscribed to the track specified in the payload
|
520
521
|
*/
|
521
522
|
LocalTrackSubscribed = 'localTrackSubscribed',
|
523
|
+
|
524
|
+
/** only emitted on local participant */
|
525
|
+
ChatMessage = 'chatMessage',
|
522
526
|
}
|
523
527
|
|
524
528
|
/** @internal */
|