@livekit/rtc-node 0.0.1 → 0.0.2

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.
@@ -1,683 +0,0 @@
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
- // @generated by protoc-gen-es v1.4.2 with parameter "target=ts"
16
- // @generated from file track.proto (package livekit.proto, syntax proto3)
17
- /* eslint-disable */
18
- // @ts-nocheck
19
-
20
- import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
- import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
22
- import { RtcStats } from "./stats_pb.js";
23
- import { EncryptionType } from "./e2ee_pb.js";
24
- import { FfiOwnedHandle } from "./handle_pb.js";
25
-
26
- /**
27
- * @generated from enum livekit.proto.TrackKind
28
- */
29
- export enum TrackKind {
30
- /**
31
- * @generated from enum value: KIND_UNKNOWN = 0;
32
- */
33
- KIND_UNKNOWN = 0,
34
-
35
- /**
36
- * @generated from enum value: KIND_AUDIO = 1;
37
- */
38
- KIND_AUDIO = 1,
39
-
40
- /**
41
- * @generated from enum value: KIND_VIDEO = 2;
42
- */
43
- KIND_VIDEO = 2,
44
- }
45
- // Retrieve enum metadata with: proto3.getEnumType(TrackKind)
46
- proto3.util.setEnumType(TrackKind, "livekit.proto.TrackKind", [
47
- { no: 0, name: "KIND_UNKNOWN" },
48
- { no: 1, name: "KIND_AUDIO" },
49
- { no: 2, name: "KIND_VIDEO" },
50
- ]);
51
-
52
- /**
53
- * @generated from enum livekit.proto.TrackSource
54
- */
55
- export enum TrackSource {
56
- /**
57
- * @generated from enum value: SOURCE_UNKNOWN = 0;
58
- */
59
- SOURCE_UNKNOWN = 0,
60
-
61
- /**
62
- * @generated from enum value: SOURCE_CAMERA = 1;
63
- */
64
- SOURCE_CAMERA = 1,
65
-
66
- /**
67
- * @generated from enum value: SOURCE_MICROPHONE = 2;
68
- */
69
- SOURCE_MICROPHONE = 2,
70
-
71
- /**
72
- * @generated from enum value: SOURCE_SCREENSHARE = 3;
73
- */
74
- SOURCE_SCREENSHARE = 3,
75
-
76
- /**
77
- * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4;
78
- */
79
- SOURCE_SCREENSHARE_AUDIO = 4,
80
- }
81
- // Retrieve enum metadata with: proto3.getEnumType(TrackSource)
82
- proto3.util.setEnumType(TrackSource, "livekit.proto.TrackSource", [
83
- { no: 0, name: "SOURCE_UNKNOWN" },
84
- { no: 1, name: "SOURCE_CAMERA" },
85
- { no: 2, name: "SOURCE_MICROPHONE" },
86
- { no: 3, name: "SOURCE_SCREENSHARE" },
87
- { no: 4, name: "SOURCE_SCREENSHARE_AUDIO" },
88
- ]);
89
-
90
- /**
91
- * @generated from enum livekit.proto.StreamState
92
- */
93
- export enum StreamState {
94
- /**
95
- * @generated from enum value: STATE_UNKNOWN = 0;
96
- */
97
- STATE_UNKNOWN = 0,
98
-
99
- /**
100
- * @generated from enum value: STATE_ACTIVE = 1;
101
- */
102
- STATE_ACTIVE = 1,
103
-
104
- /**
105
- * @generated from enum value: STATE_PAUSED = 2;
106
- */
107
- STATE_PAUSED = 2,
108
- }
109
- // Retrieve enum metadata with: proto3.getEnumType(StreamState)
110
- proto3.util.setEnumType(StreamState, "livekit.proto.StreamState", [
111
- { no: 0, name: "STATE_UNKNOWN" },
112
- { no: 1, name: "STATE_ACTIVE" },
113
- { no: 2, name: "STATE_PAUSED" },
114
- ]);
115
-
116
- /**
117
- * Create a new VideoTrack from a VideoSource
118
- *
119
- * @generated from message livekit.proto.CreateVideoTrackRequest
120
- */
121
- export class CreateVideoTrackRequest extends Message<CreateVideoTrackRequest> {
122
- /**
123
- * @generated from field: string name = 1;
124
- */
125
- name = "";
126
-
127
- /**
128
- * @generated from field: uint64 source_handle = 2;
129
- */
130
- sourceHandle = protoInt64.zero;
131
-
132
- constructor(data?: PartialMessage<CreateVideoTrackRequest>) {
133
- super();
134
- proto3.util.initPartial(data, this);
135
- }
136
-
137
- static readonly runtime: typeof proto3 = proto3;
138
- static readonly typeName = "livekit.proto.CreateVideoTrackRequest";
139
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
140
- { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
141
- { no: 2, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
142
- ]);
143
-
144
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVideoTrackRequest {
145
- return new CreateVideoTrackRequest().fromBinary(bytes, options);
146
- }
147
-
148
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateVideoTrackRequest {
149
- return new CreateVideoTrackRequest().fromJson(jsonValue, options);
150
- }
151
-
152
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateVideoTrackRequest {
153
- return new CreateVideoTrackRequest().fromJsonString(jsonString, options);
154
- }
155
-
156
- static equals(a: CreateVideoTrackRequest | PlainMessage<CreateVideoTrackRequest> | undefined, b: CreateVideoTrackRequest | PlainMessage<CreateVideoTrackRequest> | undefined): boolean {
157
- return proto3.util.equals(CreateVideoTrackRequest, a, b);
158
- }
159
- }
160
-
161
- /**
162
- * @generated from message livekit.proto.CreateVideoTrackResponse
163
- */
164
- export class CreateVideoTrackResponse extends Message<CreateVideoTrackResponse> {
165
- /**
166
- * @generated from field: livekit.proto.OwnedTrack track = 1;
167
- */
168
- track?: OwnedTrack;
169
-
170
- constructor(data?: PartialMessage<CreateVideoTrackResponse>) {
171
- super();
172
- proto3.util.initPartial(data, this);
173
- }
174
-
175
- static readonly runtime: typeof proto3 = proto3;
176
- static readonly typeName = "livekit.proto.CreateVideoTrackResponse";
177
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
178
- { no: 1, name: "track", kind: "message", T: OwnedTrack },
179
- ]);
180
-
181
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVideoTrackResponse {
182
- return new CreateVideoTrackResponse().fromBinary(bytes, options);
183
- }
184
-
185
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateVideoTrackResponse {
186
- return new CreateVideoTrackResponse().fromJson(jsonValue, options);
187
- }
188
-
189
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateVideoTrackResponse {
190
- return new CreateVideoTrackResponse().fromJsonString(jsonString, options);
191
- }
192
-
193
- static equals(a: CreateVideoTrackResponse | PlainMessage<CreateVideoTrackResponse> | undefined, b: CreateVideoTrackResponse | PlainMessage<CreateVideoTrackResponse> | undefined): boolean {
194
- return proto3.util.equals(CreateVideoTrackResponse, a, b);
195
- }
196
- }
197
-
198
- /**
199
- * Create a new AudioTrack from a AudioSource
200
- *
201
- * @generated from message livekit.proto.CreateAudioTrackRequest
202
- */
203
- export class CreateAudioTrackRequest extends Message<CreateAudioTrackRequest> {
204
- /**
205
- * @generated from field: string name = 1;
206
- */
207
- name = "";
208
-
209
- /**
210
- * @generated from field: uint64 source_handle = 2;
211
- */
212
- sourceHandle = protoInt64.zero;
213
-
214
- constructor(data?: PartialMessage<CreateAudioTrackRequest>) {
215
- super();
216
- proto3.util.initPartial(data, this);
217
- }
218
-
219
- static readonly runtime: typeof proto3 = proto3;
220
- static readonly typeName = "livekit.proto.CreateAudioTrackRequest";
221
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
222
- { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
223
- { no: 2, name: "source_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
224
- ]);
225
-
226
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAudioTrackRequest {
227
- return new CreateAudioTrackRequest().fromBinary(bytes, options);
228
- }
229
-
230
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAudioTrackRequest {
231
- return new CreateAudioTrackRequest().fromJson(jsonValue, options);
232
- }
233
-
234
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAudioTrackRequest {
235
- return new CreateAudioTrackRequest().fromJsonString(jsonString, options);
236
- }
237
-
238
- static equals(a: CreateAudioTrackRequest | PlainMessage<CreateAudioTrackRequest> | undefined, b: CreateAudioTrackRequest | PlainMessage<CreateAudioTrackRequest> | undefined): boolean {
239
- return proto3.util.equals(CreateAudioTrackRequest, a, b);
240
- }
241
- }
242
-
243
- /**
244
- * @generated from message livekit.proto.CreateAudioTrackResponse
245
- */
246
- export class CreateAudioTrackResponse extends Message<CreateAudioTrackResponse> {
247
- /**
248
- * @generated from field: livekit.proto.OwnedTrack track = 1;
249
- */
250
- track?: OwnedTrack;
251
-
252
- constructor(data?: PartialMessage<CreateAudioTrackResponse>) {
253
- super();
254
- proto3.util.initPartial(data, this);
255
- }
256
-
257
- static readonly runtime: typeof proto3 = proto3;
258
- static readonly typeName = "livekit.proto.CreateAudioTrackResponse";
259
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
260
- { no: 1, name: "track", kind: "message", T: OwnedTrack },
261
- ]);
262
-
263
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAudioTrackResponse {
264
- return new CreateAudioTrackResponse().fromBinary(bytes, options);
265
- }
266
-
267
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAudioTrackResponse {
268
- return new CreateAudioTrackResponse().fromJson(jsonValue, options);
269
- }
270
-
271
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAudioTrackResponse {
272
- return new CreateAudioTrackResponse().fromJsonString(jsonString, options);
273
- }
274
-
275
- static equals(a: CreateAudioTrackResponse | PlainMessage<CreateAudioTrackResponse> | undefined, b: CreateAudioTrackResponse | PlainMessage<CreateAudioTrackResponse> | undefined): boolean {
276
- return proto3.util.equals(CreateAudioTrackResponse, a, b);
277
- }
278
- }
279
-
280
- /**
281
- * @generated from message livekit.proto.GetStatsRequest
282
- */
283
- export class GetStatsRequest extends Message<GetStatsRequest> {
284
- /**
285
- * @generated from field: uint64 track_handle = 1;
286
- */
287
- trackHandle = protoInt64.zero;
288
-
289
- constructor(data?: PartialMessage<GetStatsRequest>) {
290
- super();
291
- proto3.util.initPartial(data, this);
292
- }
293
-
294
- static readonly runtime: typeof proto3 = proto3;
295
- static readonly typeName = "livekit.proto.GetStatsRequest";
296
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
297
- { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
298
- ]);
299
-
300
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsRequest {
301
- return new GetStatsRequest().fromBinary(bytes, options);
302
- }
303
-
304
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsRequest {
305
- return new GetStatsRequest().fromJson(jsonValue, options);
306
- }
307
-
308
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsRequest {
309
- return new GetStatsRequest().fromJsonString(jsonString, options);
310
- }
311
-
312
- static equals(a: GetStatsRequest | PlainMessage<GetStatsRequest> | undefined, b: GetStatsRequest | PlainMessage<GetStatsRequest> | undefined): boolean {
313
- return proto3.util.equals(GetStatsRequest, a, b);
314
- }
315
- }
316
-
317
- /**
318
- * @generated from message livekit.proto.GetStatsResponse
319
- */
320
- export class GetStatsResponse extends Message<GetStatsResponse> {
321
- /**
322
- * @generated from field: uint64 async_id = 1;
323
- */
324
- asyncId = protoInt64.zero;
325
-
326
- constructor(data?: PartialMessage<GetStatsResponse>) {
327
- super();
328
- proto3.util.initPartial(data, this);
329
- }
330
-
331
- static readonly runtime: typeof proto3 = proto3;
332
- static readonly typeName = "livekit.proto.GetStatsResponse";
333
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
334
- { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
335
- ]);
336
-
337
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsResponse {
338
- return new GetStatsResponse().fromBinary(bytes, options);
339
- }
340
-
341
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsResponse {
342
- return new GetStatsResponse().fromJson(jsonValue, options);
343
- }
344
-
345
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsResponse {
346
- return new GetStatsResponse().fromJsonString(jsonString, options);
347
- }
348
-
349
- static equals(a: GetStatsResponse | PlainMessage<GetStatsResponse> | undefined, b: GetStatsResponse | PlainMessage<GetStatsResponse> | undefined): boolean {
350
- return proto3.util.equals(GetStatsResponse, a, b);
351
- }
352
- }
353
-
354
- /**
355
- * @generated from message livekit.proto.GetStatsCallback
356
- */
357
- export class GetStatsCallback extends Message<GetStatsCallback> {
358
- /**
359
- * @generated from field: uint64 async_id = 1;
360
- */
361
- asyncId = protoInt64.zero;
362
-
363
- /**
364
- * @generated from field: optional string error = 2;
365
- */
366
- error?: string;
367
-
368
- /**
369
- * @generated from field: repeated livekit.proto.RtcStats stats = 3;
370
- */
371
- stats: RtcStats[] = [];
372
-
373
- constructor(data?: PartialMessage<GetStatsCallback>) {
374
- super();
375
- proto3.util.initPartial(data, this);
376
- }
377
-
378
- static readonly runtime: typeof proto3 = proto3;
379
- static readonly typeName = "livekit.proto.GetStatsCallback";
380
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
381
- { no: 1, name: "async_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
382
- { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
383
- { no: 3, name: "stats", kind: "message", T: RtcStats, repeated: true },
384
- ]);
385
-
386
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsCallback {
387
- return new GetStatsCallback().fromBinary(bytes, options);
388
- }
389
-
390
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsCallback {
391
- return new GetStatsCallback().fromJson(jsonValue, options);
392
- }
393
-
394
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsCallback {
395
- return new GetStatsCallback().fromJsonString(jsonString, options);
396
- }
397
-
398
- static equals(a: GetStatsCallback | PlainMessage<GetStatsCallback> | undefined, b: GetStatsCallback | PlainMessage<GetStatsCallback> | undefined): boolean {
399
- return proto3.util.equals(GetStatsCallback, a, b);
400
- }
401
- }
402
-
403
- /**
404
- * @generated from message livekit.proto.TrackEvent
405
- */
406
- export class TrackEvent extends Message<TrackEvent> {
407
- constructor(data?: PartialMessage<TrackEvent>) {
408
- super();
409
- proto3.util.initPartial(data, this);
410
- }
411
-
412
- static readonly runtime: typeof proto3 = proto3;
413
- static readonly typeName = "livekit.proto.TrackEvent";
414
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
415
- ]);
416
-
417
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackEvent {
418
- return new TrackEvent().fromBinary(bytes, options);
419
- }
420
-
421
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackEvent {
422
- return new TrackEvent().fromJson(jsonValue, options);
423
- }
424
-
425
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackEvent {
426
- return new TrackEvent().fromJsonString(jsonString, options);
427
- }
428
-
429
- static equals(a: TrackEvent | PlainMessage<TrackEvent> | undefined, b: TrackEvent | PlainMessage<TrackEvent> | undefined): boolean {
430
- return proto3.util.equals(TrackEvent, a, b);
431
- }
432
- }
433
-
434
- /**
435
- * @generated from message livekit.proto.TrackPublicationInfo
436
- */
437
- export class TrackPublicationInfo extends Message<TrackPublicationInfo> {
438
- /**
439
- * @generated from field: string sid = 1;
440
- */
441
- sid = "";
442
-
443
- /**
444
- * @generated from field: string name = 2;
445
- */
446
- name = "";
447
-
448
- /**
449
- * @generated from field: livekit.proto.TrackKind kind = 3;
450
- */
451
- kind = TrackKind.KIND_UNKNOWN;
452
-
453
- /**
454
- * @generated from field: livekit.proto.TrackSource source = 4;
455
- */
456
- source = TrackSource.SOURCE_UNKNOWN;
457
-
458
- /**
459
- * @generated from field: bool simulcasted = 5;
460
- */
461
- simulcasted = false;
462
-
463
- /**
464
- * @generated from field: uint32 width = 6;
465
- */
466
- width = 0;
467
-
468
- /**
469
- * @generated from field: uint32 height = 7;
470
- */
471
- height = 0;
472
-
473
- /**
474
- * @generated from field: string mime_type = 8;
475
- */
476
- mimeType = "";
477
-
478
- /**
479
- * @generated from field: bool muted = 9;
480
- */
481
- muted = false;
482
-
483
- /**
484
- * @generated from field: bool remote = 10;
485
- */
486
- remote = false;
487
-
488
- /**
489
- * @generated from field: livekit.proto.EncryptionType encryption_type = 11;
490
- */
491
- encryptionType = EncryptionType.NONE;
492
-
493
- constructor(data?: PartialMessage<TrackPublicationInfo>) {
494
- super();
495
- proto3.util.initPartial(data, this);
496
- }
497
-
498
- static readonly runtime: typeof proto3 = proto3;
499
- static readonly typeName = "livekit.proto.TrackPublicationInfo";
500
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
501
- { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
502
- { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
503
- { no: 3, name: "kind", kind: "enum", T: proto3.getEnumType(TrackKind) },
504
- { no: 4, name: "source", kind: "enum", T: proto3.getEnumType(TrackSource) },
505
- { no: 5, name: "simulcasted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
506
- { no: 6, name: "width", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
507
- { no: 7, name: "height", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
508
- { no: 8, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
509
- { no: 9, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
510
- { no: 10, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
511
- { no: 11, name: "encryption_type", kind: "enum", T: proto3.getEnumType(EncryptionType) },
512
- ]);
513
-
514
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackPublicationInfo {
515
- return new TrackPublicationInfo().fromBinary(bytes, options);
516
- }
517
-
518
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackPublicationInfo {
519
- return new TrackPublicationInfo().fromJson(jsonValue, options);
520
- }
521
-
522
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackPublicationInfo {
523
- return new TrackPublicationInfo().fromJsonString(jsonString, options);
524
- }
525
-
526
- static equals(a: TrackPublicationInfo | PlainMessage<TrackPublicationInfo> | undefined, b: TrackPublicationInfo | PlainMessage<TrackPublicationInfo> | undefined): boolean {
527
- return proto3.util.equals(TrackPublicationInfo, a, b);
528
- }
529
- }
530
-
531
- /**
532
- * @generated from message livekit.proto.OwnedTrackPublication
533
- */
534
- export class OwnedTrackPublication extends Message<OwnedTrackPublication> {
535
- /**
536
- * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
537
- */
538
- handle?: FfiOwnedHandle;
539
-
540
- /**
541
- * @generated from field: livekit.proto.TrackPublicationInfo info = 2;
542
- */
543
- info?: TrackPublicationInfo;
544
-
545
- constructor(data?: PartialMessage<OwnedTrackPublication>) {
546
- super();
547
- proto3.util.initPartial(data, this);
548
- }
549
-
550
- static readonly runtime: typeof proto3 = proto3;
551
- static readonly typeName = "livekit.proto.OwnedTrackPublication";
552
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
553
- { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle },
554
- { no: 2, name: "info", kind: "message", T: TrackPublicationInfo },
555
- ]);
556
-
557
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTrackPublication {
558
- return new OwnedTrackPublication().fromBinary(bytes, options);
559
- }
560
-
561
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTrackPublication {
562
- return new OwnedTrackPublication().fromJson(jsonValue, options);
563
- }
564
-
565
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTrackPublication {
566
- return new OwnedTrackPublication().fromJsonString(jsonString, options);
567
- }
568
-
569
- static equals(a: OwnedTrackPublication | PlainMessage<OwnedTrackPublication> | undefined, b: OwnedTrackPublication | PlainMessage<OwnedTrackPublication> | undefined): boolean {
570
- return proto3.util.equals(OwnedTrackPublication, a, b);
571
- }
572
- }
573
-
574
- /**
575
- * @generated from message livekit.proto.TrackInfo
576
- */
577
- export class TrackInfo extends Message<TrackInfo> {
578
- /**
579
- * @generated from field: string sid = 1;
580
- */
581
- sid = "";
582
-
583
- /**
584
- * @generated from field: string name = 2;
585
- */
586
- name = "";
587
-
588
- /**
589
- * @generated from field: livekit.proto.TrackKind kind = 3;
590
- */
591
- kind = TrackKind.KIND_UNKNOWN;
592
-
593
- /**
594
- * @generated from field: livekit.proto.StreamState stream_state = 4;
595
- */
596
- streamState = StreamState.STATE_UNKNOWN;
597
-
598
- /**
599
- * @generated from field: bool muted = 5;
600
- */
601
- muted = false;
602
-
603
- /**
604
- * @generated from field: bool remote = 6;
605
- */
606
- remote = false;
607
-
608
- constructor(data?: PartialMessage<TrackInfo>) {
609
- super();
610
- proto3.util.initPartial(data, this);
611
- }
612
-
613
- static readonly runtime: typeof proto3 = proto3;
614
- static readonly typeName = "livekit.proto.TrackInfo";
615
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
616
- { no: 1, name: "sid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
617
- { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
618
- { no: 3, name: "kind", kind: "enum", T: proto3.getEnumType(TrackKind) },
619
- { no: 4, name: "stream_state", kind: "enum", T: proto3.getEnumType(StreamState) },
620
- { no: 5, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
621
- { no: 6, name: "remote", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
622
- ]);
623
-
624
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackInfo {
625
- return new TrackInfo().fromBinary(bytes, options);
626
- }
627
-
628
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackInfo {
629
- return new TrackInfo().fromJson(jsonValue, options);
630
- }
631
-
632
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackInfo {
633
- return new TrackInfo().fromJsonString(jsonString, options);
634
- }
635
-
636
- static equals(a: TrackInfo | PlainMessage<TrackInfo> | undefined, b: TrackInfo | PlainMessage<TrackInfo> | undefined): boolean {
637
- return proto3.util.equals(TrackInfo, a, b);
638
- }
639
- }
640
-
641
- /**
642
- * @generated from message livekit.proto.OwnedTrack
643
- */
644
- export class OwnedTrack extends Message<OwnedTrack> {
645
- /**
646
- * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
647
- */
648
- handle?: FfiOwnedHandle;
649
-
650
- /**
651
- * @generated from field: livekit.proto.TrackInfo info = 2;
652
- */
653
- info?: TrackInfo;
654
-
655
- constructor(data?: PartialMessage<OwnedTrack>) {
656
- super();
657
- proto3.util.initPartial(data, this);
658
- }
659
-
660
- static readonly runtime: typeof proto3 = proto3;
661
- static readonly typeName = "livekit.proto.OwnedTrack";
662
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
663
- { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle },
664
- { no: 2, name: "info", kind: "message", T: TrackInfo },
665
- ]);
666
-
667
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTrack {
668
- return new OwnedTrack().fromBinary(bytes, options);
669
- }
670
-
671
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTrack {
672
- return new OwnedTrack().fromJson(jsonValue, options);
673
- }
674
-
675
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTrack {
676
- return new OwnedTrack().fromJsonString(jsonString, options);
677
- }
678
-
679
- static equals(a: OwnedTrack | PlainMessage<OwnedTrack> | undefined, b: OwnedTrack | PlainMessage<OwnedTrack> | undefined): boolean {
680
- return proto3.util.equals(OwnedTrack, a, b);
681
- }
682
- }
683
-