livekit-client 2.5.10 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +54 -0
- package/dist/livekit-client.esm.mjs +418 -32
- 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/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/room/PCTransport.d.ts +2 -0
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts +56 -0
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/rpc.d.ts +96 -0
- package/dist/src/room/rpc.d.ts.map +1 -0
- package/dist/src/room/track/utils.d.ts +2 -2
- package/dist/src/room/track/utils.d.ts.map +1 -1
- package/dist/ts4.2/src/index.d.ts +2 -0
- package/dist/ts4.2/src/room/PCTransport.d.ts +2 -0
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +56 -0
- package/dist/ts4.2/src/room/rpc.d.ts +96 -0
- package/dist/ts4.2/src/room/track/utils.d.ts +2 -2
- package/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/room/PCTransport.ts +42 -29
- package/src/room/Room.ts +1 -0
- package/src/room/participant/LocalParticipant.test.ts +304 -0
- package/src/room/participant/LocalParticipant.ts +340 -1
- package/src/room/rpc.ts +172 -0
- package/src/room/track/utils.ts +1 -6
package/dist/src/index.d.ts
CHANGED
@@ -23,6 +23,7 @@ import type { LiveKitReactNativeInfo } from './room/types';
|
|
23
23
|
import type { AudioAnalyserOptions } from './room/utils';
|
24
24
|
import { compareVersions, createAudioAnalyser, getEmptyAudioStreamTrack, getEmptyVideoStreamTrack, isBrowserSupported, supportsAV1, supportsAdaptiveStream, supportsDynacast, supportsVP9 } from './room/utils';
|
25
25
|
import { getBrowser } from './utils/browserParser';
|
26
|
+
export { RpcError, type RpcInvocationData, type PerformRpcParams } from './room/rpc';
|
26
27
|
export * from './connectionHelper/ConnectionCheck';
|
27
28
|
export * from './connectionHelper/checks/Checker';
|
28
29
|
export * from './e2ee';
|
package/dist/src/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC1F,OAAO,sBAAsB,MAAM,+BAA+B,CAAC;AACnE,OAAO,IAAI,EAAE,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,gBAAgB,MAAM,qCAAqC,CAAC;AACnE,OAAO,WAAW,EAAE,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO,iBAAiB,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,cAAc,MAAM,eAAe,CAAC;AAC3C,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;AACvE,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,sBAAsB,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE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AAU,EACV,qBAAqB,EACrB,eAAe,EACf,QAAQ,EACR,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EAChB,IAAI,EACJ,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,wBAAwB,EACxB,wBAAwB,EACxB,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EAChB,WAAW,EACX,KAAK,GACN,CAAC;AACF,YAAY,EACV,oBAAoB,EACpB,WAAW,EACX,sBAAsB,EACtB,0BAA0B,EAC1B,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GACjB,CAAC"}
|
@@ -19,6 +19,7 @@ export default class PCTransport extends EventEmitter {
|
|
19
19
|
private config?;
|
20
20
|
private log;
|
21
21
|
private loggerOptions;
|
22
|
+
private ddExtID;
|
22
23
|
pendingCandidates: RTCIceCandidateInit[];
|
23
24
|
restartingIce: boolean;
|
24
25
|
renegotiate: boolean;
|
@@ -63,6 +64,7 @@ export default class PCTransport extends EventEmitter {
|
|
63
64
|
getConnectedAddress(): Promise<string | undefined>;
|
64
65
|
close: () => void;
|
65
66
|
private setMungedSDP;
|
67
|
+
private ensureVideoDDExtensionForSVC;
|
66
68
|
}
|
67
69
|
export {};
|
68
70
|
//# sourceMappingURL=PCTransport.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PCTransport.d.ts","sourceRoot":"","sources":["../../../src/room/PCTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAMtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,gBAAgB;AAChB,UAAU,gBAAgB;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,iBAAiB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AY,EAAE,WAAW,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;CAC7E,CAAC"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Codec, ParticipantInfo, ParticipantPermission } from '@livekit/protocol';
|
2
2
|
import type { InternalRoomOptions } from '../../options';
|
3
3
|
import type RTCEngine from '../RTCEngine';
|
4
|
+
import { type PerformRpcParams, type RpcInvocationData } from '../rpc';
|
4
5
|
import LocalTrack from '../track/LocalTrack';
|
5
6
|
import LocalTrackPublication from '../track/LocalTrackPublication';
|
6
7
|
import { Track } from '../track/Track';
|
@@ -29,6 +30,9 @@ export default class LocalParticipant extends Participant {
|
|
29
30
|
private reconnectFuture?;
|
30
31
|
private pendingSignalRequests;
|
31
32
|
private enabledPublishVideoCodecs;
|
33
|
+
private rpcHandlers;
|
34
|
+
private pendingAcks;
|
35
|
+
private pendingResponses;
|
32
36
|
/** @internal */
|
33
37
|
constructor(sid: string, identity: string, engine: RTCEngine, options: InternalRoomOptions);
|
34
38
|
get lastCameraError(): Error | undefined;
|
@@ -44,6 +48,7 @@ export default class LocalParticipant extends Participant {
|
|
44
48
|
private handleReconnected;
|
45
49
|
private handleDisconnected;
|
46
50
|
private handleSignalRequestResponse;
|
51
|
+
private handleDataPacket;
|
47
52
|
/**
|
48
53
|
* Sets and updates the metadata of the local participant.
|
49
54
|
* Note: this requires `canUpdateOwnMetadata` permission.
|
@@ -150,6 +155,46 @@ export default class LocalParticipant extends Participant {
|
|
150
155
|
readonly id: string;
|
151
156
|
readonly timestamp: number;
|
152
157
|
}>;
|
158
|
+
/**
|
159
|
+
* Initiate an RPC call to a remote participant
|
160
|
+
* @param params - Parameters for initiating the RPC call, see {@link PerformRpcParams}
|
161
|
+
* @returns A promise that resolves with the response payload or rejects with an error.
|
162
|
+
* @throws Error on failure. Details in `message`.
|
163
|
+
*/
|
164
|
+
performRpc({ destinationIdentity, method, payload, responseTimeout, }: PerformRpcParams): Promise<string>;
|
165
|
+
/**
|
166
|
+
* Establishes the participant as a receiver for calls of the specified RPC method.
|
167
|
+
* Will overwrite any existing callback for the same method.
|
168
|
+
*
|
169
|
+
* @param method - The name of the indicated RPC method
|
170
|
+
* @param handler - Will be invoked when an RPC request for this method is received
|
171
|
+
* @returns A promise that resolves when the method is successfully registered
|
172
|
+
*
|
173
|
+
* @example
|
174
|
+
* ```typescript
|
175
|
+
* room.localParticipant?.registerRpcMethod(
|
176
|
+
* 'greet',
|
177
|
+
* async (data: RpcInvocationData) => {
|
178
|
+
* console.log(`Received greeting from ${data.callerIdentity}: ${data.payload}`);
|
179
|
+
* return `Hello, ${data.callerIdentity}!`;
|
180
|
+
* }
|
181
|
+
* );
|
182
|
+
* ```
|
183
|
+
*
|
184
|
+
* The handler should return a Promise that resolves to a string.
|
185
|
+
* If unable to respond within `responseTimeout`, the request will result in an error on the caller's side.
|
186
|
+
*
|
187
|
+
* You may throw errors of type `RpcError` with a string `message` in the handler,
|
188
|
+
* and they will be received on the caller's side with the message intact.
|
189
|
+
* Other errors thrown in your handler will not be transmitted as-is, and will instead arrive to the caller as `1500` ("Application Error").
|
190
|
+
*/
|
191
|
+
registerRpcMethod(method: string, handler: (data: RpcInvocationData) => Promise<string>): void;
|
192
|
+
/**
|
193
|
+
* Unregisters a previously registered RPC method.
|
194
|
+
*
|
195
|
+
* @param method - The name of the RPC method to unregister
|
196
|
+
*/
|
197
|
+
unregisterRpcMethod(method: string): void;
|
153
198
|
/**
|
154
199
|
* Control who can subscribe to LocalParticipant's published tracks.
|
155
200
|
*
|
@@ -168,6 +213,17 @@ export default class LocalParticipant extends Participant {
|
|
168
213
|
* participant/track. Any omitted participants will not receive any permissions.
|
169
214
|
*/
|
170
215
|
setTrackSubscriptionPermissions(allParticipantsAllowed: boolean, participantTrackPermissions?: ParticipantTrackPermission[]): void;
|
216
|
+
private handleIncomingRpcAck;
|
217
|
+
private handleIncomingRpcResponse;
|
218
|
+
private handleIncomingRpcRequest;
|
219
|
+
/** @internal */
|
220
|
+
private publishRpcRequest;
|
221
|
+
/** @internal */
|
222
|
+
private publishRpcResponse;
|
223
|
+
/** @internal */
|
224
|
+
private publishRpcAck;
|
225
|
+
/** @internal */
|
226
|
+
handleParticipantDisconnected(participantIdentity: string): void;
|
171
227
|
/** @internal */
|
172
228
|
setEnabledPublishCodecs(codecs: Codec[]): void;
|
173
229
|
/** @internal */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/LocalParticipant.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,EAIL,eAAe,EACf,qBAAqB,
|
1
|
+
{"version":3,"file":"LocalParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/LocalParticipant.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,EAIL,eAAe,EACf,qBAAqB,EAatB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAU1C,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EAEvB,MAAM,QAAQ,CAAC;AAEhB,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,qBAAqB,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAS1B,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAahE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAS/E,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,sBAAsB,EAAE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;;;;;;;;OAyBG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,MAAM,CAAC;IAIvF;;;;OAIG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM;IAIlC;;;;;;;;;;;;;;;;OAgBG;IACH,+BAA+B,CAC7B,sBAAsB,EAAE,OAAO,EAC/B,2BAA2B,GAAE,0BAA0B,EAAO;IAShE,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,yBAAyB;YAcnB,wBAAwB;IA8DtC,gBAAgB;YACF,iBAAiB;IAyB/B,gBAAgB;YACF,kBAAkB;IAuBhC,gBAAgB;YACF,aAAa;IAe3B,gBAAgB;IAChB,6BAA6B,CAAC,mBAAmB,EAAE,MAAM;IAezD,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"}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { RpcError as RpcError_Proto } from '@livekit/protocol';
|
2
|
+
/** Parameters for initiating an RPC call */
|
3
|
+
export interface PerformRpcParams {
|
4
|
+
/** The `identity` of the destination participant */
|
5
|
+
destinationIdentity: string;
|
6
|
+
/** The method name to call */
|
7
|
+
method: string;
|
8
|
+
/** The method payload */
|
9
|
+
payload: string;
|
10
|
+
/** Timeout for receiving a response after initial connection (milliseconds). Default: 10000 */
|
11
|
+
responseTimeout?: number;
|
12
|
+
}
|
13
|
+
/**
|
14
|
+
* Data passed to method handler for incoming RPC invocations
|
15
|
+
*/
|
16
|
+
export interface RpcInvocationData {
|
17
|
+
/**
|
18
|
+
* The unique request ID. Will match at both sides of the call, useful for debugging or logging.
|
19
|
+
*/
|
20
|
+
requestId: string;
|
21
|
+
/**
|
22
|
+
* The unique participant identity of the caller.
|
23
|
+
*/
|
24
|
+
callerIdentity: string;
|
25
|
+
/**
|
26
|
+
* The payload of the request. User-definable format, typically JSON.
|
27
|
+
*/
|
28
|
+
payload: string;
|
29
|
+
/**
|
30
|
+
* The maximum time the caller will wait for a response.
|
31
|
+
*/
|
32
|
+
responseTimeout: number;
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Specialized error handling for RPC methods.
|
36
|
+
*
|
37
|
+
* Instances of this type, when thrown in a method handler, will have their `message`
|
38
|
+
* serialized and sent across the wire. The sender will receive an equivalent error on the other side.
|
39
|
+
*
|
40
|
+
* Built-in types are included but developers may use any string, with a max length of 256 bytes.
|
41
|
+
*/
|
42
|
+
export declare class RpcError extends Error {
|
43
|
+
static MAX_MESSAGE_BYTES: number;
|
44
|
+
static MAX_DATA_BYTES: number;
|
45
|
+
code: number;
|
46
|
+
data?: string;
|
47
|
+
/**
|
48
|
+
* Creates an error object with the given code and message, plus an optional data payload.
|
49
|
+
*
|
50
|
+
* If thrown in an RPC method handler, the error will be sent back to the caller.
|
51
|
+
*
|
52
|
+
* Error codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings).
|
53
|
+
*/
|
54
|
+
constructor(code: number, message: string, data?: string);
|
55
|
+
/**
|
56
|
+
* @internal
|
57
|
+
*/
|
58
|
+
static fromProto(proto: RpcError_Proto): RpcError;
|
59
|
+
/**
|
60
|
+
* @internal
|
61
|
+
*/
|
62
|
+
toProto(): RpcError_Proto;
|
63
|
+
static ErrorCode: {
|
64
|
+
readonly APPLICATION_ERROR: 1500;
|
65
|
+
readonly CONNECTION_TIMEOUT: 1501;
|
66
|
+
readonly RESPONSE_TIMEOUT: 1502;
|
67
|
+
readonly RECIPIENT_DISCONNECTED: 1503;
|
68
|
+
readonly RESPONSE_PAYLOAD_TOO_LARGE: 1504;
|
69
|
+
readonly SEND_FAILED: 1505;
|
70
|
+
readonly UNSUPPORTED_METHOD: 1400;
|
71
|
+
readonly RECIPIENT_NOT_FOUND: 1401;
|
72
|
+
readonly REQUEST_PAYLOAD_TOO_LARGE: 1402;
|
73
|
+
readonly UNSUPPORTED_SERVER: 1403;
|
74
|
+
readonly UNSUPPORTED_VERSION: 1404;
|
75
|
+
};
|
76
|
+
/**
|
77
|
+
* @internal
|
78
|
+
*/
|
79
|
+
static ErrorMessage: Record<keyof typeof RpcError.ErrorCode, string>;
|
80
|
+
/**
|
81
|
+
* Creates an error object from the code, with an auto-populated message.
|
82
|
+
*
|
83
|
+
* @internal
|
84
|
+
*/
|
85
|
+
static builtIn(key: keyof typeof RpcError.ErrorCode, data?: string): RpcError;
|
86
|
+
}
|
87
|
+
export declare const MAX_PAYLOAD_BYTES = 15360;
|
88
|
+
/**
|
89
|
+
* @internal
|
90
|
+
*/
|
91
|
+
export declare function byteLength(str: string): number;
|
92
|
+
/**
|
93
|
+
* @internal
|
94
|
+
*/
|
95
|
+
export declare function truncateBytes(str: string, maxBytes: number): string;
|
96
|
+
//# sourceMappingURL=rpc.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../../src/room/rpc.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE/D,4CAA4C;AAC5C,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,8BAA8B;IAC9B,MAAM,EAAE,M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
|
import { TrackPublishedResponse } from '@livekit/protocol';
|
2
2
|
import { Track } from './Track';
|
3
3
|
import type { TrackPublication } from './TrackPublication';
|
4
|
-
import { type AudioCaptureOptions, type CreateLocalTracksOptions, type ScreenShareCaptureOptions, type VideoCaptureOptions } from './options';
|
4
|
+
import { type AudioCaptureOptions, type CreateLocalTracksOptions, type ScreenShareCaptureOptions, type VideoCaptureOptions, type VideoCodec } from './options';
|
5
5
|
import type { AudioTrack } from './types';
|
6
6
|
export declare function mergeDefaultOptions(options?: CreateLocalTracksOptions, audioDefaults?: AudioCaptureOptions, videoDefaults?: VideoCaptureOptions): CreateLocalTracksOptions;
|
7
7
|
export declare function constraintsForOptions(options: CreateLocalTracksOptions): MediaStreamConstraints;
|
@@ -26,7 +26,7 @@ export declare function sourceToKind(source: Track.Source): MediaDeviceKind | un
|
|
26
26
|
* @internal
|
27
27
|
*/
|
28
28
|
export declare function screenCaptureToDisplayMediaStreamOptions(options: ScreenShareCaptureOptions): DisplayMediaStreamOptions;
|
29
|
-
export declare function mimeTypeToVideoCodecString(mimeType: string):
|
29
|
+
export declare function mimeTypeToVideoCodecString(mimeType: string): VideoCodec;
|
30
30
|
export declare function getTrackPublicationInfo<T extends TrackPublication>(tracks: T[]): TrackPublishedResponse[];
|
31
31
|
export declare function getLogContextFromTrack(track: Track | TrackPublication): Record<string, unknown>;
|
32
32
|
export declare function supportsSynchronizationSources(): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/room/track/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAm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sB,EAAE,CAa1B;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0B/F;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAExD;AAED,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC7C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,0BAkB9C"}
|
@@ -23,6 +23,8 @@ import type { LiveKitReactNativeInfo } from './room/types';
|
|
23
23
|
import type { AudioAnalyserOptions } from './room/utils';
|
24
24
|
import { compareVersions, createAudioAnalyser, getEmptyAudioStreamTrack, getEmptyVideoStreamTrack, isBrowserSupported, supportsAV1, supportsAdaptiveStream, supportsDynacast, supportsVP9 } from './room/utils';
|
25
25
|
import { getBrowser } from './utils/browserParser';
|
26
|
+
export type { RpcInvocationData, PerformRpcParams } from './room/rpc';
|
27
|
+
export { RpcError } from './room/rpc';
|
26
28
|
export * from './connectionHelper/ConnectionCheck';
|
27
29
|
export * from './connectionHelper/checks/Checker';
|
28
30
|
export * from './e2ee';
|
@@ -19,6 +19,7 @@ export default class PCTransport extends EventEmitter {
|
|
19
19
|
private config?;
|
20
20
|
private log;
|
21
21
|
private loggerOptions;
|
22
|
+
private ddExtID;
|
22
23
|
pendingCandidates: RTCIceCandidateInit[];
|
23
24
|
restartingIce: boolean;
|
24
25
|
renegotiate: boolean;
|
@@ -65,6 +66,7 @@ export default class PCTransport extends EventEmitter {
|
|
65
66
|
getConnectedAddress(): Promise<string | undefined>;
|
66
67
|
close: () => void;
|
67
68
|
private setMungedSDP;
|
69
|
+
private ensureVideoDDExtensionForSVC;
|
68
70
|
}
|
69
71
|
export {};
|
70
72
|
//# sourceMappingURL=PCTransport.d.ts.map
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Codec, ParticipantInfo, ParticipantPermission } from '@livekit/protocol';
|
2
2
|
import type { InternalRoomOptions } from '../../options';
|
3
3
|
import type RTCEngine from '../RTCEngine';
|
4
|
+
import type { PerformRpcParams, RpcInvocationData } from '../rpc';
|
4
5
|
import LocalTrack from '../track/LocalTrack';
|
5
6
|
import LocalTrackPublication from '../track/LocalTrackPublication';
|
6
7
|
import { Track } from '../track/Track';
|
@@ -29,6 +30,9 @@ export default class LocalParticipant extends Participant {
|
|
29
30
|
private reconnectFuture?;
|
30
31
|
private pendingSignalRequests;
|
31
32
|
private enabledPublishVideoCodecs;
|
33
|
+
private rpcHandlers;
|
34
|
+
private pendingAcks;
|
35
|
+
private pendingResponses;
|
32
36
|
/** @internal */
|
33
37
|
constructor(sid: string, identity: string, engine: RTCEngine, options: InternalRoomOptions);
|
34
38
|
get lastCameraError(): Error | undefined;
|
@@ -44,6 +48,7 @@ export default class LocalParticipant extends Participant {
|
|
44
48
|
private handleReconnected;
|
45
49
|
private handleDisconnected;
|
46
50
|
private handleSignalRequestResponse;
|
51
|
+
private handleDataPacket;
|
47
52
|
/**
|
48
53
|
* Sets and updates the metadata of the local participant.
|
49
54
|
* Note: this requires `canUpdateOwnMetadata` permission.
|
@@ -150,6 +155,46 @@ export default class LocalParticipant extends Participant {
|
|
150
155
|
readonly id: string;
|
151
156
|
readonly timestamp: number;
|
152
157
|
}>;
|
158
|
+
/**
|
159
|
+
* Initiate an RPC call to a remote participant
|
160
|
+
* @param params - Parameters for initiating the RPC call, see {@link PerformRpcParams}
|
161
|
+
* @returns A promise that resolves with the response payload or rejects with an error.
|
162
|
+
* @throws Error on failure. Details in `message`.
|
163
|
+
*/
|
164
|
+
performRpc({ destinationIdentity, method, payload, responseTimeout, }: PerformRpcParams): Promise<string>;
|
165
|
+
/**
|
166
|
+
* Establishes the participant as a receiver for calls of the specified RPC method.
|
167
|
+
* Will overwrite any existing callback for the same method.
|
168
|
+
*
|
169
|
+
* @param method - The name of the indicated RPC method
|
170
|
+
* @param handler - Will be invoked when an RPC request for this method is received
|
171
|
+
* @returns A promise that resolves when the method is successfully registered
|
172
|
+
*
|
173
|
+
* @example
|
174
|
+
* ```typescript
|
175
|
+
* room.localParticipant?.registerRpcMethod(
|
176
|
+
* 'greet',
|
177
|
+
* async (data: RpcInvocationData) => {
|
178
|
+
* console.log(`Received greeting from ${data.callerIdentity}: ${data.payload}`);
|
179
|
+
* return `Hello, ${data.callerIdentity}!`;
|
180
|
+
* }
|
181
|
+
* );
|
182
|
+
* ```
|
183
|
+
*
|
184
|
+
* The handler should return a Promise that resolves to a string.
|
185
|
+
* If unable to respond within `responseTimeout`, the request will result in an error on the caller's side.
|
186
|
+
*
|
187
|
+
* You may throw errors of type `RpcError` with a string `message` in the handler,
|
188
|
+
* and they will be received on the caller's side with the message intact.
|
189
|
+
* Other errors thrown in your handler will not be transmitted as-is, and will instead arrive to the caller as `1500` ("Application Error").
|
190
|
+
*/
|
191
|
+
registerRpcMethod(method: string, handler: (data: RpcInvocationData) => Promise<string>): void;
|
192
|
+
/**
|
193
|
+
* Unregisters a previously registered RPC method.
|
194
|
+
*
|
195
|
+
* @param method - The name of the RPC method to unregister
|
196
|
+
*/
|
197
|
+
unregisterRpcMethod(method: string): void;
|
153
198
|
/**
|
154
199
|
* Control who can subscribe to LocalParticipant's published tracks.
|
155
200
|
*
|
@@ -168,6 +213,17 @@ export default class LocalParticipant extends Participant {
|
|
168
213
|
* participant/track. Any omitted participants will not receive any permissions.
|
169
214
|
*/
|
170
215
|
setTrackSubscriptionPermissions(allParticipantsAllowed: boolean, participantTrackPermissions?: ParticipantTrackPermission[]): void;
|
216
|
+
private handleIncomingRpcAck;
|
217
|
+
private handleIncomingRpcResponse;
|
218
|
+
private handleIncomingRpcRequest;
|
219
|
+
/** @internal */
|
220
|
+
private publishRpcRequest;
|
221
|
+
/** @internal */
|
222
|
+
private publishRpcResponse;
|
223
|
+
/** @internal */
|
224
|
+
private publishRpcAck;
|
225
|
+
/** @internal */
|
226
|
+
handleParticipantDisconnected(participantIdentity: string): void;
|
171
227
|
/** @internal */
|
172
228
|
setEnabledPublishCodecs(codecs: Codec[]): void;
|
173
229
|
/** @internal */
|
@@ -0,0 +1,96 @@
|
|
1
|
+
import { RpcError as RpcError_Proto } from '@livekit/protocol';
|
2
|
+
/** Parameters for initiating an RPC call */
|
3
|
+
export interface PerformRpcParams {
|
4
|
+
/** The `identity` of the destination participant */
|
5
|
+
destinationIdentity: string;
|
6
|
+
/** The method name to call */
|
7
|
+
method: string;
|
8
|
+
/** The method payload */
|
9
|
+
payload: string;
|
10
|
+
/** Timeout for receiving a response after initial connection (milliseconds). Default: 10000 */
|
11
|
+
responseTimeout?: number;
|
12
|
+
}
|
13
|
+
/**
|
14
|
+
* Data passed to method handler for incoming RPC invocations
|
15
|
+
*/
|
16
|
+
export interface RpcInvocationData {
|
17
|
+
/**
|
18
|
+
* The unique request ID. Will match at both sides of the call, useful for debugging or logging.
|
19
|
+
*/
|
20
|
+
requestId: string;
|
21
|
+
/**
|
22
|
+
* The unique participant identity of the caller.
|
23
|
+
*/
|
24
|
+
callerIdentity: string;
|
25
|
+
/**
|
26
|
+
* The payload of the request. User-definable format, typically JSON.
|
27
|
+
*/
|
28
|
+
payload: string;
|
29
|
+
/**
|
30
|
+
* The maximum time the caller will wait for a response.
|
31
|
+
*/
|
32
|
+
responseTimeout: number;
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Specialized error handling for RPC methods.
|
36
|
+
*
|
37
|
+
* Instances of this type, when thrown in a method handler, will have their `message`
|
38
|
+
* serialized and sent across the wire. The sender will receive an equivalent error on the other side.
|
39
|
+
*
|
40
|
+
* Built-in types are included but developers may use any string, with a max length of 256 bytes.
|
41
|
+
*/
|
42
|
+
export declare class RpcError extends Error {
|
43
|
+
static MAX_MESSAGE_BYTES: number;
|
44
|
+
static MAX_DATA_BYTES: number;
|
45
|
+
code: number;
|
46
|
+
data?: string;
|
47
|
+
/**
|
48
|
+
* Creates an error object with the given code and message, plus an optional data payload.
|
49
|
+
*
|
50
|
+
* If thrown in an RPC method handler, the error will be sent back to the caller.
|
51
|
+
*
|
52
|
+
* Error codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings).
|
53
|
+
*/
|
54
|
+
constructor(code: number, message: string, data?: string);
|
55
|
+
/**
|
56
|
+
* @internal
|
57
|
+
*/
|
58
|
+
static fromProto(proto: RpcError_Proto): RpcError;
|
59
|
+
/**
|
60
|
+
* @internal
|
61
|
+
*/
|
62
|
+
toProto(): RpcError_Proto;
|
63
|
+
static ErrorCode: {
|
64
|
+
readonly APPLICATION_ERROR: 1500;
|
65
|
+
readonly CONNECTION_TIMEOUT: 1501;
|
66
|
+
readonly RESPONSE_TIMEOUT: 1502;
|
67
|
+
readonly RECIPIENT_DISCONNECTED: 1503;
|
68
|
+
readonly RESPONSE_PAYLOAD_TOO_LARGE: 1504;
|
69
|
+
readonly SEND_FAILED: 1505;
|
70
|
+
readonly UNSUPPORTED_METHOD: 1400;
|
71
|
+
readonly RECIPIENT_NOT_FOUND: 1401;
|
72
|
+
readonly REQUEST_PAYLOAD_TOO_LARGE: 1402;
|
73
|
+
readonly UNSUPPORTED_SERVER: 1403;
|
74
|
+
readonly UNSUPPORTED_VERSION: 1404;
|
75
|
+
};
|
76
|
+
/**
|
77
|
+
* @internal
|
78
|
+
*/
|
79
|
+
static ErrorMessage: Record<keyof typeof RpcError.ErrorCode, string>;
|
80
|
+
/**
|
81
|
+
* Creates an error object from the code, with an auto-populated message.
|
82
|
+
*
|
83
|
+
* @internal
|
84
|
+
*/
|
85
|
+
static builtIn(key: keyof typeof RpcError.ErrorCode, data?: string): RpcError;
|
86
|
+
}
|
87
|
+
export declare const MAX_PAYLOAD_BYTES = 15360;
|
88
|
+
/**
|
89
|
+
* @internal
|
90
|
+
*/
|
91
|
+
export declare function byteLength(str: string): number;
|
92
|
+
/**
|
93
|
+
* @internal
|
94
|
+
*/
|
95
|
+
export declare function truncateBytes(str: string, maxBytes: number): string;
|
96
|
+
//# sourceMappingURL=rpc.d.ts.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { TrackPublishedResponse } from '@livekit/protocol';
|
2
2
|
import { Track } from './Track';
|
3
3
|
import type { TrackPublication } from './TrackPublication';
|
4
|
-
import type { AudioCaptureOptions, CreateLocalTracksOptions, ScreenShareCaptureOptions, VideoCaptureOptions } from './options';
|
4
|
+
import type { AudioCaptureOptions, CreateLocalTracksOptions, ScreenShareCaptureOptions, VideoCaptureOptions, VideoCodec } from './options';
|
5
5
|
import type { AudioTrack } from './types';
|
6
6
|
export declare function mergeDefaultOptions(options?: CreateLocalTracksOptions, audioDefaults?: AudioCaptureOptions, videoDefaults?: VideoCaptureOptions): CreateLocalTracksOptions;
|
7
7
|
export declare function constraintsForOptions(options: CreateLocalTracksOptions): MediaStreamConstraints;
|
@@ -26,7 +26,7 @@ export declare function sourceToKind(source: Track.Source): MediaDeviceKind | un
|
|
26
26
|
* @internal
|
27
27
|
*/
|
28
28
|
export declare function screenCaptureToDisplayMediaStreamOptions(options: ScreenShareCaptureOptions): DisplayMediaStreamOptions;
|
29
|
-
export declare function mimeTypeToVideoCodecString(mimeType: string):
|
29
|
+
export declare function mimeTypeToVideoCodecString(mimeType: string): VideoCodec;
|
30
30
|
export declare function getTrackPublicationInfo<T extends TrackPublication>(tracks: T[]): TrackPublishedResponse[];
|
31
31
|
export declare function getLogContextFromTrack(track: Track | TrackPublication): Record<string, unknown>;
|
32
32
|
export declare function supportsSynchronizationSources(): boolean;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "livekit-client",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.6.0",
|
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",
|
@@ -88,7 +88,7 @@
|
|
88
88
|
"build": "rollup --config --bundleConfigAsCjs && rollup --config rollup.config.worker.js --bundleConfigAsCjs && pnpm downlevel-dts",
|
89
89
|
"build:watch": "rollup --watch --config --bundleConfigAsCjs",
|
90
90
|
"build:worker:watch": "rollup --watch --config rollup.config.worker.js --bundleConfigAsCjs",
|
91
|
-
"build-docs": "typedoc",
|
91
|
+
"build-docs": "typedoc && mkdir -p docs/assets/github && cp .github/*.png docs/assets/github/ && find docs -name '*.html' -type f -exec sed -i.bak 's|=\"/.github/|=\"assets/github/|g' {} + && find docs -name '*.bak' -delete",
|
92
92
|
"proto": "protoc --es_out src/proto --es_opt target=ts -I./protocol ./protocol/livekit_rtc.proto ./protocol/livekit_models.proto",
|
93
93
|
"examples:demo": "vite examples/demo -c vite.config.mjs",
|
94
94
|
"lint": "eslint src",
|
package/src/index.ts
CHANGED
@@ -39,6 +39,8 @@ import {
|
|
39
39
|
} from './room/utils';
|
40
40
|
import { getBrowser } from './utils/browserParser';
|
41
41
|
|
42
|
+
export { RpcError, type RpcInvocationData, type PerformRpcParams } from './room/rpc';
|
43
|
+
|
42
44
|
export * from './connectionHelper/ConnectionCheck';
|
43
45
|
export * from './connectionHelper/checks/Checker';
|
44
46
|
export * from './e2ee';
|