livekit-server-sdk 1.2.6 → 2.0.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.
Files changed (80) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.github/workflows/release.yaml +46 -0
  4. package/.github/workflows/test.yaml +21 -21
  5. package/.prettierignore +1 -0
  6. package/CHANGELOG.md +23 -0
  7. package/NOTICE +13 -0
  8. package/README.md +47 -13
  9. package/dist/AccessToken.d.ts +4 -4
  10. package/dist/AccessToken.js +23 -42
  11. package/dist/AccessToken.js.map +1 -1
  12. package/dist/EgressClient.d.ts +21 -2
  13. package/dist/EgressClient.js +183 -170
  14. package/dist/EgressClient.js.map +1 -1
  15. package/dist/IngressClient.d.ts +17 -2
  16. package/dist/IngressClient.js +68 -89
  17. package/dist/IngressClient.js.map +1 -1
  18. package/dist/RoomServiceClient.d.ts +22 -5
  19. package/dist/RoomServiceClient.js +70 -105
  20. package/dist/RoomServiceClient.js.map +1 -1
  21. package/dist/ServiceBase.d.ts +2 -2
  22. package/dist/ServiceBase.js +5 -8
  23. package/dist/ServiceBase.js.map +1 -1
  24. package/dist/TwirpRPC.d.ts +2 -3
  25. package/dist/TwirpRPC.js +15 -23
  26. package/dist/TwirpRPC.js.map +1 -1
  27. package/dist/WebhookReceiver.d.ts +15 -2
  28. package/dist/WebhookReceiver.js +29 -19
  29. package/dist/WebhookReceiver.js.map +1 -1
  30. package/dist/grants.d.ts +2 -1
  31. package/dist/grants.js +2 -5
  32. package/dist/grants.js.map +1 -1
  33. package/dist/index.d.ts +9 -10
  34. package/dist/index.js +9 -48
  35. package/dist/index.js.map +1 -1
  36. package/dist/proto/livekit_egress_pb.d.ts +1650 -0
  37. package/dist/proto/livekit_egress_pb.js +1878 -0
  38. package/dist/proto/livekit_egress_pb.js.map +1 -0
  39. package/dist/proto/livekit_ingress_pb.d.ts +624 -0
  40. package/dist/proto/livekit_ingress_pb.js +824 -0
  41. package/dist/proto/livekit_ingress_pb.js.map +1 -0
  42. package/dist/proto/livekit_models_pb.d.ts +1349 -0
  43. package/dist/proto/livekit_models_pb.js +1829 -0
  44. package/dist/proto/livekit_models_pb.js.map +1 -0
  45. package/dist/proto/livekit_room_pb.d.ts +460 -0
  46. package/dist/proto/livekit_room_pb.js +695 -0
  47. package/dist/proto/livekit_room_pb.js.map +1 -0
  48. package/dist/proto/livekit_webhook_pb.d.ts +70 -0
  49. package/dist/proto/livekit_webhook_pb.js +76 -0
  50. package/dist/proto/livekit_webhook_pb.js.map +1 -0
  51. package/generate-proto.sh +1 -18
  52. package/package.json +32 -28
  53. package/tsconfig.eslint.json +2 -1
  54. package/vite.config.js +8 -0
  55. package/.github/workflows/publish.yaml +0 -57
  56. package/dist/AccessToken.test.d.ts +0 -1
  57. package/dist/AccessToken.test.js +0 -72
  58. package/dist/AccessToken.test.js.map +0 -1
  59. package/dist/WebhookReceiver.test.d.ts +0 -1
  60. package/dist/WebhookReceiver.test.js +0 -39
  61. package/dist/WebhookReceiver.test.js.map +0 -1
  62. package/dist/proto/google/protobuf/timestamp.d.ts +0 -132
  63. package/dist/proto/google/protobuf/timestamp.js +0 -92
  64. package/dist/proto/google/protobuf/timestamp.js.map +0 -1
  65. package/dist/proto/livekit_egress.d.ts +0 -11286
  66. package/dist/proto/livekit_egress.js +0 -2889
  67. package/dist/proto/livekit_egress.js.map +0 -1
  68. package/dist/proto/livekit_ingress.d.ts +0 -2249
  69. package/dist/proto/livekit_ingress.js +0 -1360
  70. package/dist/proto/livekit_ingress.js.map +0 -1
  71. package/dist/proto/livekit_models.d.ts +0 -1454
  72. package/dist/proto/livekit_models.js +0 -3066
  73. package/dist/proto/livekit_models.js.map +0 -1
  74. package/dist/proto/livekit_room.d.ts +0 -3316
  75. package/dist/proto/livekit_room.js +0 -1074
  76. package/dist/proto/livekit_room.js.map +0 -1
  77. package/dist/proto/livekit_webhook.d.ts +0 -4899
  78. package/dist/proto/livekit_webhook.js +0 -179
  79. package/dist/proto/livekit_webhook.js.map +0 -1
  80. /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
@@ -0,0 +1,824 @@
1
+ // Copyright 2023 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
15
+ import { AudioCodec, TrackInfo, TrackSource, VideoCodec, VideoLayer } from "./livekit_models_pb.js";
16
+ /**
17
+ * @generated from enum livekit.IngressInput
18
+ */
19
+ export var IngressInput;
20
+ (function (IngressInput) {
21
+ /**
22
+ * @generated from enum value: RTMP_INPUT = 0;
23
+ */
24
+ IngressInput[IngressInput["RTMP_INPUT"] = 0] = "RTMP_INPUT";
25
+ /**
26
+ * @generated from enum value: WHIP_INPUT = 1;
27
+ */
28
+ IngressInput[IngressInput["WHIP_INPUT"] = 1] = "WHIP_INPUT";
29
+ /**
30
+ * Pull from the provided URL. Only HTTP url are supported, serving either a single media file or a HLS stream
31
+ *
32
+ * @generated from enum value: URL_INPUT = 2;
33
+ */
34
+ IngressInput[IngressInput["URL_INPUT"] = 2] = "URL_INPUT";
35
+ })(IngressInput || (IngressInput = {}));
36
+ // Retrieve enum metadata with: proto3.getEnumType(IngressInput)
37
+ proto3.util.setEnumType(IngressInput, "livekit.IngressInput", [
38
+ { no: 0, name: "RTMP_INPUT" },
39
+ { no: 1, name: "WHIP_INPUT" },
40
+ { no: 2, name: "URL_INPUT" },
41
+ ]);
42
+ /**
43
+ * @generated from enum livekit.IngressAudioEncodingPreset
44
+ */
45
+ export var IngressAudioEncodingPreset;
46
+ (function (IngressAudioEncodingPreset) {
47
+ /**
48
+ * OPUS, 2 channels, 96kbps
49
+ *
50
+ * @generated from enum value: OPUS_STEREO_96KBPS = 0;
51
+ */
52
+ IngressAudioEncodingPreset[IngressAudioEncodingPreset["OPUS_STEREO_96KBPS"] = 0] = "OPUS_STEREO_96KBPS";
53
+ /**
54
+ * OPUS, 1 channel, 64kbps
55
+ *
56
+ * @generated from enum value: OPUS_MONO_64KBS = 1;
57
+ */
58
+ IngressAudioEncodingPreset[IngressAudioEncodingPreset["OPUS_MONO_64KBS"] = 1] = "OPUS_MONO_64KBS";
59
+ })(IngressAudioEncodingPreset || (IngressAudioEncodingPreset = {}));
60
+ // Retrieve enum metadata with: proto3.getEnumType(IngressAudioEncodingPreset)
61
+ proto3.util.setEnumType(IngressAudioEncodingPreset, "livekit.IngressAudioEncodingPreset", [
62
+ { no: 0, name: "OPUS_STEREO_96KBPS" },
63
+ { no: 1, name: "OPUS_MONO_64KBS" },
64
+ ]);
65
+ /**
66
+ * @generated from enum livekit.IngressVideoEncodingPreset
67
+ */
68
+ export var IngressVideoEncodingPreset;
69
+ (function (IngressVideoEncodingPreset) {
70
+ /**
71
+ * 1280x720, 30fps, 1900kbps main layer, 3 layers total
72
+ *
73
+ * @generated from enum value: H264_720P_30FPS_3_LAYERS = 0;
74
+ */
75
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_720P_30FPS_3_LAYERS"] = 0] = "H264_720P_30FPS_3_LAYERS";
76
+ /**
77
+ * 1980x1080, 30fps, 3500kbps main layer, 3 layers total
78
+ *
79
+ * @generated from enum value: H264_1080P_30FPS_3_LAYERS = 1;
80
+ */
81
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_1080P_30FPS_3_LAYERS"] = 1] = "H264_1080P_30FPS_3_LAYERS";
82
+ /**
83
+ * 960x540, 25fps, 1000kbps main layer, 2 layers total
84
+ *
85
+ * @generated from enum value: H264_540P_25FPS_2_LAYERS = 2;
86
+ */
87
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_540P_25FPS_2_LAYERS"] = 2] = "H264_540P_25FPS_2_LAYERS";
88
+ /**
89
+ * 1280x720, 30fps, 1900kbps, no simulcast
90
+ *
91
+ * @generated from enum value: H264_720P_30FPS_1_LAYER = 3;
92
+ */
93
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_720P_30FPS_1_LAYER"] = 3] = "H264_720P_30FPS_1_LAYER";
94
+ /**
95
+ * 1980x1080, 30fps, 3500kbps, no simulcast
96
+ *
97
+ * @generated from enum value: H264_1080P_30FPS_1_LAYER = 4;
98
+ */
99
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_1080P_30FPS_1_LAYER"] = 4] = "H264_1080P_30FPS_1_LAYER";
100
+ /**
101
+ * 1280x720, 30fps, 2500kbps main layer, 3 layers total, higher bitrate for high motion, harder to encode content
102
+ *
103
+ * @generated from enum value: H264_720P_30FPS_3_LAYERS_HIGH_MOTION = 5;
104
+ */
105
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_720P_30FPS_3_LAYERS_HIGH_MOTION"] = 5] = "H264_720P_30FPS_3_LAYERS_HIGH_MOTION";
106
+ /**
107
+ * 1980x1080, 30fps, 4500kbps main layer, 3 layers total, higher bitrate for high motion, harder to encode content
108
+ *
109
+ * @generated from enum value: H264_1080P_30FPS_3_LAYERS_HIGH_MOTION = 6;
110
+ */
111
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_1080P_30FPS_3_LAYERS_HIGH_MOTION"] = 6] = "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION";
112
+ /**
113
+ * 960x540, 25fps, 1300kbps main layer, 2 layers total, higher bitrate for high motion, harder to encode content
114
+ *
115
+ * @generated from enum value: H264_540P_25FPS_2_LAYERS_HIGH_MOTION = 7;
116
+ */
117
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_540P_25FPS_2_LAYERS_HIGH_MOTION"] = 7] = "H264_540P_25FPS_2_LAYERS_HIGH_MOTION";
118
+ /**
119
+ * 1280x720, 30fps, 2500kbps, no simulcast, higher bitrate for high motion, harder to encode content
120
+ *
121
+ * @generated from enum value: H264_720P_30FPS_1_LAYER_HIGH_MOTION = 8;
122
+ */
123
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_720P_30FPS_1_LAYER_HIGH_MOTION"] = 8] = "H264_720P_30FPS_1_LAYER_HIGH_MOTION";
124
+ /**
125
+ * 1980x1080, 30fps, 4500kbps, no simulcast, higher bitrate for high motion, harder to encode content
126
+ *
127
+ * @generated from enum value: H264_1080P_30FPS_1_LAYER_HIGH_MOTION = 9;
128
+ */
129
+ IngressVideoEncodingPreset[IngressVideoEncodingPreset["H264_1080P_30FPS_1_LAYER_HIGH_MOTION"] = 9] = "H264_1080P_30FPS_1_LAYER_HIGH_MOTION";
130
+ })(IngressVideoEncodingPreset || (IngressVideoEncodingPreset = {}));
131
+ // Retrieve enum metadata with: proto3.getEnumType(IngressVideoEncodingPreset)
132
+ proto3.util.setEnumType(IngressVideoEncodingPreset, "livekit.IngressVideoEncodingPreset", [
133
+ { no: 0, name: "H264_720P_30FPS_3_LAYERS" },
134
+ { no: 1, name: "H264_1080P_30FPS_3_LAYERS" },
135
+ { no: 2, name: "H264_540P_25FPS_2_LAYERS" },
136
+ { no: 3, name: "H264_720P_30FPS_1_LAYER" },
137
+ { no: 4, name: "H264_1080P_30FPS_1_LAYER" },
138
+ { no: 5, name: "H264_720P_30FPS_3_LAYERS_HIGH_MOTION" },
139
+ { no: 6, name: "H264_1080P_30FPS_3_LAYERS_HIGH_MOTION" },
140
+ { no: 7, name: "H264_540P_25FPS_2_LAYERS_HIGH_MOTION" },
141
+ { no: 8, name: "H264_720P_30FPS_1_LAYER_HIGH_MOTION" },
142
+ { no: 9, name: "H264_1080P_30FPS_1_LAYER_HIGH_MOTION" },
143
+ ]);
144
+ /**
145
+ * @generated from message livekit.CreateIngressRequest
146
+ */
147
+ export class CreateIngressRequest extends Message {
148
+ constructor(data) {
149
+ super();
150
+ /**
151
+ * @generated from field: livekit.IngressInput input_type = 1;
152
+ */
153
+ this.inputType = IngressInput.RTMP_INPUT;
154
+ /**
155
+ * Where to pull media from, only for URL input type
156
+ *
157
+ * @generated from field: string url = 9;
158
+ */
159
+ this.url = "";
160
+ /**
161
+ * User provided identifier for the ingress
162
+ *
163
+ * @generated from field: string name = 2;
164
+ */
165
+ this.name = "";
166
+ /**
167
+ * room to publish to
168
+ *
169
+ * @generated from field: string room_name = 3;
170
+ */
171
+ this.roomName = "";
172
+ /**
173
+ * publish as participant
174
+ *
175
+ * @generated from field: string participant_identity = 4;
176
+ */
177
+ this.participantIdentity = "";
178
+ /**
179
+ * name of publishing participant (used for display only)
180
+ *
181
+ * @generated from field: string participant_name = 5;
182
+ */
183
+ this.participantName = "";
184
+ /**
185
+ * whether to pass through the incoming media without transcoding, only compatible with some input types
186
+ *
187
+ * @generated from field: bool bypass_transcoding = 8;
188
+ */
189
+ this.bypassTranscoding = false;
190
+ proto3.util.initPartial(data, this);
191
+ }
192
+ static fromBinary(bytes, options) {
193
+ return new CreateIngressRequest().fromBinary(bytes, options);
194
+ }
195
+ static fromJson(jsonValue, options) {
196
+ return new CreateIngressRequest().fromJson(jsonValue, options);
197
+ }
198
+ static fromJsonString(jsonString, options) {
199
+ return new CreateIngressRequest().fromJsonString(jsonString, options);
200
+ }
201
+ static equals(a, b) {
202
+ return proto3.util.equals(CreateIngressRequest, a, b);
203
+ }
204
+ }
205
+ CreateIngressRequest.runtime = proto3;
206
+ CreateIngressRequest.typeName = "livekit.CreateIngressRequest";
207
+ CreateIngressRequest.fields = proto3.util.newFieldList(() => [
208
+ { no: 1, name: "input_type", kind: "enum", T: proto3.getEnumType(IngressInput) },
209
+ { no: 9, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
210
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
211
+ { no: 3, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
212
+ { no: 4, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
213
+ { no: 5, name: "participant_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
214
+ { no: 8, name: "bypass_transcoding", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
215
+ { no: 6, name: "audio", kind: "message", T: IngressAudioOptions },
216
+ { no: 7, name: "video", kind: "message", T: IngressVideoOptions },
217
+ ]);
218
+ /**
219
+ * @generated from message livekit.IngressAudioOptions
220
+ */
221
+ export class IngressAudioOptions extends Message {
222
+ constructor(data) {
223
+ super();
224
+ /**
225
+ * @generated from field: string name = 1;
226
+ */
227
+ this.name = "";
228
+ /**
229
+ * @generated from field: livekit.TrackSource source = 2;
230
+ */
231
+ this.source = TrackSource.UNKNOWN;
232
+ /**
233
+ * @generated from oneof livekit.IngressAudioOptions.encoding_options
234
+ */
235
+ this.encodingOptions = { case: undefined };
236
+ proto3.util.initPartial(data, this);
237
+ }
238
+ static fromBinary(bytes, options) {
239
+ return new IngressAudioOptions().fromBinary(bytes, options);
240
+ }
241
+ static fromJson(jsonValue, options) {
242
+ return new IngressAudioOptions().fromJson(jsonValue, options);
243
+ }
244
+ static fromJsonString(jsonString, options) {
245
+ return new IngressAudioOptions().fromJsonString(jsonString, options);
246
+ }
247
+ static equals(a, b) {
248
+ return proto3.util.equals(IngressAudioOptions, a, b);
249
+ }
250
+ }
251
+ IngressAudioOptions.runtime = proto3;
252
+ IngressAudioOptions.typeName = "livekit.IngressAudioOptions";
253
+ IngressAudioOptions.fields = proto3.util.newFieldList(() => [
254
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
255
+ { no: 2, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) },
256
+ { no: 3, name: "preset", kind: "enum", T: proto3.getEnumType(IngressAudioEncodingPreset), oneof: "encoding_options" },
257
+ { no: 4, name: "options", kind: "message", T: IngressAudioEncodingOptions, oneof: "encoding_options" },
258
+ ]);
259
+ /**
260
+ * @generated from message livekit.IngressVideoOptions
261
+ */
262
+ export class IngressVideoOptions extends Message {
263
+ constructor(data) {
264
+ super();
265
+ /**
266
+ * @generated from field: string name = 1;
267
+ */
268
+ this.name = "";
269
+ /**
270
+ * @generated from field: livekit.TrackSource source = 2;
271
+ */
272
+ this.source = TrackSource.UNKNOWN;
273
+ /**
274
+ * @generated from oneof livekit.IngressVideoOptions.encoding_options
275
+ */
276
+ this.encodingOptions = { case: undefined };
277
+ proto3.util.initPartial(data, this);
278
+ }
279
+ static fromBinary(bytes, options) {
280
+ return new IngressVideoOptions().fromBinary(bytes, options);
281
+ }
282
+ static fromJson(jsonValue, options) {
283
+ return new IngressVideoOptions().fromJson(jsonValue, options);
284
+ }
285
+ static fromJsonString(jsonString, options) {
286
+ return new IngressVideoOptions().fromJsonString(jsonString, options);
287
+ }
288
+ static equals(a, b) {
289
+ return proto3.util.equals(IngressVideoOptions, a, b);
290
+ }
291
+ }
292
+ IngressVideoOptions.runtime = proto3;
293
+ IngressVideoOptions.typeName = "livekit.IngressVideoOptions";
294
+ IngressVideoOptions.fields = proto3.util.newFieldList(() => [
295
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
296
+ { no: 2, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) },
297
+ { no: 3, name: "preset", kind: "enum", T: proto3.getEnumType(IngressVideoEncodingPreset), oneof: "encoding_options" },
298
+ { no: 4, name: "options", kind: "message", T: IngressVideoEncodingOptions, oneof: "encoding_options" },
299
+ ]);
300
+ /**
301
+ * @generated from message livekit.IngressAudioEncodingOptions
302
+ */
303
+ export class IngressAudioEncodingOptions extends Message {
304
+ constructor(data) {
305
+ super();
306
+ /**
307
+ * desired audio codec to publish to room
308
+ *
309
+ * @generated from field: livekit.AudioCodec audio_codec = 1;
310
+ */
311
+ this.audioCodec = AudioCodec.DEFAULT_AC;
312
+ /**
313
+ * @generated from field: uint32 bitrate = 2;
314
+ */
315
+ this.bitrate = 0;
316
+ /**
317
+ * @generated from field: bool disable_dtx = 3;
318
+ */
319
+ this.disableDtx = false;
320
+ /**
321
+ * @generated from field: uint32 channels = 4;
322
+ */
323
+ this.channels = 0;
324
+ proto3.util.initPartial(data, this);
325
+ }
326
+ static fromBinary(bytes, options) {
327
+ return new IngressAudioEncodingOptions().fromBinary(bytes, options);
328
+ }
329
+ static fromJson(jsonValue, options) {
330
+ return new IngressAudioEncodingOptions().fromJson(jsonValue, options);
331
+ }
332
+ static fromJsonString(jsonString, options) {
333
+ return new IngressAudioEncodingOptions().fromJsonString(jsonString, options);
334
+ }
335
+ static equals(a, b) {
336
+ return proto3.util.equals(IngressAudioEncodingOptions, a, b);
337
+ }
338
+ }
339
+ IngressAudioEncodingOptions.runtime = proto3;
340
+ IngressAudioEncodingOptions.typeName = "livekit.IngressAudioEncodingOptions";
341
+ IngressAudioEncodingOptions.fields = proto3.util.newFieldList(() => [
342
+ { no: 1, name: "audio_codec", kind: "enum", T: proto3.getEnumType(AudioCodec) },
343
+ { no: 2, name: "bitrate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
344
+ { no: 3, name: "disable_dtx", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
345
+ { no: 4, name: "channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
346
+ ]);
347
+ /**
348
+ * @generated from message livekit.IngressVideoEncodingOptions
349
+ */
350
+ export class IngressVideoEncodingOptions extends Message {
351
+ constructor(data) {
352
+ super();
353
+ /**
354
+ * desired codec to publish to room
355
+ *
356
+ * @generated from field: livekit.VideoCodec video_codec = 1;
357
+ */
358
+ this.videoCodec = VideoCodec.DEFAULT_VC;
359
+ /**
360
+ * @generated from field: double frame_rate = 2;
361
+ */
362
+ this.frameRate = 0;
363
+ /**
364
+ * simulcast layers to publish, when empty, should usually be set to layers at 1/2 and 1/4 of the dimensions
365
+ *
366
+ * @generated from field: repeated livekit.VideoLayer layers = 3;
367
+ */
368
+ this.layers = [];
369
+ proto3.util.initPartial(data, this);
370
+ }
371
+ static fromBinary(bytes, options) {
372
+ return new IngressVideoEncodingOptions().fromBinary(bytes, options);
373
+ }
374
+ static fromJson(jsonValue, options) {
375
+ return new IngressVideoEncodingOptions().fromJson(jsonValue, options);
376
+ }
377
+ static fromJsonString(jsonString, options) {
378
+ return new IngressVideoEncodingOptions().fromJsonString(jsonString, options);
379
+ }
380
+ static equals(a, b) {
381
+ return proto3.util.equals(IngressVideoEncodingOptions, a, b);
382
+ }
383
+ }
384
+ IngressVideoEncodingOptions.runtime = proto3;
385
+ IngressVideoEncodingOptions.typeName = "livekit.IngressVideoEncodingOptions";
386
+ IngressVideoEncodingOptions.fields = proto3.util.newFieldList(() => [
387
+ { no: 1, name: "video_codec", kind: "enum", T: proto3.getEnumType(VideoCodec) },
388
+ { no: 2, name: "frame_rate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
389
+ { no: 3, name: "layers", kind: "message", T: VideoLayer, repeated: true },
390
+ ]);
391
+ /**
392
+ * @generated from message livekit.IngressInfo
393
+ */
394
+ export class IngressInfo extends Message {
395
+ constructor(data) {
396
+ super();
397
+ /**
398
+ * @generated from field: string ingress_id = 1;
399
+ */
400
+ this.ingressId = "";
401
+ /**
402
+ * @generated from field: string name = 2;
403
+ */
404
+ this.name = "";
405
+ /**
406
+ * @generated from field: string stream_key = 3;
407
+ */
408
+ this.streamKey = "";
409
+ /**
410
+ * URL to point the encoder to for push (RTMP, WHIP), or location to pull media from for pull (URL)
411
+ *
412
+ * @generated from field: string url = 4;
413
+ */
414
+ this.url = "";
415
+ /**
416
+ * for RTMP input, it'll be a rtmp:// URL
417
+ * for FILE input, it'll be a http:// URL
418
+ * for SRT input, it'll be a srt:// URL
419
+ *
420
+ * @generated from field: livekit.IngressInput input_type = 5;
421
+ */
422
+ this.inputType = IngressInput.RTMP_INPUT;
423
+ /**
424
+ * @generated from field: bool bypass_transcoding = 13;
425
+ */
426
+ this.bypassTranscoding = false;
427
+ /**
428
+ * @generated from field: string room_name = 8;
429
+ */
430
+ this.roomName = "";
431
+ /**
432
+ * @generated from field: string participant_identity = 9;
433
+ */
434
+ this.participantIdentity = "";
435
+ /**
436
+ * @generated from field: string participant_name = 10;
437
+ */
438
+ this.participantName = "";
439
+ /**
440
+ * @generated from field: bool reusable = 11;
441
+ */
442
+ this.reusable = false;
443
+ proto3.util.initPartial(data, this);
444
+ }
445
+ static fromBinary(bytes, options) {
446
+ return new IngressInfo().fromBinary(bytes, options);
447
+ }
448
+ static fromJson(jsonValue, options) {
449
+ return new IngressInfo().fromJson(jsonValue, options);
450
+ }
451
+ static fromJsonString(jsonString, options) {
452
+ return new IngressInfo().fromJsonString(jsonString, options);
453
+ }
454
+ static equals(a, b) {
455
+ return proto3.util.equals(IngressInfo, a, b);
456
+ }
457
+ }
458
+ IngressInfo.runtime = proto3;
459
+ IngressInfo.typeName = "livekit.IngressInfo";
460
+ IngressInfo.fields = proto3.util.newFieldList(() => [
461
+ { no: 1, name: "ingress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
462
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
463
+ { no: 3, name: "stream_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
464
+ { no: 4, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
465
+ { no: 5, name: "input_type", kind: "enum", T: proto3.getEnumType(IngressInput) },
466
+ { no: 13, name: "bypass_transcoding", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
467
+ { no: 6, name: "audio", kind: "message", T: IngressAudioOptions },
468
+ { no: 7, name: "video", kind: "message", T: IngressVideoOptions },
469
+ { no: 8, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
470
+ { no: 9, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
471
+ { no: 10, name: "participant_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
472
+ { no: 11, name: "reusable", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
473
+ { no: 12, name: "state", kind: "message", T: IngressState },
474
+ ]);
475
+ /**
476
+ * @generated from message livekit.IngressState
477
+ */
478
+ export class IngressState extends Message {
479
+ constructor(data) {
480
+ super();
481
+ /**
482
+ * @generated from field: livekit.IngressState.Status status = 1;
483
+ */
484
+ this.status = IngressState_Status.ENDPOINT_INACTIVE;
485
+ /**
486
+ * Error/non compliance description if any
487
+ *
488
+ * @generated from field: string error = 2;
489
+ */
490
+ this.error = "";
491
+ /**
492
+ * ID of the current/previous room published to
493
+ *
494
+ * @generated from field: string room_id = 5;
495
+ */
496
+ this.roomId = "";
497
+ /**
498
+ * @generated from field: int64 started_at = 7;
499
+ */
500
+ this.startedAt = protoInt64.zero;
501
+ /**
502
+ * @generated from field: int64 ended_at = 8;
503
+ */
504
+ this.endedAt = protoInt64.zero;
505
+ /**
506
+ * @generated from field: string resource_id = 9;
507
+ */
508
+ this.resourceId = "";
509
+ /**
510
+ * @generated from field: repeated livekit.TrackInfo tracks = 6;
511
+ */
512
+ this.tracks = [];
513
+ proto3.util.initPartial(data, this);
514
+ }
515
+ static fromBinary(bytes, options) {
516
+ return new IngressState().fromBinary(bytes, options);
517
+ }
518
+ static fromJson(jsonValue, options) {
519
+ return new IngressState().fromJson(jsonValue, options);
520
+ }
521
+ static fromJsonString(jsonString, options) {
522
+ return new IngressState().fromJsonString(jsonString, options);
523
+ }
524
+ static equals(a, b) {
525
+ return proto3.util.equals(IngressState, a, b);
526
+ }
527
+ }
528
+ IngressState.runtime = proto3;
529
+ IngressState.typeName = "livekit.IngressState";
530
+ IngressState.fields = proto3.util.newFieldList(() => [
531
+ { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(IngressState_Status) },
532
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
533
+ { no: 3, name: "video", kind: "message", T: InputVideoState },
534
+ { no: 4, name: "audio", kind: "message", T: InputAudioState },
535
+ { no: 5, name: "room_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
536
+ { no: 7, name: "started_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
537
+ { no: 8, name: "ended_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
538
+ { no: 9, name: "resource_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
539
+ { no: 6, name: "tracks", kind: "message", T: TrackInfo, repeated: true },
540
+ ]);
541
+ /**
542
+ * @generated from enum livekit.IngressState.Status
543
+ */
544
+ export var IngressState_Status;
545
+ (function (IngressState_Status) {
546
+ /**
547
+ * @generated from enum value: ENDPOINT_INACTIVE = 0;
548
+ */
549
+ IngressState_Status[IngressState_Status["ENDPOINT_INACTIVE"] = 0] = "ENDPOINT_INACTIVE";
550
+ /**
551
+ * @generated from enum value: ENDPOINT_BUFFERING = 1;
552
+ */
553
+ IngressState_Status[IngressState_Status["ENDPOINT_BUFFERING"] = 1] = "ENDPOINT_BUFFERING";
554
+ /**
555
+ * @generated from enum value: ENDPOINT_PUBLISHING = 2;
556
+ */
557
+ IngressState_Status[IngressState_Status["ENDPOINT_PUBLISHING"] = 2] = "ENDPOINT_PUBLISHING";
558
+ /**
559
+ * @generated from enum value: ENDPOINT_ERROR = 3;
560
+ */
561
+ IngressState_Status[IngressState_Status["ENDPOINT_ERROR"] = 3] = "ENDPOINT_ERROR";
562
+ /**
563
+ * @generated from enum value: ENDPOINT_COMPLETE = 4;
564
+ */
565
+ IngressState_Status[IngressState_Status["ENDPOINT_COMPLETE"] = 4] = "ENDPOINT_COMPLETE";
566
+ })(IngressState_Status || (IngressState_Status = {}));
567
+ // Retrieve enum metadata with: proto3.getEnumType(IngressState_Status)
568
+ proto3.util.setEnumType(IngressState_Status, "livekit.IngressState.Status", [
569
+ { no: 0, name: "ENDPOINT_INACTIVE" },
570
+ { no: 1, name: "ENDPOINT_BUFFERING" },
571
+ { no: 2, name: "ENDPOINT_PUBLISHING" },
572
+ { no: 3, name: "ENDPOINT_ERROR" },
573
+ { no: 4, name: "ENDPOINT_COMPLETE" },
574
+ ]);
575
+ /**
576
+ * @generated from message livekit.InputVideoState
577
+ */
578
+ export class InputVideoState extends Message {
579
+ constructor(data) {
580
+ super();
581
+ /**
582
+ * @generated from field: string mime_type = 1;
583
+ */
584
+ this.mimeType = "";
585
+ /**
586
+ * @generated from field: uint32 average_bitrate = 2;
587
+ */
588
+ this.averageBitrate = 0;
589
+ /**
590
+ * @generated from field: uint32 width = 3;
591
+ */
592
+ this.width = 0;
593
+ /**
594
+ * @generated from field: uint32 height = 4;
595
+ */
596
+ this.height = 0;
597
+ /**
598
+ * @generated from field: double framerate = 5;
599
+ */
600
+ this.framerate = 0;
601
+ proto3.util.initPartial(data, this);
602
+ }
603
+ static fromBinary(bytes, options) {
604
+ return new InputVideoState().fromBinary(bytes, options);
605
+ }
606
+ static fromJson(jsonValue, options) {
607
+ return new InputVideoState().fromJson(jsonValue, options);
608
+ }
609
+ static fromJsonString(jsonString, options) {
610
+ return new InputVideoState().fromJsonString(jsonString, options);
611
+ }
612
+ static equals(a, b) {
613
+ return proto3.util.equals(InputVideoState, a, b);
614
+ }
615
+ }
616
+ InputVideoState.runtime = proto3;
617
+ InputVideoState.typeName = "livekit.InputVideoState";
618
+ InputVideoState.fields = proto3.util.newFieldList(() => [
619
+ { no: 1, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
620
+ { no: 2, name: "average_bitrate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
621
+ { no: 3, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
622
+ { no: 4, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
623
+ { no: 5, name: "framerate", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
624
+ ]);
625
+ /**
626
+ * @generated from message livekit.InputAudioState
627
+ */
628
+ export class InputAudioState extends Message {
629
+ constructor(data) {
630
+ super();
631
+ /**
632
+ * @generated from field: string mime_type = 1;
633
+ */
634
+ this.mimeType = "";
635
+ /**
636
+ * @generated from field: uint32 average_bitrate = 2;
637
+ */
638
+ this.averageBitrate = 0;
639
+ /**
640
+ * @generated from field: uint32 channels = 3;
641
+ */
642
+ this.channels = 0;
643
+ /**
644
+ * @generated from field: uint32 sample_rate = 4;
645
+ */
646
+ this.sampleRate = 0;
647
+ proto3.util.initPartial(data, this);
648
+ }
649
+ static fromBinary(bytes, options) {
650
+ return new InputAudioState().fromBinary(bytes, options);
651
+ }
652
+ static fromJson(jsonValue, options) {
653
+ return new InputAudioState().fromJson(jsonValue, options);
654
+ }
655
+ static fromJsonString(jsonString, options) {
656
+ return new InputAudioState().fromJsonString(jsonString, options);
657
+ }
658
+ static equals(a, b) {
659
+ return proto3.util.equals(InputAudioState, a, b);
660
+ }
661
+ }
662
+ InputAudioState.runtime = proto3;
663
+ InputAudioState.typeName = "livekit.InputAudioState";
664
+ InputAudioState.fields = proto3.util.newFieldList(() => [
665
+ { no: 1, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
666
+ { no: 2, name: "average_bitrate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
667
+ { no: 3, name: "channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
668
+ { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
669
+ ]);
670
+ /**
671
+ * @generated from message livekit.UpdateIngressRequest
672
+ */
673
+ export class UpdateIngressRequest extends Message {
674
+ constructor(data) {
675
+ super();
676
+ /**
677
+ * @generated from field: string ingress_id = 1;
678
+ */
679
+ this.ingressId = "";
680
+ /**
681
+ * @generated from field: string name = 2;
682
+ */
683
+ this.name = "";
684
+ /**
685
+ * @generated from field: string room_name = 3;
686
+ */
687
+ this.roomName = "";
688
+ /**
689
+ * @generated from field: string participant_identity = 4;
690
+ */
691
+ this.participantIdentity = "";
692
+ /**
693
+ * @generated from field: string participant_name = 5;
694
+ */
695
+ this.participantName = "";
696
+ proto3.util.initPartial(data, this);
697
+ }
698
+ static fromBinary(bytes, options) {
699
+ return new UpdateIngressRequest().fromBinary(bytes, options);
700
+ }
701
+ static fromJson(jsonValue, options) {
702
+ return new UpdateIngressRequest().fromJson(jsonValue, options);
703
+ }
704
+ static fromJsonString(jsonString, options) {
705
+ return new UpdateIngressRequest().fromJsonString(jsonString, options);
706
+ }
707
+ static equals(a, b) {
708
+ return proto3.util.equals(UpdateIngressRequest, a, b);
709
+ }
710
+ }
711
+ UpdateIngressRequest.runtime = proto3;
712
+ UpdateIngressRequest.typeName = "livekit.UpdateIngressRequest";
713
+ UpdateIngressRequest.fields = proto3.util.newFieldList(() => [
714
+ { no: 1, name: "ingress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
715
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
716
+ { no: 3, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
717
+ { no: 4, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
718
+ { no: 5, name: "participant_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
719
+ { no: 8, name: "bypass_transcoding", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
720
+ { no: 6, name: "audio", kind: "message", T: IngressAudioOptions },
721
+ { no: 7, name: "video", kind: "message", T: IngressVideoOptions },
722
+ ]);
723
+ /**
724
+ * @generated from message livekit.ListIngressRequest
725
+ */
726
+ export class ListIngressRequest extends Message {
727
+ constructor(data) {
728
+ super();
729
+ /**
730
+ * when blank, lists all ingress endpoints
731
+ *
732
+ * (optional, filter by room name)
733
+ *
734
+ * @generated from field: string room_name = 1;
735
+ */
736
+ this.roomName = "";
737
+ /**
738
+ * (optional, filter by ingress ID)
739
+ *
740
+ * @generated from field: string ingress_id = 2;
741
+ */
742
+ this.ingressId = "";
743
+ proto3.util.initPartial(data, this);
744
+ }
745
+ static fromBinary(bytes, options) {
746
+ return new ListIngressRequest().fromBinary(bytes, options);
747
+ }
748
+ static fromJson(jsonValue, options) {
749
+ return new ListIngressRequest().fromJson(jsonValue, options);
750
+ }
751
+ static fromJsonString(jsonString, options) {
752
+ return new ListIngressRequest().fromJsonString(jsonString, options);
753
+ }
754
+ static equals(a, b) {
755
+ return proto3.util.equals(ListIngressRequest, a, b);
756
+ }
757
+ }
758
+ ListIngressRequest.runtime = proto3;
759
+ ListIngressRequest.typeName = "livekit.ListIngressRequest";
760
+ ListIngressRequest.fields = proto3.util.newFieldList(() => [
761
+ { no: 1, name: "room_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
762
+ { no: 2, name: "ingress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
763
+ ]);
764
+ /**
765
+ * @generated from message livekit.ListIngressResponse
766
+ */
767
+ export class ListIngressResponse extends Message {
768
+ constructor(data) {
769
+ super();
770
+ /**
771
+ * @generated from field: repeated livekit.IngressInfo items = 1;
772
+ */
773
+ this.items = [];
774
+ proto3.util.initPartial(data, this);
775
+ }
776
+ static fromBinary(bytes, options) {
777
+ return new ListIngressResponse().fromBinary(bytes, options);
778
+ }
779
+ static fromJson(jsonValue, options) {
780
+ return new ListIngressResponse().fromJson(jsonValue, options);
781
+ }
782
+ static fromJsonString(jsonString, options) {
783
+ return new ListIngressResponse().fromJsonString(jsonString, options);
784
+ }
785
+ static equals(a, b) {
786
+ return proto3.util.equals(ListIngressResponse, a, b);
787
+ }
788
+ }
789
+ ListIngressResponse.runtime = proto3;
790
+ ListIngressResponse.typeName = "livekit.ListIngressResponse";
791
+ ListIngressResponse.fields = proto3.util.newFieldList(() => [
792
+ { no: 1, name: "items", kind: "message", T: IngressInfo, repeated: true },
793
+ ]);
794
+ /**
795
+ * @generated from message livekit.DeleteIngressRequest
796
+ */
797
+ export class DeleteIngressRequest extends Message {
798
+ constructor(data) {
799
+ super();
800
+ /**
801
+ * @generated from field: string ingress_id = 1;
802
+ */
803
+ this.ingressId = "";
804
+ proto3.util.initPartial(data, this);
805
+ }
806
+ static fromBinary(bytes, options) {
807
+ return new DeleteIngressRequest().fromBinary(bytes, options);
808
+ }
809
+ static fromJson(jsonValue, options) {
810
+ return new DeleteIngressRequest().fromJson(jsonValue, options);
811
+ }
812
+ static fromJsonString(jsonString, options) {
813
+ return new DeleteIngressRequest().fromJsonString(jsonString, options);
814
+ }
815
+ static equals(a, b) {
816
+ return proto3.util.equals(DeleteIngressRequest, a, b);
817
+ }
818
+ }
819
+ DeleteIngressRequest.runtime = proto3;
820
+ DeleteIngressRequest.typeName = "livekit.DeleteIngressRequest";
821
+ DeleteIngressRequest.fields = proto3.util.newFieldList(() => [
822
+ { no: 1, name: "ingress_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
823
+ ]);
824
+ //# sourceMappingURL=livekit_ingress_pb.js.map