livekit-server-sdk 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccessToken.d.ts +2 -2
- package/dist/AccessToken.js +2 -2
- package/dist/EgressClient.d.ts +29 -28
- package/dist/EgressClient.d.ts.map +1 -1
- package/dist/EgressClient.js +23 -22
- package/dist/EgressClient.js.map +1 -1
- package/dist/IngressClient.d.ts +13 -12
- package/dist/IngressClient.d.ts.map +1 -1
- package/dist/IngressClient.js +11 -11
- package/dist/IngressClient.js.map +1 -1
- package/dist/RoomServiceClient.d.ts +24 -24
- package/dist/RoomServiceClient.js +16 -16
- package/dist/ServiceBase.d.ts +5 -5
- package/dist/ServiceBase.d.ts.map +1 -1
- package/dist/ServiceBase.js +3 -3
- package/dist/SipClient.d.ts +28 -22
- package/dist/SipClient.d.ts.map +1 -1
- package/dist/SipClient.js +36 -23
- package/dist/SipClient.js.map +1 -1
- package/dist/TwirpRPC.d.ts.map +1 -1
- package/dist/TwirpRPC.js +1 -0
- package/dist/TwirpRPC.js.map +1 -1
- package/dist/WebhookReceiver.d.ts +4 -5
- package/dist/WebhookReceiver.d.ts.map +1 -1
- package/dist/WebhookReceiver.js +3 -4
- package/dist/WebhookReceiver.js.map +1 -1
- package/dist/grants.d.ts.map +1 -1
- package/dist/grants.js +1 -0
- package/dist/grants.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/AccessToken.ts +2 -2
- package/src/EgressClient.ts +40 -33
- package/src/IngressClient.ts +17 -15
- package/src/RoomServiceClient.ts +24 -24
- package/src/ServiceBase.ts +5 -5
- package/src/SipClient.ts +49 -23
- package/src/TwirpRPC.ts +2 -0
- package/src/WebhookReceiver.ts +4 -5
- package/src/grants.test.ts +2 -1
- package/src/grants.ts +1 -0
- package/src/index.ts +3 -1
package/dist/AccessToken.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ export declare class AccessToken {
|
|
|
27
27
|
ttl: number | string;
|
|
28
28
|
/**
|
|
29
29
|
* Creates a new AccessToken
|
|
30
|
-
* @param apiKey API Key, can be set in env LIVEKIT_API_KEY
|
|
31
|
-
* @param apiSecret Secret, can be set in env LIVEKIT_API_SECRET
|
|
30
|
+
* @param apiKey - API Key, can be set in env LIVEKIT_API_KEY
|
|
31
|
+
* @param apiSecret - Secret, can be set in env LIVEKIT_API_SECRET
|
|
32
32
|
*/
|
|
33
33
|
constructor(apiKey?: string, apiSecret?: string, options?: AccessTokenOptions);
|
|
34
34
|
/**
|
package/dist/AccessToken.js
CHANGED
|
@@ -8,8 +8,8 @@ const defaultTTL = `6h`;
|
|
|
8
8
|
export class AccessToken {
|
|
9
9
|
/**
|
|
10
10
|
* Creates a new AccessToken
|
|
11
|
-
* @param apiKey API Key, can be set in env LIVEKIT_API_KEY
|
|
12
|
-
* @param apiSecret Secret, can be set in env LIVEKIT_API_SECRET
|
|
11
|
+
* @param apiKey - API Key, can be set in env LIVEKIT_API_KEY
|
|
12
|
+
* @param apiSecret - Secret, can be set in env LIVEKIT_API_SECRET
|
|
13
13
|
*/
|
|
14
14
|
constructor(apiKey, apiSecret, options) {
|
|
15
15
|
if (!apiKey) {
|
package/dist/EgressClient.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DirectFileOutput,
|
|
1
|
+
import type { DirectFileOutput, EncodedFileOutput, EncodingOptions, EncodingOptionsPreset, ImageOutput, SegmentedFileOutput, StreamOutput } from '@livekit/protocol';
|
|
2
|
+
import { EgressInfo } from '@livekit/protocol';
|
|
2
3
|
import ServiceBase from './ServiceBase.js';
|
|
3
4
|
export interface RoomCompositeOptions {
|
|
4
5
|
/**
|
|
@@ -85,15 +86,15 @@ export interface ListEgressOptions {
|
|
|
85
86
|
export declare class EgressClient extends ServiceBase {
|
|
86
87
|
private readonly rpc;
|
|
87
88
|
/**
|
|
88
|
-
* @param host hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
89
|
-
* @param apiKey API Key, can be set in env var LIVEKIT_API_KEY
|
|
90
|
-
* @param secret API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
89
|
+
* @param host - hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
90
|
+
* @param apiKey - API Key, can be set in env var LIVEKIT_API_KEY
|
|
91
|
+
* @param secret - API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
91
92
|
*/
|
|
92
93
|
constructor(host: string, apiKey?: string, secret?: string);
|
|
93
94
|
/**
|
|
94
|
-
* @param roomName room name
|
|
95
|
-
* @param output file or stream output
|
|
96
|
-
* @param opts RoomCompositeOptions
|
|
95
|
+
* @param roomName - room name
|
|
96
|
+
* @param output - file or stream output
|
|
97
|
+
* @param opts - RoomCompositeOptions
|
|
97
98
|
*/
|
|
98
99
|
startRoomCompositeEgress(roomName: string, output: EncodedOutputs | EncodedFileOutput | StreamOutput | SegmentedFileOutput, opts?: RoomCompositeOptions): Promise<EgressInfo>;
|
|
99
100
|
/**
|
|
@@ -101,23 +102,23 @@ export declare class EgressClient extends ServiceBase {
|
|
|
101
102
|
*/
|
|
102
103
|
startRoomCompositeEgress(roomName: string, output: EncodedOutputs | EncodedFileOutput | StreamOutput | SegmentedFileOutput, layout?: string, options?: EncodingOptionsPreset | EncodingOptions, audioOnly?: boolean, videoOnly?: boolean, customBaseUrl?: string): Promise<EgressInfo>;
|
|
103
104
|
/**
|
|
104
|
-
* @param url url
|
|
105
|
-
* @param output file or stream output
|
|
106
|
-
* @param opts WebOptions
|
|
105
|
+
* @param url - url
|
|
106
|
+
* @param output - file or stream output
|
|
107
|
+
* @param opts - WebOptions
|
|
107
108
|
*/
|
|
108
109
|
startWebEgress(url: string, output: EncodedOutputs | EncodedFileOutput | StreamOutput | SegmentedFileOutput, opts?: WebOptions): Promise<EgressInfo>;
|
|
109
110
|
/**
|
|
110
111
|
* Export a participant's audio and video tracks,
|
|
111
112
|
*
|
|
112
|
-
* @param roomName room name
|
|
113
|
-
* @param output one or more outputs
|
|
114
|
-
* @param opts ParticipantEgressOptions
|
|
113
|
+
* @param roomName - room name
|
|
114
|
+
* @param output - one or more outputs
|
|
115
|
+
* @param opts - ParticipantEgressOptions
|
|
115
116
|
*/
|
|
116
117
|
startParticipantEgress(roomName: string, identity: string, output: EncodedOutputs, opts?: ParticipantEgressOptions): Promise<EgressInfo>;
|
|
117
118
|
/**
|
|
118
|
-
* @param roomName room name
|
|
119
|
-
* @param output file or stream output
|
|
120
|
-
* @param opts TrackCompositeOptions
|
|
119
|
+
* @param roomName - room name
|
|
120
|
+
* @param output - file or stream output
|
|
121
|
+
* @param opts - TrackCompositeOptions
|
|
121
122
|
*/
|
|
122
123
|
startTrackCompositeEgress(roomName: string, output: EncodedOutputs | EncodedFileOutput | StreamOutput | SegmentedFileOutput, opts?: TrackCompositeOptions): Promise<EgressInfo>;
|
|
123
124
|
/**
|
|
@@ -130,34 +131,34 @@ export declare class EgressClient extends ServiceBase {
|
|
|
130
131
|
private isStreamOutput;
|
|
131
132
|
private getOutputParams;
|
|
132
133
|
/**
|
|
133
|
-
* @param roomName room name
|
|
134
|
-
* @param output file or websocket output
|
|
135
|
-
* @param trackId track Id
|
|
134
|
+
* @param roomName - room name
|
|
135
|
+
* @param output - file or websocket output
|
|
136
|
+
* @param trackId - track Id
|
|
136
137
|
*/
|
|
137
138
|
startTrackEgress(roomName: string, output: DirectFileOutput | string, trackId: string): Promise<EgressInfo>;
|
|
138
139
|
/**
|
|
139
|
-
* @param egressId
|
|
140
|
-
* @param layout
|
|
140
|
+
* @param egressId -
|
|
141
|
+
* @param layout -
|
|
141
142
|
*/
|
|
142
143
|
updateLayout(egressId: string, layout: string): Promise<EgressInfo>;
|
|
143
144
|
/**
|
|
144
|
-
* @param egressId
|
|
145
|
-
* @param addOutputUrls
|
|
146
|
-
* @param removeOutputUrls
|
|
145
|
+
* @param egressId -
|
|
146
|
+
* @param addOutputUrls -
|
|
147
|
+
* @param removeOutputUrls -
|
|
147
148
|
*/
|
|
148
149
|
updateStream(egressId: string, addOutputUrls?: string[], removeOutputUrls?: string[]): Promise<EgressInfo>;
|
|
149
150
|
/**
|
|
150
|
-
* @param options options to filter listed Egresses, by default returns all
|
|
151
|
+
* @param options - options to filter listed Egresses, by default returns all
|
|
151
152
|
* Egress instances
|
|
152
153
|
*/
|
|
153
154
|
listEgress(options?: ListEgressOptions): Promise<Array<EgressInfo>>;
|
|
154
155
|
/**
|
|
155
|
-
* @deprecated
|
|
156
|
-
* @param roomName list egress for one room only
|
|
156
|
+
* @deprecated use `listEgress(options?: ListEgressOptions)` instead
|
|
157
|
+
* @param roomName - list egress for one room only
|
|
157
158
|
*/
|
|
158
159
|
listEgress(roomName?: string): Promise<Array<EgressInfo>>;
|
|
159
160
|
/**
|
|
160
|
-
* @param egressId
|
|
161
|
+
* @param egressId -
|
|
161
162
|
*/
|
|
162
163
|
stopEgress(egressId: string): Promise<EgressInfo>;
|
|
163
164
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EgressClient.d.ts","sourceRoot":"","sources":["../src/EgressClient.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"EgressClient.d.ts","sourceRoot":"","sources":["../src/EgressClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,UAAU,EAWX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAM3C,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,eAAe,CAAC,EAAE,qBAAqB,GAAG,eAAe,CAAC;IAC1D;;OAEG;IACH,SAAS,CAAC,EAA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,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,qBAAqB,GAAG,eAAe,GAChD,OAAO,CAAC,UAAU,CAAC;IAqDtB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,eAAe;IAqGvB;;;;OAIG;IACG,gBAAgB,CACpB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,gBAAgB,GAAG,MAAM,EACjC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,CAAC;IAuCtB;;;OAGG;IACG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAUzE;;;;OAIG;IACG,YAAY,CAChB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,EAAE,EACxB,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC1B,OAAO,CAAC,UAAU,CAAC;IAatB;;;OAGG;IACG,UAAU,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACzE;;;OAGG;IACG,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAqB/D;;OAEG;IACG,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;CASxD"}
|
package/dist/EgressClient.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
|
|
2
|
-
//
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
1
|
import { EgressInfo, ListEgressRequest, ListEgressResponse, ParticipantEgressRequest, RoomCompositeEgressRequest, StopEgressRequest, TrackCompositeEgressRequest, TrackEgressRequest, UpdateLayoutRequest, UpdateStreamRequest, WebEgressRequest, } from '@livekit/protocol';
|
|
5
2
|
import ServiceBase from './ServiceBase.js';
|
|
6
3
|
import { TwirpRpc, livekitPackage } from './TwirpRPC.js';
|
|
@@ -10,9 +7,9 @@ const svc = 'Egress';
|
|
|
10
7
|
*/
|
|
11
8
|
export class EgressClient extends ServiceBase {
|
|
12
9
|
/**
|
|
13
|
-
* @param host hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
14
|
-
* @param apiKey API Key, can be set in env var LIVEKIT_API_KEY
|
|
15
|
-
* @param secret API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
10
|
+
* @param host - hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
11
|
+
* @param apiKey - API Key, can be set in env var LIVEKIT_API_KEY
|
|
12
|
+
* @param secret - API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
16
13
|
*/
|
|
17
14
|
constructor(host, apiKey, secret) {
|
|
18
15
|
super(apiKey, secret);
|
|
@@ -55,9 +52,9 @@ export class EgressClient extends ServiceBase {
|
|
|
55
52
|
return EgressInfo.fromJson(data, { ignoreUnknownFields: true });
|
|
56
53
|
}
|
|
57
54
|
/**
|
|
58
|
-
* @param url url
|
|
59
|
-
* @param output file or stream output
|
|
60
|
-
* @param opts WebOptions
|
|
55
|
+
* @param url - url
|
|
56
|
+
* @param output - file or stream output
|
|
57
|
+
* @param opts - WebOptions
|
|
61
58
|
*/
|
|
62
59
|
async startWebEgress(url, output, opts) {
|
|
63
60
|
const audioOnly = (opts === null || opts === void 0 ? void 0 : opts.audioOnly) || false;
|
|
@@ -82,9 +79,9 @@ export class EgressClient extends ServiceBase {
|
|
|
82
79
|
/**
|
|
83
80
|
* Export a participant's audio and video tracks,
|
|
84
81
|
*
|
|
85
|
-
* @param roomName room name
|
|
86
|
-
* @param output one or more outputs
|
|
87
|
-
* @param opts ParticipantEgressOptions
|
|
82
|
+
* @param roomName - room name
|
|
83
|
+
* @param output - one or more outputs
|
|
84
|
+
* @param opts - ParticipantEgressOptions
|
|
88
85
|
*/
|
|
89
86
|
async startParticipantEgress(roomName, identity, output, opts) {
|
|
90
87
|
const { options, fileOutputs, streamOutputs, segmentOutputs, imageOutputs } = this.getOutputParams(output, opts === null || opts === void 0 ? void 0 : opts.encodingOptions);
|
|
@@ -130,20 +127,24 @@ export class EgressClient extends ServiceBase {
|
|
|
130
127
|
const data = await this.rpc.request(svc, 'StartTrackCompositeEgress', req, await this.authHeader({ roomRecord: true }));
|
|
131
128
|
return EgressInfo.fromJson(data, { ignoreUnknownFields: true });
|
|
132
129
|
}
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
133
131
|
isEncodedOutputs(output) {
|
|
134
132
|
return (output.file !== undefined ||
|
|
135
133
|
output.stream !== undefined ||
|
|
136
134
|
output.segments !== undefined);
|
|
137
135
|
}
|
|
136
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
138
137
|
isEncodedFileOutput(output) {
|
|
139
138
|
return (output.filepath !== undefined ||
|
|
140
139
|
output.fileType !== undefined);
|
|
141
140
|
}
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
142
|
isSegmentedFileOutput(output) {
|
|
143
143
|
return (output.filenamePrefix !== undefined ||
|
|
144
144
|
output.playlistName !== undefined ||
|
|
145
145
|
output.filenameSuffix !== undefined);
|
|
146
146
|
}
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
147
148
|
isStreamOutput(output) {
|
|
148
149
|
return (output.protocol !== undefined || output.urls !== undefined);
|
|
149
150
|
}
|
|
@@ -225,9 +226,9 @@ export class EgressClient extends ServiceBase {
|
|
|
225
226
|
};
|
|
226
227
|
}
|
|
227
228
|
/**
|
|
228
|
-
* @param roomName room name
|
|
229
|
-
* @param output file or websocket output
|
|
230
|
-
* @param trackId track Id
|
|
229
|
+
* @param roomName - room name
|
|
230
|
+
* @param output - file or websocket output
|
|
231
|
+
* @param trackId - track Id
|
|
231
232
|
*/
|
|
232
233
|
async startTrackEgress(roomName, output, trackId) {
|
|
233
234
|
let legacyOutput;
|
|
@@ -252,17 +253,17 @@ export class EgressClient extends ServiceBase {
|
|
|
252
253
|
return EgressInfo.fromJson(data, { ignoreUnknownFields: true });
|
|
253
254
|
}
|
|
254
255
|
/**
|
|
255
|
-
* @param egressId
|
|
256
|
-
* @param layout
|
|
256
|
+
* @param egressId -
|
|
257
|
+
* @param layout -
|
|
257
258
|
*/
|
|
258
259
|
async updateLayout(egressId, layout) {
|
|
259
260
|
const data = await this.rpc.request(svc, 'UpdateLayout', new UpdateLayoutRequest({ egressId, layout }).toJson(), await this.authHeader({ roomRecord: true }));
|
|
260
261
|
return EgressInfo.fromJson(data, { ignoreUnknownFields: true });
|
|
261
262
|
}
|
|
262
263
|
/**
|
|
263
|
-
* @param egressId
|
|
264
|
-
* @param addOutputUrls
|
|
265
|
-
* @param removeOutputUrls
|
|
264
|
+
* @param egressId -
|
|
265
|
+
* @param addOutputUrls -
|
|
266
|
+
* @param removeOutputUrls -
|
|
266
267
|
*/
|
|
267
268
|
async updateStream(egressId, addOutputUrls, removeOutputUrls) {
|
|
268
269
|
addOutputUrls !== null && addOutputUrls !== void 0 ? addOutputUrls : (addOutputUrls = []);
|
|
@@ -271,7 +272,7 @@ export class EgressClient extends ServiceBase {
|
|
|
271
272
|
return EgressInfo.fromJson(data, { ignoreUnknownFields: true });
|
|
272
273
|
}
|
|
273
274
|
/**
|
|
274
|
-
* @param roomName list egress for one room only
|
|
275
|
+
* @param roomName - list egress for one room only
|
|
275
276
|
*/
|
|
276
277
|
async listEgress(options) {
|
|
277
278
|
var _a;
|
|
@@ -286,7 +287,7 @@ export class EgressClient extends ServiceBase {
|
|
|
286
287
|
return (_a = ListEgressResponse.fromJson(data, { ignoreUnknownFields: true }).items) !== null && _a !== void 0 ? _a : [];
|
|
287
288
|
}
|
|
288
289
|
/**
|
|
289
|
-
* @param egressId
|
|
290
|
+
* @param egressId -
|
|
290
291
|
*/
|
|
291
292
|
async stopEgress(egressId) {
|
|
292
293
|
const data = await this.rpc.request(svc, 'StopEgress', new StopEgressRequest({ egressId }).toJson(), await this.authHeader({ roomRecord: true }));
|
package/dist/EgressClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EgressClient.js","sourceRoot":"","sources":["../src/EgressClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EgressClient.js","sourceRoot":"","sources":["../src/EgressClient.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,EAC1B,iBAAiB,EACjB,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,GAAG,GAAG,QAAQ,CAAC;AAuFrB;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAG3C;;;;OAIG;IACH,YAAY,IAAY,EAAE,MAAe,EAAE,MAAe;QACxD,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,IAAI,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAChD,CAAC;IAwBD,KAAK,CAAC,wBAAwB,CAC5B,QAAgB,EAChB,MAA+E,EAC/E,YAA4C,EAC5C,OAAiD,EACjD,SAAmB,EACnB,SAAmB,EACnB,aAAsB;QAEtB,IAAI,MAA0B,CAAC;QAC/B,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;YAC/B,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE,CAAC;gBACrC,MAAM,GAAG,YAAY,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,GAAyB,YAAY,CAA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Options,
|
|
1
|
+
import type { IngressAudioOptions, IngressInput, IngressVideoOptions } from '@livekit/protocol';
|
|
2
|
+
import { IngressInfo } from '@livekit/protocol';
|
|
2
3
|
import ServiceBase from './ServiceBase.js';
|
|
3
4
|
export interface CreateIngressOptions {
|
|
4
5
|
/**
|
|
@@ -100,32 +101,32 @@ export interface ListIngressOptions {
|
|
|
100
101
|
export declare class IngressClient extends ServiceBase {
|
|
101
102
|
private readonly rpc;
|
|
102
103
|
/**
|
|
103
|
-
* @param host hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
104
|
-
* @param apiKey API Key, can be set in env var LIVEKIT_API_KEY
|
|
105
|
-
* @param secret API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
104
|
+
* @param host - hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
105
|
+
* @param apiKey - API Key, can be set in env var LIVEKIT_API_KEY
|
|
106
|
+
* @param secret - API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
106
107
|
*/
|
|
107
108
|
constructor(host: string, apiKey?: string, secret?: string);
|
|
108
109
|
/**
|
|
109
|
-
* @param inputType protocol for the ingress
|
|
110
|
-
* @param opts CreateIngressOptions
|
|
110
|
+
* @param inputType - protocol for the ingress
|
|
111
|
+
* @param opts - CreateIngressOptions
|
|
111
112
|
*/
|
|
112
113
|
createIngress(inputType: IngressInput, opts?: CreateIngressOptions): Promise<IngressInfo>;
|
|
113
114
|
/**
|
|
114
|
-
* @param ingressId ID of the ingress to update
|
|
115
|
-
* @param opts UpdateIngressOptions
|
|
115
|
+
* @param ingressId - ID of the ingress to update
|
|
116
|
+
* @param opts - UpdateIngressOptions
|
|
116
117
|
*/
|
|
117
118
|
updateIngress(ingressId: string, opts: UpdateIngressOptions): Promise<IngressInfo>;
|
|
118
119
|
/**
|
|
119
|
-
* @deprecated use listIngress(opts) instead
|
|
120
|
-
* @param roomName list ingress for one room only
|
|
120
|
+
* @deprecated use `listIngress(opts)` or `listIngress(arg)` instead
|
|
121
|
+
* @param roomName - list ingress for one room only
|
|
121
122
|
*/
|
|
122
123
|
listIngress(roomName?: string): Promise<Array<IngressInfo>>;
|
|
123
124
|
/**
|
|
124
|
-
* @param opts list options
|
|
125
|
+
* @param opts - list options
|
|
125
126
|
*/
|
|
126
127
|
listIngress(opts?: ListIngressOptions): Promise<Array<IngressInfo>>;
|
|
127
128
|
/**
|
|
128
|
-
* @param ingressId ingress to delete
|
|
129
|
+
* @param ingressId - ingress to delete
|
|
129
130
|
*/
|
|
130
131
|
deleteIngress(ingressId: string): Promise<IngressInfo>;
|
|
131
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IngressClient.d.ts","sourceRoot":"","sources":["../src/IngressClient.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"IngressClient.d.ts","sourceRoot":"","sources":["../src/IngressClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAGL,WAAW,EAIZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAM3C,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5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C,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAoBzE;;OAEG;IACG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAS7D"}
|
package/dist/IngressClient.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// SPDX-FileCopyrightText: 2024 LiveKit, Inc.
|
|
2
|
-
//
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
1
|
import { CreateIngressRequest, DeleteIngressRequest, IngressInfo, ListIngressRequest, ListIngressResponse, UpdateIngressRequest, } from '@livekit/protocol';
|
|
5
2
|
import ServiceBase from './ServiceBase.js';
|
|
6
3
|
import { TwirpRpc, livekitPackage } from './TwirpRPC.js';
|
|
@@ -10,17 +7,17 @@ const svc = 'Ingress';
|
|
|
10
7
|
*/
|
|
11
8
|
export class IngressClient extends ServiceBase {
|
|
12
9
|
/**
|
|
13
|
-
* @param host hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
14
|
-
* @param apiKey API Key, can be set in env var LIVEKIT_API_KEY
|
|
15
|
-
* @param secret API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
10
|
+
* @param host - hostname including protocol. i.e. 'https://cluster.livekit.io'
|
|
11
|
+
* @param apiKey - API Key, can be set in env var LIVEKIT_API_KEY
|
|
12
|
+
* @param secret - API Secret, can be set in env var LIVEKIT_API_SECRET
|
|
16
13
|
*/
|
|
17
14
|
constructor(host, apiKey, secret) {
|
|
18
15
|
super(apiKey, secret);
|
|
19
16
|
this.rpc = new TwirpRpc(host, livekitPackage);
|
|
20
17
|
}
|
|
21
18
|
/**
|
|
22
|
-
* @param inputType protocol for the ingress
|
|
23
|
-
* @param opts CreateIngressOptions
|
|
19
|
+
* @param inputType - protocol for the ingress
|
|
20
|
+
* @param opts - CreateIngressOptions
|
|
24
21
|
*/
|
|
25
22
|
async createIngress(inputType, opts) {
|
|
26
23
|
let name = '';
|
|
@@ -62,8 +59,8 @@ export class IngressClient extends ServiceBase {
|
|
|
62
59
|
return IngressInfo.fromJson(data, { ignoreUnknownFields: true });
|
|
63
60
|
}
|
|
64
61
|
/**
|
|
65
|
-
* @param ingressId ID of the ingress to update
|
|
66
|
-
* @param opts UpdateIngressOptions
|
|
62
|
+
* @param ingressId - ID of the ingress to update
|
|
63
|
+
* @param opts - UpdateIngressOptions
|
|
67
64
|
*/
|
|
68
65
|
async updateIngress(ingressId, opts) {
|
|
69
66
|
const name = opts.name || '';
|
|
@@ -87,6 +84,9 @@ export class IngressClient extends ServiceBase {
|
|
|
87
84
|
const data = await this.rpc.request(svc, 'UpdateIngress', req, await this.authHeader({ ingressAdmin: true }));
|
|
88
85
|
return IngressInfo.fromJson(data, { ignoreUnknownFields: true });
|
|
89
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* @param arg - list room name or options
|
|
89
|
+
*/
|
|
90
90
|
async listIngress(arg) {
|
|
91
91
|
var _a;
|
|
92
92
|
let req = {};
|
|
@@ -100,7 +100,7 @@ export class IngressClient extends ServiceBase {
|
|
|
100
100
|
return (_a = ListIngressResponse.fromJson(data, { ignoreUnknownFields: true }).items) !== null && _a !== void 0 ? _a : [];
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
* @param ingressId ingress to delete
|
|
103
|
+
* @param ingressId - ingress to delete
|
|
104
104
|
*/
|
|
105
105
|
async deleteIngress(ingressId) {
|
|
106
106
|
const data = await this.rpc.request(svc, 'DeleteIngress', new DeleteIngressRequest({ ingressId }).toJson(), await this.authHeader({ ingressAdmin: true }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IngressClient.js","sourceRoot":"","sources":["../src/IngressClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IngressClient.js","sourceRoot":"","sources":["../src/IngressClient.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,kBAAk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AAI,CAAC,UAAU,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAC9C,CAAC;QACF,OAAO,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
|
|
@@ -82,7 +82,7 @@ export declare class RoomServiceClient extends ServiceBase {
|
|
|
82
82
|
* Creates a new room. Explicit room creation is not required, since rooms will
|
|
83
83
|
* be automatically created when the first participant joins. This method can be
|
|
84
84
|
* used to customize room settings.
|
|
85
|
-
* @param options
|
|
85
|
+
* @param options -
|
|
86
86
|
*/
|
|
87
87
|
createRoom(options: CreateOptions): Promise<Room>;
|
|
88
88
|
/**
|
|
@@ -95,36 +95,36 @@ export declare class RoomServiceClient extends ServiceBase {
|
|
|
95
95
|
deleteRoom(room: string): Promise<void>;
|
|
96
96
|
/**
|
|
97
97
|
* Update metadata of a room
|
|
98
|
-
* @param room name of the room
|
|
99
|
-
* @param metadata the new metadata for the room
|
|
98
|
+
* @param room - name of the room
|
|
99
|
+
* @param metadata - the new metadata for the room
|
|
100
100
|
*/
|
|
101
101
|
updateRoomMetadata(room: string, metadata: string): Promise<Room>;
|
|
102
102
|
/**
|
|
103
103
|
* List participants in a room
|
|
104
|
-
* @param room name of the room
|
|
104
|
+
* @param room - name of the room
|
|
105
105
|
*/
|
|
106
106
|
listParticipants(room: string): Promise<ParticipantInfo[]>;
|
|
107
107
|
/**
|
|
108
108
|
* Get information on a specific participant, including the tracks that participant
|
|
109
109
|
* has published
|
|
110
|
-
* @param room name of the room
|
|
111
|
-
* @param identity identity of the participant to return
|
|
110
|
+
* @param room - name of the room
|
|
111
|
+
* @param identity - identity of the participant to return
|
|
112
112
|
*/
|
|
113
113
|
getParticipant(room: string, identity: string): Promise<ParticipantInfo>;
|
|
114
114
|
/**
|
|
115
115
|
* Removes a participant in the room. This will disconnect the participant
|
|
116
116
|
* and will emit a Disconnected event for that participant.
|
|
117
117
|
* Even after being removed, the participant can still re-join the room.
|
|
118
|
-
* @param room
|
|
119
|
-
* @param identity
|
|
118
|
+
* @param room -
|
|
119
|
+
* @param identity -
|
|
120
120
|
*/
|
|
121
121
|
removeParticipant(room: string, identity: string): Promise<void>;
|
|
122
122
|
/**
|
|
123
123
|
* Mutes a track that the participant has published.
|
|
124
|
-
* @param room
|
|
125
|
-
* @param identity
|
|
126
|
-
* @param trackSid sid of the track to be muted
|
|
127
|
-
* @param muted true to mute, false to unmute
|
|
124
|
+
* @param room -
|
|
125
|
+
* @param identity -
|
|
126
|
+
* @param trackSid - sid of the track to be muted
|
|
127
|
+
* @param muted - true to mute, false to unmute
|
|
128
128
|
*/
|
|
129
129
|
mutePublishedTrack(room: string, identity: string, trackSid: string, muted: boolean): Promise<TrackInfo>;
|
|
130
130
|
/**
|
|
@@ -143,27 +143,27 @@ export declare class RoomServiceClient extends ServiceBase {
|
|
|
143
143
|
updateParticipant(room: string, identity: string, metadata?: string, permission?: Partial<ParticipantPermission>, name?: string): Promise<ParticipantInfo>;
|
|
144
144
|
/**
|
|
145
145
|
* Updates a participant's subscription to tracks
|
|
146
|
-
* @param room
|
|
147
|
-
* @param identity
|
|
148
|
-
* @param trackSids
|
|
149
|
-
* @param subscribe true to subscribe, false to unsubscribe
|
|
146
|
+
* @param room -
|
|
147
|
+
* @param identity -
|
|
148
|
+
* @param trackSids -
|
|
149
|
+
* @param subscribe - true to subscribe, false to unsubscribe
|
|
150
150
|
*/
|
|
151
151
|
updateSubscriptions(room: string, identity: string, trackSids: string[], subscribe: boolean): Promise<void>;
|
|
152
152
|
/**
|
|
153
153
|
* Sends data message to participants in the room
|
|
154
|
-
* @param room
|
|
155
|
-
* @param data opaque payload to send
|
|
156
|
-
* @param kind delivery reliability
|
|
157
|
-
* @param options optionally specify a topic and destinationSids (when destinationSids is empty, message is sent to everyone)
|
|
154
|
+
* @param room -
|
|
155
|
+
* @param data - opaque payload to send
|
|
156
|
+
* @param kind - delivery reliability
|
|
157
|
+
* @param options - optionally specify a topic and destinationSids (when destinationSids is empty, message is sent to everyone)
|
|
158
158
|
*/
|
|
159
159
|
sendData(room: string, data: Uint8Array, kind: DataPacket_Kind, options: SendDataOptions): Promise<void>;
|
|
160
160
|
/**
|
|
161
161
|
* Sends data message to participants in the room
|
|
162
162
|
* @deprecated use sendData(room, data, kind, options) instead
|
|
163
|
-
* @param room
|
|
164
|
-
* @param data opaque payload to send
|
|
165
|
-
* @param kind delivery reliability
|
|
166
|
-
* @param destinationSids optional. when empty, message is sent to everyone
|
|
163
|
+
* @param room -
|
|
164
|
+
* @param data - opaque payload to send
|
|
165
|
+
* @param kind - delivery reliability
|
|
166
|
+
* @param destinationSids - optional. when empty, message is sent to everyone
|
|
167
167
|
*/
|
|
168
168
|
sendData(room: string, data: Uint8Array, kind: DataPacket_Kind, destinationSids?: string[]): Promise<void>;
|
|
169
169
|
}
|
|
@@ -20,7 +20,7 @@ export class RoomServiceClient extends ServiceBase {
|
|
|
20
20
|
* Creates a new room. Explicit room creation is not required, since rooms will
|
|
21
21
|
* be automatically created when the first participant joins. This method can be
|
|
22
22
|
* used to customize room settings.
|
|
23
|
-
* @param options
|
|
23
|
+
* @param options -
|
|
24
24
|
*/
|
|
25
25
|
async createRoom(options) {
|
|
26
26
|
const data = await this.rpc.request(svc, 'CreateRoom', new CreateRoomRequest(options).toJson(), await this.authHeader({ roomCreate: true }));
|
|
@@ -43,8 +43,8 @@ export class RoomServiceClient extends ServiceBase {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Update metadata of a room
|
|
46
|
-
* @param room name of the room
|
|
47
|
-
* @param metadata the new metadata for the room
|
|
46
|
+
* @param room - name of the room
|
|
47
|
+
* @param metadata - the new metadata for the room
|
|
48
48
|
*/
|
|
49
49
|
async updateRoomMetadata(room, metadata) {
|
|
50
50
|
const data = await this.rpc.request(svc, 'UpdateRoomMetadata', new UpdateRoomMetadataRequest({ room, metadata }).toJson(), await this.authHeader({ roomAdmin: true, room }));
|
|
@@ -52,7 +52,7 @@ export class RoomServiceClient extends ServiceBase {
|
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* List participants in a room
|
|
55
|
-
* @param room name of the room
|
|
55
|
+
* @param room - name of the room
|
|
56
56
|
*/
|
|
57
57
|
async listParticipants(room) {
|
|
58
58
|
var _a;
|
|
@@ -63,8 +63,8 @@ export class RoomServiceClient extends ServiceBase {
|
|
|
63
63
|
/**
|
|
64
64
|
* Get information on a specific participant, including the tracks that participant
|
|
65
65
|
* has published
|
|
66
|
-
* @param room name of the room
|
|
67
|
-
* @param identity identity of the participant to return
|
|
66
|
+
* @param room - name of the room
|
|
67
|
+
* @param identity - identity of the participant to return
|
|
68
68
|
*/
|
|
69
69
|
async getParticipant(room, identity) {
|
|
70
70
|
const data = await this.rpc.request(svc, 'GetParticipant', new RoomParticipantIdentity({ room, identity }).toJson(), await this.authHeader({ roomAdmin: true, room }));
|
|
@@ -74,18 +74,18 @@ export class RoomServiceClient extends ServiceBase {
|
|
|
74
74
|
* Removes a participant in the room. This will disconnect the participant
|
|
75
75
|
* and will emit a Disconnected event for that participant.
|
|
76
76
|
* Even after being removed, the participant can still re-join the room.
|
|
77
|
-
* @param room
|
|
78
|
-
* @param identity
|
|
77
|
+
* @param room -
|
|
78
|
+
* @param identity -
|
|
79
79
|
*/
|
|
80
80
|
async removeParticipant(room, identity) {
|
|
81
81
|
await this.rpc.request(svc, 'RemoveParticipant', new RoomParticipantIdentity({ room, identity }).toJson(), await this.authHeader({ roomAdmin: true, room }));
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Mutes a track that the participant has published.
|
|
85
|
-
* @param room
|
|
86
|
-
* @param identity
|
|
87
|
-
* @param trackSid sid of the track to be muted
|
|
88
|
-
* @param muted true to mute, false to unmute
|
|
85
|
+
* @param room -
|
|
86
|
+
* @param identity -
|
|
87
|
+
* @param trackSid - sid of the track to be muted
|
|
88
|
+
* @param muted - true to mute, false to unmute
|
|
89
89
|
*/
|
|
90
90
|
async mutePublishedTrack(room, identity, trackSid, muted) {
|
|
91
91
|
const req = new MuteRoomTrackRequest({
|
|
@@ -121,10 +121,10 @@ export class RoomServiceClient extends ServiceBase {
|
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* Updates a participant's subscription to tracks
|
|
124
|
-
* @param room
|
|
125
|
-
* @param identity
|
|
126
|
-
* @param trackSids
|
|
127
|
-
* @param subscribe true to subscribe, false to unsubscribe
|
|
124
|
+
* @param room -
|
|
125
|
+
* @param identity -
|
|
126
|
+
* @param trackSids -
|
|
127
|
+
* @param subscribe - true to subscribe, false to unsubscribe
|
|
128
128
|
*/
|
|
129
129
|
async updateSubscriptions(room, identity, trackSids, subscribe) {
|
|
130
130
|
const req = new UpdateSubscriptionsRequest({
|