@volter/twin-livekit 0.1.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 (99) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +106 -0
  3. package/dist/src/cli.d.ts +2 -0
  4. package/dist/src/cli.js +23 -0
  5. package/dist/src/egress-service-cli.d.ts +2 -0
  6. package/dist/src/egress-service-cli.js +101 -0
  7. package/dist/src/index.d.ts +14 -0
  8. package/dist/src/index.js +53 -0
  9. package/dist/src/livekit-budget.d.ts +57 -0
  10. package/dist/src/livekit-budget.js +131 -0
  11. package/dist/src/livekit-capabilities.d.ts +3 -0
  12. package/dist/src/livekit-capabilities.js +728 -0
  13. package/dist/src/livekit-conformance.d.ts +8 -0
  14. package/dist/src/livekit-conformance.js +13 -0
  15. package/dist/src/livekit-connector.d.ts +130 -0
  16. package/dist/src/livekit-connector.js +382 -0
  17. package/dist/src/livekit-data.d.ts +86 -0
  18. package/dist/src/livekit-data.js +246 -0
  19. package/dist/src/livekit-perform-harness.d.ts +5 -0
  20. package/dist/src/livekit-perform-harness.js +17 -0
  21. package/dist/src/livekit-server.d.ts +23 -0
  22. package/dist/src/livekit-server.js +45 -0
  23. package/dist/src/livekit-service-cli.d.ts +2 -0
  24. package/dist/src/livekit-service-cli.js +88 -0
  25. package/dist/src/livekit-token.d.ts +68 -0
  26. package/dist/src/livekit-token.js +76 -0
  27. package/dist/src/livekit-twin.d.ts +4 -0
  28. package/dist/src/livekit-twin.js +1161 -0
  29. package/dist/src/livekit-types.d.ts +203 -0
  30. package/dist/src/livekit-types.js +1 -0
  31. package/dist/src/livekit-webhook.d.ts +26 -0
  32. package/dist/src/livekit-webhook.js +79 -0
  33. package/dist/src/redis-service-cli.d.ts +2 -0
  34. package/dist/src/redis-service-cli.js +35 -0
  35. package/dist/test-fixtures/livekit-openapi-operations.SOURCE.md +88 -0
  36. package/dist/test-fixtures/livekit-openapi-operations.json +442 -0
  37. package/dist/test-fixtures/protobufs/cloud_replay.proto +82 -0
  38. package/dist/test-fixtures/protobufs/livekit_agent.proto +185 -0
  39. package/dist/test-fixtures/protobufs/livekit_agent_dispatch.proto +103 -0
  40. package/dist/test-fixtures/protobufs/livekit_agent_simulation.proto +422 -0
  41. package/dist/test-fixtures/protobufs/livekit_agent_worker.proto +29 -0
  42. package/dist/test-fixtures/protobufs/livekit_agentdb.proto +226 -0
  43. package/dist/test-fixtures/protobufs/livekit_analytics.proto +312 -0
  44. package/dist/test-fixtures/protobufs/livekit_cloud_agent.proto +376 -0
  45. package/dist/test-fixtures/protobufs/livekit_connector.proto +41 -0
  46. package/dist/test-fixtures/protobufs/livekit_connector_twilio.proto +65 -0
  47. package/dist/test-fixtures/protobufs/livekit_connector_whatsapp.proto +171 -0
  48. package/dist/test-fixtures/protobufs/livekit_egress.proto +641 -0
  49. package/dist/test-fixtures/protobufs/livekit_ingress.proto +222 -0
  50. package/dist/test-fixtures/protobufs/livekit_internal.proto +228 -0
  51. package/dist/test-fixtures/protobufs/livekit_metrics.proto +103 -0
  52. package/dist/test-fixtures/protobufs/livekit_models.proto +992 -0
  53. package/dist/test-fixtures/protobufs/livekit_phone_number.proto +151 -0
  54. package/dist/test-fixtures/protobufs/livekit_room.proto +312 -0
  55. package/dist/test-fixtures/protobufs/livekit_rtc.proto +673 -0
  56. package/dist/test-fixtures/protobufs/livekit_sip.proto +1000 -0
  57. package/dist/test-fixtures/protobufs/livekit_token_source.proto +49 -0
  58. package/dist/test-fixtures/protobufs/livekit_webhook.proto +62 -0
  59. package/package.json +58 -0
  60. package/src/cli.ts +22 -0
  61. package/src/egress-service-cli.ts +111 -0
  62. package/src/index.ts +103 -0
  63. package/src/livekit-budget.ts +158 -0
  64. package/src/livekit-capabilities.ts +789 -0
  65. package/src/livekit-conformance.ts +15 -0
  66. package/src/livekit-connector.ts +406 -0
  67. package/src/livekit-data.ts +278 -0
  68. package/src/livekit-perform-harness.ts +17 -0
  69. package/src/livekit-server.ts +67 -0
  70. package/src/livekit-service-cli.ts +93 -0
  71. package/src/livekit-token.ts +133 -0
  72. package/src/livekit-twin.ts +1162 -0
  73. package/src/livekit-types.ts +211 -0
  74. package/src/livekit-webhook.ts +91 -0
  75. package/src/redis-service-cli.ts +39 -0
  76. package/test-fixtures/livekit-openapi-operations.SOURCE.md +88 -0
  77. package/test-fixtures/livekit-openapi-operations.json +442 -0
  78. package/test-fixtures/protobufs/cloud_replay.proto +82 -0
  79. package/test-fixtures/protobufs/livekit_agent.proto +185 -0
  80. package/test-fixtures/protobufs/livekit_agent_dispatch.proto +103 -0
  81. package/test-fixtures/protobufs/livekit_agent_simulation.proto +422 -0
  82. package/test-fixtures/protobufs/livekit_agent_worker.proto +29 -0
  83. package/test-fixtures/protobufs/livekit_agentdb.proto +226 -0
  84. package/test-fixtures/protobufs/livekit_analytics.proto +312 -0
  85. package/test-fixtures/protobufs/livekit_cloud_agent.proto +376 -0
  86. package/test-fixtures/protobufs/livekit_connector.proto +41 -0
  87. package/test-fixtures/protobufs/livekit_connector_twilio.proto +65 -0
  88. package/test-fixtures/protobufs/livekit_connector_whatsapp.proto +171 -0
  89. package/test-fixtures/protobufs/livekit_egress.proto +641 -0
  90. package/test-fixtures/protobufs/livekit_ingress.proto +222 -0
  91. package/test-fixtures/protobufs/livekit_internal.proto +228 -0
  92. package/test-fixtures/protobufs/livekit_metrics.proto +103 -0
  93. package/test-fixtures/protobufs/livekit_models.proto +992 -0
  94. package/test-fixtures/protobufs/livekit_phone_number.proto +151 -0
  95. package/test-fixtures/protobufs/livekit_room.proto +312 -0
  96. package/test-fixtures/protobufs/livekit_rtc.proto +673 -0
  97. package/test-fixtures/protobufs/livekit_sip.proto +1000 -0
  98. package/test-fixtures/protobufs/livekit_token_source.proto +49 -0
  99. package/test-fixtures/protobufs/livekit_webhook.proto +62 -0
@@ -0,0 +1,641 @@
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
+
15
+ syntax = "proto3";
16
+
17
+ package livekit;
18
+
19
+ import "livekit_models.proto";
20
+ import "logger/options.proto";
21
+
22
+ option go_package = "github.com/livekit/protocol/livekit";
23
+ option csharp_namespace = "LiveKit.Proto";
24
+ option ruby_package = "LiveKit::Proto";
25
+
26
+ service Egress {
27
+ // Unified StartEgress RPC
28
+ rpc StartEgress(StartEgressRequest) returns (EgressInfo);
29
+
30
+ // Update url/template or stream outputs
31
+ rpc UpdateLayout(UpdateLayoutRequest) returns (EgressInfo);
32
+ rpc UpdateStream(UpdateStreamRequest) returns (EgressInfo);
33
+
34
+ // List available egress
35
+ rpc ListEgress(ListEgressRequest) returns (ListEgressResponse);
36
+
37
+ // Stop a recording or stream
38
+ rpc StopEgress(StopEgressRequest) returns (EgressInfo);
39
+
40
+ // TODO: deprecate
41
+ rpc StartRoomCompositeEgress(RoomCompositeEgressRequest) returns (EgressInfo);
42
+ rpc StartWebEgress(WebEgressRequest) returns (EgressInfo);
43
+ rpc StartParticipantEgress(ParticipantEgressRequest) returns (EgressInfo);
44
+ rpc StartTrackCompositeEgress(TrackCompositeEgressRequest) returns (EgressInfo);
45
+ rpc StartTrackEgress(TrackEgressRequest) returns (EgressInfo);
46
+ }
47
+
48
+ // --- Core Request ---
49
+
50
+ message StartEgressRequest {
51
+ string room_name = 1;
52
+
53
+ oneof source {
54
+ TemplateSource template = 2;
55
+ WebSource web = 3;
56
+ MediaSource media = 4;
57
+ }
58
+
59
+ // Optional — default H264_720P_30
60
+ oneof encoding {
61
+ EncodingOptionsPreset preset = 5;
62
+ EncodingOptions advanced = 6;
63
+ }
64
+
65
+ // At least one required
66
+ repeated Output outputs = 7;
67
+
68
+ // Request-level storage default
69
+ StorageConfig storage = 8;
70
+
71
+ // Optional additional webhook config
72
+ repeated WebhookConfig webhooks = 9;
73
+ }
74
+
75
+ // --- Source Types ---
76
+
77
+ // Room composite recording via layout template.
78
+ // Service generates token, constructs recorder URL, awaits start signal.
79
+ message TemplateSource {
80
+ string layout = 1;
81
+ bool audio_only = 2;
82
+ bool video_only = 3;
83
+ string custom_base_url = 4;
84
+ }
85
+
86
+ // Record a custom URL via headless browser.
87
+ message WebSource {
88
+ string url = 1;
89
+ bool audio_only = 2;
90
+ bool video_only = 3;
91
+ bool await_start_signal = 4;
92
+ }
93
+
94
+ // Capture tracks directly from a room via SDK.
95
+ // Unifies deprecated Participant, TrackComposite, and Track egress.
96
+ message MediaSource {
97
+ oneof video {
98
+ string video_track_id = 1 [(logger.name) = "videoTrackID"];
99
+ ParticipantVideo participant_video = 2;
100
+ }
101
+ AudioConfig audio = 3;
102
+ // TODO: DataConfig data = 4;
103
+ }
104
+
105
+ // --- Video Configuration ---
106
+
107
+ message ParticipantVideo {
108
+ string identity = 1;
109
+ bool prefer_screen_share = 2;
110
+ }
111
+
112
+ // --- Audio Configuration ---
113
+
114
+ // Unified audio selection and channel routing.
115
+ // Each route specifies both which audio to capture and which channel to output to.
116
+ message AudioConfig {
117
+ bool capture_all = 1; // If true, all unmatched audio is recorded to both channels
118
+ repeated AudioRoute routes = 2;
119
+ }
120
+
121
+ message AudioRoute {
122
+ oneof match {
123
+ string track_id = 1 [(logger.name) = "trackID"];
124
+ string participant_identity = 2;
125
+ ParticipantInfo.Kind participant_kind = 3;
126
+ }
127
+
128
+ AudioChannel channel = 4;
129
+ }
130
+
131
+ enum AudioChannel {
132
+ AUDIO_CHANNEL_BOTH = 0;
133
+ AUDIO_CHANNEL_LEFT = 1;
134
+ AUDIO_CHANNEL_RIGHT = 2;
135
+ }
136
+
137
+ // --- Data Track Configuration ---
138
+
139
+ message DataConfig {
140
+ bool capture_all = 1;
141
+ repeated DataSelector selectors = 2;
142
+ }
143
+
144
+ message DataSelector {
145
+ oneof match {
146
+ string track_id = 1 [(logger.name) = "trackID"];
147
+ string participant_identity = 2;
148
+ }
149
+ }
150
+
151
+ // --- Encoding ---
152
+
153
+ enum EncodingOptionsPreset {
154
+ H264_720P_30 = 0; // 1280x720, 30fps, 3000kpbs, H.264_MAIN / OPUS
155
+ H264_720P_60 = 1; // 1280x720, 60fps, 4500kbps, H.264_MAIN / OPUS
156
+ H264_1080P_30 = 2; // 1920x1080, 30fps, 4500kbps, H.264_MAIN / OPUS
157
+ H264_1080P_60 = 3; // 1920x1080, 60fps, 6000kbps, H.264_MAIN / OPUS
158
+ PORTRAIT_H264_720P_30 = 4; // 720x1280, 30fps, 3000kpbs, H.264_MAIN / OPUS
159
+ PORTRAIT_H264_720P_60 = 5; // 720x1280, 60fps, 4500kbps, H.264_MAIN / OPUS
160
+ PORTRAIT_H264_1080P_30 = 6; // 1080x1920, 30fps, 4500kbps, H.264_MAIN / OPUS
161
+ PORTRAIT_H264_1080P_60 = 7; // 1080x1920, 60fps, 6000kbps, H.264_MAIN / OPUS
162
+ PASSTHROUGH = 8; // Skip transcoding. Valid only when specifying a single track with MediaSource
163
+ }
164
+
165
+ message EncodingOptions {
166
+ int32 width = 1; // (default 1920)
167
+ int32 height = 2; // (default 1080)
168
+ int32 depth = 3; // (default 24)
169
+ int32 framerate = 4; // (default 30)
170
+ AudioCodec audio_codec = 5; // (default OPUS)
171
+ int32 audio_bitrate = 6; // (default 128)
172
+ int32 audio_frequency = 7; // (default 44100)
173
+ VideoCodec video_codec = 8; // (default H264_MAIN)
174
+ int32 video_bitrate = 9; // (default 4500)
175
+ double key_frame_interval = 10; // in seconds (default 4s for streaming, segment duration for segmented output, encoder default for files)
176
+
177
+ // --- Deprecated ---
178
+ int32 audio_quality = 11 [deprecated = true]; // quality setting on audio encoder
179
+ int32 video_quality = 12 [deprecated = true]; // quality setting on video encoder
180
+ }
181
+
182
+ // --- Output Types ---
183
+
184
+ message Output {
185
+ oneof config {
186
+ FileOutput file = 1;
187
+ StreamOutput stream = 2;
188
+ SegmentedFileOutput segments = 3;
189
+ ImageOutput images = 4;
190
+ // TODO: DataOutput data = 5;
191
+ }
192
+
193
+ // Per-output storage override (falls back to request, then server)
194
+ StorageConfig storage = 6;
195
+ }
196
+
197
+ // Unified file output — replaces v1 EncodedFileOutput and DirectFileOutput.
198
+ // Whether transcoded depends on encoding options on the request.
199
+ message FileOutput {
200
+ EncodedFileType file_type = 1;
201
+ string filepath = 2;
202
+ bool disable_manifest = 3;
203
+ }
204
+
205
+ enum EncodedFileType {
206
+ DEFAULT_FILETYPE = 0; // file type chosen based on codecs
207
+ MP4 = 1;
208
+ OGG = 2;
209
+ MP3 = 3;
210
+ }
211
+
212
+ message StreamOutput {
213
+ StreamProtocol protocol = 1; // required
214
+ repeated string urls = 2; // required
215
+ }
216
+
217
+ enum StreamProtocol {
218
+ DEFAULT_PROTOCOL = 0; // protocol chosen based on urls
219
+ RTMP = 1;
220
+ SRT = 2;
221
+ WEBSOCKET = 3;
222
+ }
223
+
224
+ // Used to generate HLS segments or other kind of segmented output
225
+ message SegmentedFileOutput {
226
+ SegmentedFileProtocol protocol = 1; // (optional)
227
+ string filename_prefix = 2; // (optional)
228
+ string playlist_name = 3; // (optional)
229
+ string live_playlist_name = 11; // (optional, disabled if not provided). Path of a live playlist
230
+ uint32 segment_duration = 4; // in seconds (optional)
231
+ SegmentedFileSuffix filename_suffix = 10; // (optional, default INDEX)
232
+ bool disable_manifest = 8; // disable upload of manifest file (default false)
233
+
234
+ // TODO: deprecate
235
+ oneof output {
236
+ S3Upload s3 = 5;
237
+ GCPUpload gcp = 6;
238
+ AzureBlobUpload azure = 7;
239
+ AliOSSUpload aliOSS = 9;
240
+ }
241
+ }
242
+
243
+ enum SegmentedFileProtocol {
244
+ DEFAULT_SEGMENTED_FILE_PROTOCOL = 0;
245
+ HLS_PROTOCOL = 1;
246
+ }
247
+
248
+ enum SegmentedFileSuffix {
249
+ INDEX = 0;
250
+ TIMESTAMP = 1;
251
+ }
252
+
253
+ // Capture images at a specified interval
254
+ message ImageOutput {
255
+ uint32 capture_interval = 1; // in seconds (required)
256
+ int32 width = 2; // (optional, defaults to track width)
257
+ int32 height = 3; // (optional, defaults to track height)
258
+ string filename_prefix = 4; // (optional)
259
+ ImageFileSuffix filename_suffix = 5; // (optional, default INDEX)
260
+ ImageCodec image_codec = 6; // (optional)
261
+ bool disable_manifest = 7; // disable upload of manifest file (default false)
262
+
263
+ // TODO: deprecate
264
+ oneof output {
265
+ S3Upload s3 = 8;
266
+ GCPUpload gcp = 9;
267
+ AzureBlobUpload azure = 10;
268
+ AliOSSUpload aliOSS = 11;
269
+ }
270
+ }
271
+
272
+ enum ImageFileSuffix {
273
+ IMAGE_SUFFIX_INDEX = 0;
274
+ IMAGE_SUFFIX_TIMESTAMP = 1;
275
+ IMAGE_SUFFIX_NONE_OVERWRITE = 2; // Do not append any suffix and overwrite the existing image with the latest
276
+ }
277
+
278
+ // --- Storage ---
279
+
280
+ message StorageConfig {
281
+ oneof provider {
282
+ S3Upload s3 = 1;
283
+ GCPUpload gcp = 2;
284
+ AzureBlobUpload azure = 3;
285
+ AliOSSUpload aliOSS = 4;
286
+ }
287
+ }
288
+
289
+ message S3Upload {
290
+ string access_key = 1 [(logger.sensitivity) = SENSITIVITY_SECRET];
291
+ string secret = 2 [(logger.sensitivity) = SENSITIVITY_SECRET];
292
+ string session_token = 11 [(logger.sensitivity) = SENSITIVITY_SECRET];
293
+ string assume_role_arn = 12 [(logger.sensitivity) = SENSITIVITY_PII]; // ARN of the role to assume for file upload. Egress will make an AssumeRole API call using the provided access_key and secret to assume that role. On LiveKit cloud, this is only available on accounts that have the feature enabled
294
+ string assume_role_external_id = 13 [(logger.sensitivity) = SENSITIVITY_SECRET, (logger.name) = "assumeRoleExternalID"]; // ExternalID to use when assuming role for upload
295
+ string region = 3;
296
+ string endpoint = 4;
297
+ string bucket = 5;
298
+ bool force_path_style = 6;
299
+ map<string, string> metadata = 7 [(logger.sensitivity) = SENSITIVITY_PII];
300
+ string tagging = 8 [(logger.sensitivity) = SENSITIVITY_PII];
301
+ string content_disposition = 9 [(logger.sensitivity) = SENSITIVITY_PII]; // Content-Disposition header
302
+ ProxyConfig proxy = 10;
303
+
304
+ // NEXT_ID: 14
305
+ }
306
+
307
+ message GCPUpload {
308
+ // service account credentials serialized in JSON "credentials.json"
309
+ string credentials = 1 [(logger.sensitivity) = SENSITIVITY_SECRET];
310
+ string bucket = 2;
311
+ ProxyConfig proxy = 3;
312
+ }
313
+
314
+ message AzureBlobUpload {
315
+ string account_name = 1 [(logger.sensitivity) = SENSITIVITY_PII];
316
+ string account_key = 2 [(logger.sensitivity) = SENSITIVITY_SECRET];
317
+ string container_name = 3;
318
+ }
319
+
320
+ message AliOSSUpload {
321
+ string access_key = 1 [(logger.sensitivity) = SENSITIVITY_SECRET];
322
+ string secret = 2 [(logger.sensitivity) = SENSITIVITY_SECRET];
323
+ string region = 3;
324
+ string endpoint = 4;
325
+ string bucket = 5;
326
+ }
327
+
328
+ message ProxyConfig {
329
+ string url = 1;
330
+ string username = 2;
331
+ string password = 3 [(logger.sensitivity) = SENSITIVITY_SECRET];
332
+ }
333
+
334
+ // --- Control RPCs ---
335
+
336
+ message ListEgressRequest {
337
+ string room_name = 1; // (optional, filter by room name)
338
+ string egress_id = 2 [(logger.name) = "egressID"]; // (optional, filter by egress ID)
339
+ bool active = 3; // (optional, list active egress only)
340
+ TokenPagination page_token = 4;
341
+ // next field id: 5
342
+ }
343
+
344
+ message ListEgressResponse {
345
+ repeated EgressInfo items = 1;
346
+ TokenPagination next_page_token = 2;
347
+ // next field id: 3
348
+ }
349
+
350
+ message StopEgressRequest {
351
+ string egress_id = 1 [(logger.name) = "egressID"];
352
+ }
353
+
354
+ // --- Egress Info ---
355
+
356
+ message EgressInfo {
357
+ string egress_id = 1 [(logger.name) = "egressID"];
358
+ string room_id = 2 [(logger.name) = "roomID"];
359
+ string room_name = 13;
360
+
361
+ EgressSourceType source_type = 26;
362
+ EgressStatus status = 3;
363
+
364
+ int64 started_at = 10;
365
+ int64 ended_at = 11;
366
+ int64 updated_at = 18;
367
+
368
+ oneof request {
369
+ StartEgressRequest egress = 29;
370
+ ExportReplayRequest replay = 30;
371
+
372
+ // TODO: deprecate
373
+ RoomCompositeEgressRequest room_composite = 4;
374
+ WebEgressRequest web = 14;
375
+ ParticipantEgressRequest participant = 19;
376
+ TrackCompositeEgressRequest track_composite = 5;
377
+ TrackEgressRequest track = 6;
378
+ }
379
+
380
+ repeated StreamInfo stream_results = 15;
381
+ repeated FileInfo file_results = 16;
382
+ repeated SegmentsInfo segment_results = 17;
383
+ repeated ImagesInfo image_results = 20;
384
+
385
+ string error = 9;
386
+ int32 error_code = 22;
387
+ string details = 21;
388
+
389
+ string manifest_location = 23;
390
+ bool backup_storage_used = 25;
391
+ int32 retry_count = 27;
392
+
393
+ // next ID: 31
394
+
395
+ // --- Deprecated ---
396
+ oneof result {
397
+ StreamInfoList stream = 7 [deprecated = true];
398
+ FileInfo file = 8 [deprecated = true];
399
+ SegmentsInfo segments = 12 [deprecated = true];
400
+ }
401
+ }
402
+
403
+ enum EgressSourceType {
404
+ EGRESS_SOURCE_TYPE_WEB = 0;
405
+ EGRESS_SOURCE_TYPE_SDK = 1;
406
+ }
407
+
408
+ enum EgressStatus {
409
+ EGRESS_STARTING = 0;
410
+ EGRESS_ACTIVE = 1;
411
+ EGRESS_ENDING = 2;
412
+ EGRESS_COMPLETE = 3;
413
+ EGRESS_FAILED = 4;
414
+ EGRESS_ABORTED = 5;
415
+ EGRESS_LIMIT_REACHED = 6;
416
+ }
417
+
418
+ message StreamInfo {
419
+ enum Status {
420
+ ACTIVE = 0;
421
+ FINISHED = 1;
422
+ FAILED = 2;
423
+ }
424
+
425
+ string url = 1;
426
+ int64 started_at = 2;
427
+ int64 ended_at = 3;
428
+ int64 duration = 4;
429
+ Status status = 5;
430
+ string error = 6;
431
+ int64 last_retry_at = 7;
432
+ uint32 retries = 8;
433
+ }
434
+
435
+ message FileInfo {
436
+ string filename = 1;
437
+ int64 started_at = 2;
438
+ int64 ended_at = 3;
439
+ int64 duration = 6;
440
+ int64 size = 4;
441
+ string location = 5;
442
+ }
443
+
444
+ message SegmentsInfo {
445
+ string playlist_name = 1;
446
+ string live_playlist_name = 8;
447
+ int64 duration = 2;
448
+ int64 size = 3;
449
+ string playlist_location = 4;
450
+ string live_playlist_location = 9;
451
+ int64 segment_count = 5;
452
+ int64 started_at = 6;
453
+ int64 ended_at = 7;
454
+ }
455
+
456
+ message ImagesInfo {
457
+ string filename_prefix = 4;
458
+ int64 image_count = 1;
459
+ int64 started_at = 2;
460
+ int64 ended_at = 3;
461
+ }
462
+
463
+ // --- Auto Egress ---
464
+
465
+ message AutoParticipantEgress {
466
+ oneof options {
467
+ EncodingOptionsPreset preset = 1; // (default H264_720P_30)
468
+ EncodingOptions advanced = 2; // (optional)
469
+ }
470
+ repeated EncodedFileOutput file_outputs = 3;
471
+ repeated SegmentedFileOutput segment_outputs = 4;
472
+ }
473
+
474
+ message AutoTrackEgress {
475
+ string filepath = 1; // see docs for templating (default {track_id}-{time})
476
+ bool disable_manifest = 5; // disables upload of json manifest file (default false)
477
+ oneof output {
478
+ S3Upload s3 = 2;
479
+ GCPUpload gcp = 3;
480
+ AzureBlobUpload azure = 4;
481
+ AliOSSUpload aliOSS = 6;
482
+ }
483
+ }
484
+
485
+ // --- Replay Export (message only — RPC defined in cloud_replay.proto) ---
486
+
487
+ message ExportReplayRequest {
488
+ string replay_id = 1 [(logger.name) = "replayID"];
489
+ int64 start_offset_ms = 2;
490
+ int64 end_offset_ms = 3;
491
+
492
+ oneof source {
493
+ TemplateSource template = 4;
494
+ WebSource web = 5;
495
+ MediaSource media = 6;
496
+ }
497
+
498
+ oneof encoding {
499
+ EncodingOptionsPreset preset = 7;
500
+ EncodingOptions advanced = 8;
501
+ }
502
+
503
+ repeated Output outputs = 9;
504
+ StorageConfig storage = 10;
505
+ repeated WebhookConfig webhooks = 11;
506
+ }
507
+
508
+ // TODO: deprecate --- V1 ---
509
+
510
+ message RoomCompositeEgressRequest {
511
+ string room_name = 1;
512
+ string layout = 2;
513
+ bool audio_only = 3;
514
+ AudioMixing audio_mixing = 15;
515
+ bool video_only = 4;
516
+ string custom_base_url = 5;
517
+ oneof output {
518
+ EncodedFileOutput file = 6 [deprecated = true];
519
+ StreamOutput stream = 7 [deprecated = true];
520
+ SegmentedFileOutput segments = 10 [deprecated = true];
521
+ }
522
+ oneof options {
523
+ EncodingOptionsPreset preset = 8;
524
+ EncodingOptions advanced = 9;
525
+ }
526
+ repeated EncodedFileOutput file_outputs = 11;
527
+ repeated StreamOutput stream_outputs = 12;
528
+ repeated SegmentedFileOutput segment_outputs = 13;
529
+ repeated ImageOutput image_outputs = 14;
530
+ repeated WebhookConfig webhooks = 16;
531
+ }
532
+
533
+ enum AudioMixing {
534
+ DEFAULT_MIXING = 0;
535
+ DUAL_CHANNEL_AGENT = 1;
536
+ DUAL_CHANNEL_ALTERNATE = 2;
537
+ }
538
+
539
+ message WebEgressRequest {
540
+ string url = 1;
541
+ bool audio_only = 2;
542
+ bool video_only = 3;
543
+ bool await_start_signal = 12;
544
+ oneof output {
545
+ EncodedFileOutput file = 4 [deprecated = true];
546
+ StreamOutput stream = 5 [deprecated = true];
547
+ SegmentedFileOutput segments = 6 [deprecated = true];
548
+ }
549
+ oneof options {
550
+ EncodingOptionsPreset preset = 7;
551
+ EncodingOptions advanced = 8;
552
+ }
553
+ repeated EncodedFileOutput file_outputs = 9;
554
+ repeated StreamOutput stream_outputs = 10;
555
+ repeated SegmentedFileOutput segment_outputs = 11;
556
+ repeated ImageOutput image_outputs = 13;
557
+ repeated WebhookConfig webhooks = 14;
558
+ }
559
+
560
+ message ParticipantEgressRequest {
561
+ string room_name = 1;
562
+ string identity = 2;
563
+ bool screen_share = 3;
564
+ oneof options {
565
+ EncodingOptionsPreset preset = 4;
566
+ EncodingOptions advanced = 5;
567
+ }
568
+ repeated EncodedFileOutput file_outputs = 6;
569
+ repeated StreamOutput stream_outputs = 7;
570
+ repeated SegmentedFileOutput segment_outputs = 8;
571
+ repeated ImageOutput image_outputs = 9;
572
+ repeated WebhookConfig webhooks = 10;
573
+ }
574
+
575
+ message TrackCompositeEgressRequest {
576
+ string room_name = 1;
577
+ string audio_track_id = 2 [(logger.name) = "audioTrackID"];
578
+ string video_track_id = 3 [(logger.name) = "videoTrackID"];
579
+ oneof output {
580
+ EncodedFileOutput file = 4 [deprecated = true];
581
+ StreamOutput stream = 5 [deprecated = true];
582
+ SegmentedFileOutput segments = 8 [deprecated = true];
583
+ }
584
+ oneof options {
585
+ EncodingOptionsPreset preset = 6;
586
+ EncodingOptions advanced = 7;
587
+ }
588
+ repeated EncodedFileOutput file_outputs = 11;
589
+ repeated StreamOutput stream_outputs = 12;
590
+ repeated SegmentedFileOutput segment_outputs = 13;
591
+ repeated ImageOutput image_outputs = 14;
592
+ repeated WebhookConfig webhooks = 15;
593
+ }
594
+
595
+ message TrackEgressRequest {
596
+ string room_name = 1;
597
+ string track_id = 2 [(logger.name) = "trackID"];
598
+ oneof output {
599
+ DirectFileOutput file = 3;
600
+ string websocket_url = 4;
601
+ }
602
+ repeated WebhookConfig webhooks = 5;
603
+ }
604
+
605
+ message DirectFileOutput {
606
+ string filepath = 1;
607
+ bool disable_manifest = 5;
608
+ oneof output {
609
+ S3Upload s3 = 2;
610
+ GCPUpload gcp = 3;
611
+ AzureBlobUpload azure = 4;
612
+ AliOSSUpload aliOSS = 6;
613
+ }
614
+ }
615
+
616
+ message EncodedFileOutput {
617
+ EncodedFileType file_type = 1;
618
+ string filepath = 2;
619
+ bool disable_manifest = 6;
620
+ oneof output {
621
+ S3Upload s3 = 3;
622
+ GCPUpload gcp = 4;
623
+ AzureBlobUpload azure = 5;
624
+ AliOSSUpload aliOSS = 7;
625
+ }
626
+ }
627
+
628
+ message UpdateLayoutRequest {
629
+ string egress_id = 1 [(logger.name) = "egressID"];
630
+ string layout = 2;
631
+ }
632
+
633
+ message UpdateStreamRequest {
634
+ string egress_id = 1 [(logger.name) = "egressID"];
635
+ repeated string add_output_urls = 2;
636
+ repeated string remove_output_urls = 3;
637
+ }
638
+
639
+ message StreamInfoList {
640
+ repeated StreamInfo info = 1;
641
+ }