@livekit/rtc-node 0.10.3 → 0.11.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 (136) hide show
  1. package/README.md +54 -2
  2. package/build.rs +1 -1
  3. package/dist/audio_frame.d.ts +1 -1
  4. package/dist/audio_frame.d.ts.map +1 -1
  5. package/dist/audio_frame.js +4 -4
  6. package/dist/audio_frame.js.map +1 -1
  7. package/dist/audio_resampler.d.ts.map +1 -1
  8. package/dist/audio_resampler.js +8 -7
  9. package/dist/audio_resampler.js.map +1 -1
  10. package/dist/audio_source.d.ts.map +1 -1
  11. package/dist/audio_source.js +8 -4
  12. package/dist/audio_source.js.map +1 -1
  13. package/dist/audio_stream.d.ts +1 -1
  14. package/dist/audio_stream.d.ts.map +1 -1
  15. package/dist/audio_stream.js +4 -3
  16. package/dist/audio_stream.js.map +1 -1
  17. package/dist/e2ee.d.ts.map +1 -1
  18. package/dist/e2ee.js +25 -25
  19. package/dist/e2ee.js.map +1 -1
  20. package/dist/ffi_client.d.ts +3 -3
  21. package/dist/ffi_client.d.ts.map +1 -1
  22. package/dist/ffi_client.js +9 -7
  23. package/dist/ffi_client.js.map +1 -1
  24. package/dist/index.d.ts +29 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +34 -4
  27. package/dist/index.js.map +1 -1
  28. package/dist/napi/native.d.ts +1 -0
  29. package/dist/participant.d.ts +52 -6
  30. package/dist/participant.d.ts.map +1 -1
  31. package/dist/participant.js +155 -32
  32. package/dist/participant.js.map +1 -1
  33. package/dist/proto/audio_frame_pb.d.ts +451 -526
  34. package/dist/proto/audio_frame_pb.d.ts.map +1 -1
  35. package/dist/proto/audio_frame_pb.js +200 -1179
  36. package/dist/proto/audio_frame_pb.js.map +1 -1
  37. package/dist/proto/e2ee_pb.d.ts +264 -333
  38. package/dist/proto/e2ee_pb.d.ts.map +1 -1
  39. package/dist/proto/e2ee_pb.js +136 -810
  40. package/dist/proto/e2ee_pb.js.map +1 -1
  41. package/dist/proto/ffi_pb.d.ts +175 -129
  42. package/dist/proto/ffi_pb.d.ts.map +1 -1
  43. package/dist/proto/ffi_pb.js +58 -395
  44. package/dist/proto/ffi_pb.js.map +1 -1
  45. package/dist/proto/handle_pb.d.ts +14 -13
  46. package/dist/proto/handle_pb.d.ts.map +1 -1
  47. package/dist/proto/handle_pb.js +8 -39
  48. package/dist/proto/handle_pb.js.map +1 -1
  49. package/dist/proto/participant_pb.d.ts +54 -52
  50. package/dist/proto/participant_pb.d.ts.map +1 -1
  51. package/dist/proto/participant_pb.js +18 -90
  52. package/dist/proto/participant_pb.js.map +1 -1
  53. package/dist/proto/room_pb.d.ts +1042 -1187
  54. package/dist/proto/room_pb.d.ts.map +1 -1
  55. package/dist/proto/room_pb.js +470 -2938
  56. package/dist/proto/room_pb.js.map +1 -1
  57. package/dist/proto/rpc_pb.d.ts +235 -0
  58. package/dist/proto/rpc_pb.d.ts.map +1 -0
  59. package/dist/proto/rpc_pb.js +74 -0
  60. package/dist/proto/rpc_pb.js.map +1 -0
  61. package/dist/proto/stats_pb.d.ts +738 -800
  62. package/dist/proto/stats_pb.d.ts.map +1 -1
  63. package/dist/proto/stats_pb.js +218 -1960
  64. package/dist/proto/stats_pb.js.map +1 -1
  65. package/dist/proto/track_pb.d.ts +225 -258
  66. package/dist/proto/track_pb.d.ts.map +1 -1
  67. package/dist/proto/track_pb.js +98 -591
  68. package/dist/proto/track_pb.js.map +1 -1
  69. package/dist/proto/video_frame_pb.d.ts +357 -390
  70. package/dist/proto/video_frame_pb.d.ts.map +1 -1
  71. package/dist/proto/video_frame_pb.js +137 -790
  72. package/dist/proto/video_frame_pb.js.map +1 -1
  73. package/dist/room.d.ts +21 -7
  74. package/dist/room.d.ts.map +1 -1
  75. package/dist/room.js +134 -54
  76. package/dist/room.js.map +1 -1
  77. package/dist/rpc.d.ts +78 -0
  78. package/dist/rpc.d.ts.map +1 -0
  79. package/dist/rpc.js +69 -0
  80. package/dist/rpc.js.map +1 -0
  81. package/dist/track.d.ts.map +1 -1
  82. package/dist/track.js +7 -3
  83. package/dist/track.js.map +1 -1
  84. package/dist/track_publication.d.ts.map +1 -1
  85. package/dist/track_publication.js +3 -2
  86. package/dist/track_publication.js.map +1 -1
  87. package/dist/version.d.ts +2 -0
  88. package/dist/version.d.ts.map +1 -0
  89. package/dist/version.js +2 -0
  90. package/dist/version.js.map +1 -0
  91. package/dist/video_frame.d.ts +2 -2
  92. package/dist/video_frame.d.ts.map +1 -1
  93. package/dist/video_frame.js +47 -25
  94. package/dist/video_frame.js.map +1 -1
  95. package/dist/video_source.d.ts.map +1 -1
  96. package/dist/video_source.js +4 -3
  97. package/dist/video_source.js.map +1 -1
  98. package/dist/video_stream.d.ts +1 -1
  99. package/dist/video_stream.d.ts.map +1 -1
  100. package/dist/video_stream.js +7 -3
  101. package/dist/video_stream.js.map +1 -1
  102. package/package.json +13 -10
  103. package/src/audio_frame.ts +6 -6
  104. package/src/audio_resampler.ts +10 -9
  105. package/src/audio_source.ts +9 -8
  106. package/src/audio_stream.ts +7 -6
  107. package/src/e2ee.ts +34 -34
  108. package/src/ffi_client.ts +23 -10
  109. package/src/index.ts +61 -2
  110. package/src/napi/native.d.ts +1 -0
  111. package/src/nodejs.rs +6 -3
  112. package/src/participant.ts +219 -55
  113. package/src/proto/audio_frame_pb.ts +562 -1279
  114. package/src/proto/e2ee_pb.ts +365 -886
  115. package/src/proto/ffi_pb.ts +206 -405
  116. package/src/proto/handle_pb.ts +21 -35
  117. package/src/proto/participant_pb.ts +71 -112
  118. package/src/proto/room_pb.ts +1284 -2995
  119. package/src/proto/rpc_pb.ts +310 -0
  120. package/src/proto/stats_pb.ts +1028 -1947
  121. package/src/proto/track_pb.ts +287 -621
  122. package/src/proto/video_frame_pb.ts +445 -905
  123. package/src/room.ts +181 -75
  124. package/src/rpc.ts +121 -0
  125. package/src/track.ts +8 -7
  126. package/src/track_publication.ts +5 -4
  127. package/src/version.ts +1 -0
  128. package/src/video_frame.ts +54 -27
  129. package/src/video_source.ts +7 -6
  130. package/src/video_stream.ts +7 -6
  131. package/dist/utils.d.ts +0 -7
  132. package/dist/utils.d.ts.map +0 -1
  133. package/dist/utils.js +0 -48
  134. package/dist/utils.js.map +0 -1
  135. package/src/utils.test.ts +0 -47
  136. package/src/utils.ts +0 -44
@@ -1,433 +1,400 @@
1
- import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
- import { Message, proto3 } from "@bufbuild/protobuf";
3
- import { RtcStats } from "./stats_pb.js";
4
- import { EncryptionType } from "./e2ee_pb.js";
5
- import { FfiOwnedHandle } from "./handle_pb.js";
1
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
2
+ import type { EncryptionType } from "./e2ee_pb";
3
+ import type { FfiOwnedHandle } from "./handle_pb";
4
+ import type { RtcStats } from "./stats_pb";
5
+ import type { Message } from "@bufbuild/protobuf";
6
6
  /**
7
- * @generated from enum livekit.proto.TrackKind
8
- */
9
- export declare enum TrackKind {
10
- /**
11
- * @generated from enum value: KIND_UNKNOWN = 0;
12
- */
13
- KIND_UNKNOWN = 0,
14
- /**
15
- * @generated from enum value: KIND_AUDIO = 1;
16
- */
17
- KIND_AUDIO = 1,
18
- /**
19
- * @generated from enum value: KIND_VIDEO = 2;
20
- */
21
- KIND_VIDEO = 2
22
- }
23
- /**
24
- * @generated from enum livekit.proto.TrackSource
25
- */
26
- export declare enum TrackSource {
27
- /**
28
- * @generated from enum value: SOURCE_UNKNOWN = 0;
29
- */
30
- SOURCE_UNKNOWN = 0,
31
- /**
32
- * @generated from enum value: SOURCE_CAMERA = 1;
33
- */
34
- SOURCE_CAMERA = 1,
35
- /**
36
- * @generated from enum value: SOURCE_MICROPHONE = 2;
37
- */
38
- SOURCE_MICROPHONE = 2,
39
- /**
40
- * @generated from enum value: SOURCE_SCREENSHARE = 3;
41
- */
42
- SOURCE_SCREENSHARE = 3,
43
- /**
44
- * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4;
45
- */
46
- SOURCE_SCREENSHARE_AUDIO = 4
47
- }
48
- /**
49
- * @generated from enum livekit.proto.StreamState
7
+ * Describes the file track.proto.
50
8
  */
51
- export declare enum StreamState {
52
- /**
53
- * @generated from enum value: STATE_UNKNOWN = 0;
54
- */
55
- STATE_UNKNOWN = 0,
56
- /**
57
- * @generated from enum value: STATE_ACTIVE = 1;
58
- */
59
- STATE_ACTIVE = 1,
60
- /**
61
- * @generated from enum value: STATE_PAUSED = 2;
62
- */
63
- STATE_PAUSED = 2
64
- }
9
+ export declare const file_track: GenFile;
65
10
  /**
66
11
  * Create a new VideoTrack from a VideoSource
67
12
  *
68
13
  * @generated from message livekit.proto.CreateVideoTrackRequest
69
14
  */
70
- export declare class CreateVideoTrackRequest extends Message<CreateVideoTrackRequest> {
15
+ export type CreateVideoTrackRequest = Message<"livekit.proto.CreateVideoTrackRequest"> & {
71
16
  /**
72
- * @generated from field: string name = 1;
17
+ * @generated from field: required string name = 1;
73
18
  */
74
19
  name: string;
75
20
  /**
76
- * @generated from field: uint64 source_handle = 2;
21
+ * @generated from field: required uint64 source_handle = 2;
77
22
  */
78
23
  sourceHandle: bigint;
79
- constructor(data?: PartialMessage<CreateVideoTrackRequest>);
80
- static readonly runtime: typeof proto3;
81
- static readonly typeName = "livekit.proto.CreateVideoTrackRequest";
82
- static readonly fields: FieldList;
83
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVideoTrackRequest;
84
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateVideoTrackRequest;
85
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateVideoTrackRequest;
86
- static equals(a: CreateVideoTrackRequest | PlainMessage<CreateVideoTrackRequest> | undefined, b: CreateVideoTrackRequest | PlainMessage<CreateVideoTrackRequest> | undefined): boolean;
87
- }
24
+ };
25
+ /**
26
+ * Describes the message livekit.proto.CreateVideoTrackRequest.
27
+ * Use `create(CreateVideoTrackRequestSchema)` to create a new message.
28
+ */
29
+ export declare const CreateVideoTrackRequestSchema: GenMessage<CreateVideoTrackRequest>;
88
30
  /**
89
31
  * @generated from message livekit.proto.CreateVideoTrackResponse
90
32
  */
91
- export declare class CreateVideoTrackResponse extends Message<CreateVideoTrackResponse> {
33
+ export type CreateVideoTrackResponse = Message<"livekit.proto.CreateVideoTrackResponse"> & {
92
34
  /**
93
- * @generated from field: livekit.proto.OwnedTrack track = 1;
35
+ * @generated from field: required livekit.proto.OwnedTrack track = 1;
94
36
  */
95
37
  track?: OwnedTrack;
96
- constructor(data?: PartialMessage<CreateVideoTrackResponse>);
97
- static readonly runtime: typeof proto3;
98
- static readonly typeName = "livekit.proto.CreateVideoTrackResponse";
99
- static readonly fields: FieldList;
100
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateVideoTrackResponse;
101
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateVideoTrackResponse;
102
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateVideoTrackResponse;
103
- static equals(a: CreateVideoTrackResponse | PlainMessage<CreateVideoTrackResponse> | undefined, b: CreateVideoTrackResponse | PlainMessage<CreateVideoTrackResponse> | undefined): boolean;
104
- }
38
+ };
39
+ /**
40
+ * Describes the message livekit.proto.CreateVideoTrackResponse.
41
+ * Use `create(CreateVideoTrackResponseSchema)` to create a new message.
42
+ */
43
+ export declare const CreateVideoTrackResponseSchema: GenMessage<CreateVideoTrackResponse>;
105
44
  /**
106
45
  * Create a new AudioTrack from a AudioSource
107
46
  *
108
47
  * @generated from message livekit.proto.CreateAudioTrackRequest
109
48
  */
110
- export declare class CreateAudioTrackRequest extends Message<CreateAudioTrackRequest> {
49
+ export type CreateAudioTrackRequest = Message<"livekit.proto.CreateAudioTrackRequest"> & {
111
50
  /**
112
- * @generated from field: string name = 1;
51
+ * @generated from field: required string name = 1;
113
52
  */
114
53
  name: string;
115
54
  /**
116
- * @generated from field: uint64 source_handle = 2;
55
+ * @generated from field: required uint64 source_handle = 2;
117
56
  */
118
57
  sourceHandle: bigint;
119
- constructor(data?: PartialMessage<CreateAudioTrackRequest>);
120
- static readonly runtime: typeof proto3;
121
- static readonly typeName = "livekit.proto.CreateAudioTrackRequest";
122
- static readonly fields: FieldList;
123
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAudioTrackRequest;
124
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAudioTrackRequest;
125
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAudioTrackRequest;
126
- static equals(a: CreateAudioTrackRequest | PlainMessage<CreateAudioTrackRequest> | undefined, b: CreateAudioTrackRequest | PlainMessage<CreateAudioTrackRequest> | undefined): boolean;
127
- }
58
+ };
59
+ /**
60
+ * Describes the message livekit.proto.CreateAudioTrackRequest.
61
+ * Use `create(CreateAudioTrackRequestSchema)` to create a new message.
62
+ */
63
+ export declare const CreateAudioTrackRequestSchema: GenMessage<CreateAudioTrackRequest>;
128
64
  /**
129
65
  * @generated from message livekit.proto.CreateAudioTrackResponse
130
66
  */
131
- export declare class CreateAudioTrackResponse extends Message<CreateAudioTrackResponse> {
67
+ export type CreateAudioTrackResponse = Message<"livekit.proto.CreateAudioTrackResponse"> & {
132
68
  /**
133
- * @generated from field: livekit.proto.OwnedTrack track = 1;
69
+ * @generated from field: required livekit.proto.OwnedTrack track = 1;
134
70
  */
135
71
  track?: OwnedTrack;
136
- constructor(data?: PartialMessage<CreateAudioTrackResponse>);
137
- static readonly runtime: typeof proto3;
138
- static readonly typeName = "livekit.proto.CreateAudioTrackResponse";
139
- static readonly fields: FieldList;
140
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateAudioTrackResponse;
141
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateAudioTrackResponse;
142
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateAudioTrackResponse;
143
- static equals(a: CreateAudioTrackResponse | PlainMessage<CreateAudioTrackResponse> | undefined, b: CreateAudioTrackResponse | PlainMessage<CreateAudioTrackResponse> | undefined): boolean;
144
- }
72
+ };
73
+ /**
74
+ * Describes the message livekit.proto.CreateAudioTrackResponse.
75
+ * Use `create(CreateAudioTrackResponseSchema)` to create a new message.
76
+ */
77
+ export declare const CreateAudioTrackResponseSchema: GenMessage<CreateAudioTrackResponse>;
145
78
  /**
146
79
  * @generated from message livekit.proto.GetStatsRequest
147
80
  */
148
- export declare class GetStatsRequest extends Message<GetStatsRequest> {
81
+ export type GetStatsRequest = Message<"livekit.proto.GetStatsRequest"> & {
149
82
  /**
150
- * @generated from field: uint64 track_handle = 1;
83
+ * @generated from field: required uint64 track_handle = 1;
151
84
  */
152
85
  trackHandle: bigint;
153
- constructor(data?: PartialMessage<GetStatsRequest>);
154
- static readonly runtime: typeof proto3;
155
- static readonly typeName = "livekit.proto.GetStatsRequest";
156
- static readonly fields: FieldList;
157
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsRequest;
158
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsRequest;
159
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsRequest;
160
- static equals(a: GetStatsRequest | PlainMessage<GetStatsRequest> | undefined, b: GetStatsRequest | PlainMessage<GetStatsRequest> | undefined): boolean;
161
- }
86
+ };
87
+ /**
88
+ * Describes the message livekit.proto.GetStatsRequest.
89
+ * Use `create(GetStatsRequestSchema)` to create a new message.
90
+ */
91
+ export declare const GetStatsRequestSchema: GenMessage<GetStatsRequest>;
162
92
  /**
163
93
  * @generated from message livekit.proto.GetStatsResponse
164
94
  */
165
- export declare class GetStatsResponse extends Message<GetStatsResponse> {
95
+ export type GetStatsResponse = Message<"livekit.proto.GetStatsResponse"> & {
166
96
  /**
167
- * @generated from field: uint64 async_id = 1;
97
+ * @generated from field: required uint64 async_id = 1;
168
98
  */
169
99
  asyncId: bigint;
170
- constructor(data?: PartialMessage<GetStatsResponse>);
171
- static readonly runtime: typeof proto3;
172
- static readonly typeName = "livekit.proto.GetStatsResponse";
173
- static readonly fields: FieldList;
174
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsResponse;
175
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsResponse;
176
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsResponse;
177
- static equals(a: GetStatsResponse | PlainMessage<GetStatsResponse> | undefined, b: GetStatsResponse | PlainMessage<GetStatsResponse> | undefined): boolean;
178
- }
100
+ };
101
+ /**
102
+ * Describes the message livekit.proto.GetStatsResponse.
103
+ * Use `create(GetStatsResponseSchema)` to create a new message.
104
+ */
105
+ export declare const GetStatsResponseSchema: GenMessage<GetStatsResponse>;
179
106
  /**
180
107
  * @generated from message livekit.proto.GetStatsCallback
181
108
  */
182
- export declare class GetStatsCallback extends Message<GetStatsCallback> {
109
+ export type GetStatsCallback = Message<"livekit.proto.GetStatsCallback"> & {
183
110
  /**
184
- * @generated from field: uint64 async_id = 1;
111
+ * @generated from field: required uint64 async_id = 1;
185
112
  */
186
113
  asyncId: bigint;
187
114
  /**
188
115
  * @generated from field: optional string error = 2;
189
116
  */
190
- error?: string;
117
+ error: string;
191
118
  /**
192
119
  * @generated from field: repeated livekit.proto.RtcStats stats = 3;
193
120
  */
194
121
  stats: RtcStats[];
195
- constructor(data?: PartialMessage<GetStatsCallback>);
196
- static readonly runtime: typeof proto3;
197
- static readonly typeName = "livekit.proto.GetStatsCallback";
198
- static readonly fields: FieldList;
199
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetStatsCallback;
200
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetStatsCallback;
201
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetStatsCallback;
202
- static equals(a: GetStatsCallback | PlainMessage<GetStatsCallback> | undefined, b: GetStatsCallback | PlainMessage<GetStatsCallback> | undefined): boolean;
203
- }
122
+ };
123
+ /**
124
+ * Describes the message livekit.proto.GetStatsCallback.
125
+ * Use `create(GetStatsCallbackSchema)` to create a new message.
126
+ */
127
+ export declare const GetStatsCallbackSchema: GenMessage<GetStatsCallback>;
204
128
  /**
205
129
  * @generated from message livekit.proto.TrackEvent
206
130
  */
207
- export declare class TrackEvent extends Message<TrackEvent> {
208
- constructor(data?: PartialMessage<TrackEvent>);
209
- static readonly runtime: typeof proto3;
210
- static readonly typeName = "livekit.proto.TrackEvent";
211
- static readonly fields: FieldList;
212
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackEvent;
213
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackEvent;
214
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackEvent;
215
- static equals(a: TrackEvent | PlainMessage<TrackEvent> | undefined, b: TrackEvent | PlainMessage<TrackEvent> | undefined): boolean;
216
- }
131
+ export type TrackEvent = Message<"livekit.proto.TrackEvent"> & {};
132
+ /**
133
+ * Describes the message livekit.proto.TrackEvent.
134
+ * Use `create(TrackEventSchema)` to create a new message.
135
+ */
136
+ export declare const TrackEventSchema: GenMessage<TrackEvent>;
217
137
  /**
218
138
  * @generated from message livekit.proto.TrackPublicationInfo
219
139
  */
220
- export declare class TrackPublicationInfo extends Message<TrackPublicationInfo> {
140
+ export type TrackPublicationInfo = Message<"livekit.proto.TrackPublicationInfo"> & {
221
141
  /**
222
- * @generated from field: string sid = 1;
142
+ * @generated from field: required string sid = 1;
223
143
  */
224
144
  sid: string;
225
145
  /**
226
- * @generated from field: string name = 2;
146
+ * @generated from field: required string name = 2;
227
147
  */
228
148
  name: string;
229
149
  /**
230
- * @generated from field: livekit.proto.TrackKind kind = 3;
150
+ * @generated from field: required livekit.proto.TrackKind kind = 3;
231
151
  */
232
152
  kind: TrackKind;
233
153
  /**
234
- * @generated from field: livekit.proto.TrackSource source = 4;
154
+ * @generated from field: required livekit.proto.TrackSource source = 4;
235
155
  */
236
156
  source: TrackSource;
237
157
  /**
238
- * @generated from field: bool simulcasted = 5;
158
+ * @generated from field: required bool simulcasted = 5;
239
159
  */
240
160
  simulcasted: boolean;
241
161
  /**
242
- * @generated from field: uint32 width = 6;
162
+ * @generated from field: required uint32 width = 6;
243
163
  */
244
164
  width: number;
245
165
  /**
246
- * @generated from field: uint32 height = 7;
166
+ * @generated from field: required uint32 height = 7;
247
167
  */
248
168
  height: number;
249
169
  /**
250
- * @generated from field: string mime_type = 8;
170
+ * @generated from field: required string mime_type = 8;
251
171
  */
252
172
  mimeType: string;
253
173
  /**
254
- * @generated from field: bool muted = 9;
174
+ * @generated from field: required bool muted = 9;
255
175
  */
256
176
  muted: boolean;
257
177
  /**
258
- * @generated from field: bool remote = 10;
178
+ * @generated from field: required bool remote = 10;
259
179
  */
260
180
  remote: boolean;
261
181
  /**
262
- * @generated from field: livekit.proto.EncryptionType encryption_type = 11;
182
+ * @generated from field: required livekit.proto.EncryptionType encryption_type = 11;
263
183
  */
264
184
  encryptionType: EncryptionType;
265
- constructor(data?: PartialMessage<TrackPublicationInfo>);
266
- static readonly runtime: typeof proto3;
267
- static readonly typeName = "livekit.proto.TrackPublicationInfo";
268
- static readonly fields: FieldList;
269
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackPublicationInfo;
270
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackPublicationInfo;
271
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackPublicationInfo;
272
- static equals(a: TrackPublicationInfo | PlainMessage<TrackPublicationInfo> | undefined, b: TrackPublicationInfo | PlainMessage<TrackPublicationInfo> | undefined): boolean;
273
- }
185
+ };
186
+ /**
187
+ * Describes the message livekit.proto.TrackPublicationInfo.
188
+ * Use `create(TrackPublicationInfoSchema)` to create a new message.
189
+ */
190
+ export declare const TrackPublicationInfoSchema: GenMessage<TrackPublicationInfo>;
274
191
  /**
275
192
  * @generated from message livekit.proto.OwnedTrackPublication
276
193
  */
277
- export declare class OwnedTrackPublication extends Message<OwnedTrackPublication> {
194
+ export type OwnedTrackPublication = Message<"livekit.proto.OwnedTrackPublication"> & {
278
195
  /**
279
- * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
196
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
280
197
  */
281
198
  handle?: FfiOwnedHandle;
282
199
  /**
283
- * @generated from field: livekit.proto.TrackPublicationInfo info = 2;
200
+ * @generated from field: required livekit.proto.TrackPublicationInfo info = 2;
284
201
  */
285
202
  info?: TrackPublicationInfo;
286
- constructor(data?: PartialMessage<OwnedTrackPublication>);
287
- static readonly runtime: typeof proto3;
288
- static readonly typeName = "livekit.proto.OwnedTrackPublication";
289
- static readonly fields: FieldList;
290
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTrackPublication;
291
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTrackPublication;
292
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTrackPublication;
293
- static equals(a: OwnedTrackPublication | PlainMessage<OwnedTrackPublication> | undefined, b: OwnedTrackPublication | PlainMessage<OwnedTrackPublication> | undefined): boolean;
294
- }
203
+ };
204
+ /**
205
+ * Describes the message livekit.proto.OwnedTrackPublication.
206
+ * Use `create(OwnedTrackPublicationSchema)` to create a new message.
207
+ */
208
+ export declare const OwnedTrackPublicationSchema: GenMessage<OwnedTrackPublication>;
295
209
  /**
296
210
  * @generated from message livekit.proto.TrackInfo
297
211
  */
298
- export declare class TrackInfo extends Message<TrackInfo> {
212
+ export type TrackInfo = Message<"livekit.proto.TrackInfo"> & {
299
213
  /**
300
- * @generated from field: string sid = 1;
214
+ * @generated from field: required string sid = 1;
301
215
  */
302
216
  sid: string;
303
217
  /**
304
- * @generated from field: string name = 2;
218
+ * @generated from field: required string name = 2;
305
219
  */
306
220
  name: string;
307
221
  /**
308
- * @generated from field: livekit.proto.TrackKind kind = 3;
222
+ * @generated from field: required livekit.proto.TrackKind kind = 3;
309
223
  */
310
224
  kind: TrackKind;
311
225
  /**
312
- * @generated from field: livekit.proto.StreamState stream_state = 4;
226
+ * @generated from field: required livekit.proto.StreamState stream_state = 4;
313
227
  */
314
228
  streamState: StreamState;
315
229
  /**
316
- * @generated from field: bool muted = 5;
230
+ * @generated from field: required bool muted = 5;
317
231
  */
318
232
  muted: boolean;
319
233
  /**
320
- * @generated from field: bool remote = 6;
234
+ * @generated from field: required bool remote = 6;
321
235
  */
322
236
  remote: boolean;
323
- constructor(data?: PartialMessage<TrackInfo>);
324
- static readonly runtime: typeof proto3;
325
- static readonly typeName = "livekit.proto.TrackInfo";
326
- static readonly fields: FieldList;
327
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TrackInfo;
328
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TrackInfo;
329
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TrackInfo;
330
- static equals(a: TrackInfo | PlainMessage<TrackInfo> | undefined, b: TrackInfo | PlainMessage<TrackInfo> | undefined): boolean;
331
- }
237
+ };
238
+ /**
239
+ * Describes the message livekit.proto.TrackInfo.
240
+ * Use `create(TrackInfoSchema)` to create a new message.
241
+ */
242
+ export declare const TrackInfoSchema: GenMessage<TrackInfo>;
332
243
  /**
333
244
  * @generated from message livekit.proto.OwnedTrack
334
245
  */
335
- export declare class OwnedTrack extends Message<OwnedTrack> {
246
+ export type OwnedTrack = Message<"livekit.proto.OwnedTrack"> & {
336
247
  /**
337
- * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
248
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
338
249
  */
339
250
  handle?: FfiOwnedHandle;
340
251
  /**
341
- * @generated from field: livekit.proto.TrackInfo info = 2;
252
+ * @generated from field: required livekit.proto.TrackInfo info = 2;
342
253
  */
343
254
  info?: TrackInfo;
344
- constructor(data?: PartialMessage<OwnedTrack>);
345
- static readonly runtime: typeof proto3;
346
- static readonly typeName = "livekit.proto.OwnedTrack";
347
- static readonly fields: FieldList;
348
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedTrack;
349
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedTrack;
350
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedTrack;
351
- static equals(a: OwnedTrack | PlainMessage<OwnedTrack> | undefined, b: OwnedTrack | PlainMessage<OwnedTrack> | undefined): boolean;
352
- }
255
+ };
256
+ /**
257
+ * Describes the message livekit.proto.OwnedTrack.
258
+ * Use `create(OwnedTrackSchema)` to create a new message.
259
+ */
260
+ export declare const OwnedTrackSchema: GenMessage<OwnedTrack>;
353
261
  /**
354
262
  * Mute/UnMute a track
355
263
  *
356
264
  * @generated from message livekit.proto.LocalTrackMuteRequest
357
265
  */
358
- export declare class LocalTrackMuteRequest extends Message<LocalTrackMuteRequest> {
266
+ export type LocalTrackMuteRequest = Message<"livekit.proto.LocalTrackMuteRequest"> & {
359
267
  /**
360
- * @generated from field: uint64 track_handle = 1;
268
+ * @generated from field: required uint64 track_handle = 1;
361
269
  */
362
270
  trackHandle: bigint;
363
271
  /**
364
- * @generated from field: bool mute = 2;
272
+ * @generated from field: required bool mute = 2;
365
273
  */
366
274
  mute: boolean;
367
- constructor(data?: PartialMessage<LocalTrackMuteRequest>);
368
- static readonly runtime: typeof proto3;
369
- static readonly typeName = "livekit.proto.LocalTrackMuteRequest";
370
- static readonly fields: FieldList;
371
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackMuteRequest;
372
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackMuteRequest;
373
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackMuteRequest;
374
- static equals(a: LocalTrackMuteRequest | PlainMessage<LocalTrackMuteRequest> | undefined, b: LocalTrackMuteRequest | PlainMessage<LocalTrackMuteRequest> | undefined): boolean;
375
- }
275
+ };
276
+ /**
277
+ * Describes the message livekit.proto.LocalTrackMuteRequest.
278
+ * Use `create(LocalTrackMuteRequestSchema)` to create a new message.
279
+ */
280
+ export declare const LocalTrackMuteRequestSchema: GenMessage<LocalTrackMuteRequest>;
376
281
  /**
377
282
  * @generated from message livekit.proto.LocalTrackMuteResponse
378
283
  */
379
- export declare class LocalTrackMuteResponse extends Message<LocalTrackMuteResponse> {
284
+ export type LocalTrackMuteResponse = Message<"livekit.proto.LocalTrackMuteResponse"> & {
380
285
  /**
381
- * @generated from field: bool muted = 1;
286
+ * @generated from field: required bool muted = 1;
382
287
  */
383
288
  muted: boolean;
384
- constructor(data?: PartialMessage<LocalTrackMuteResponse>);
385
- static readonly runtime: typeof proto3;
386
- static readonly typeName = "livekit.proto.LocalTrackMuteResponse";
387
- static readonly fields: FieldList;
388
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackMuteResponse;
389
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackMuteResponse;
390
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackMuteResponse;
391
- static equals(a: LocalTrackMuteResponse | PlainMessage<LocalTrackMuteResponse> | undefined, b: LocalTrackMuteResponse | PlainMessage<LocalTrackMuteResponse> | undefined): boolean;
392
- }
289
+ };
290
+ /**
291
+ * Describes the message livekit.proto.LocalTrackMuteResponse.
292
+ * Use `create(LocalTrackMuteResponseSchema)` to create a new message.
293
+ */
294
+ export declare const LocalTrackMuteResponseSchema: GenMessage<LocalTrackMuteResponse>;
393
295
  /**
394
296
  * Enable/Disable a remote track
395
297
  *
396
298
  * @generated from message livekit.proto.EnableRemoteTrackRequest
397
299
  */
398
- export declare class EnableRemoteTrackRequest extends Message<EnableRemoteTrackRequest> {
300
+ export type EnableRemoteTrackRequest = Message<"livekit.proto.EnableRemoteTrackRequest"> & {
399
301
  /**
400
- * @generated from field: uint64 track_handle = 1;
302
+ * @generated from field: required uint64 track_handle = 1;
401
303
  */
402
304
  trackHandle: bigint;
403
305
  /**
404
- * @generated from field: bool enabled = 2;
306
+ * @generated from field: required bool enabled = 2;
405
307
  */
406
308
  enabled: boolean;
407
- constructor(data?: PartialMessage<EnableRemoteTrackRequest>);
408
- static readonly runtime: typeof proto3;
409
- static readonly typeName = "livekit.proto.EnableRemoteTrackRequest";
410
- static readonly fields: FieldList;
411
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackRequest;
412
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackRequest;
413
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackRequest;
414
- static equals(a: EnableRemoteTrackRequest | PlainMessage<EnableRemoteTrackRequest> | undefined, b: EnableRemoteTrackRequest | PlainMessage<EnableRemoteTrackRequest> | undefined): boolean;
415
- }
309
+ };
310
+ /**
311
+ * Describes the message livekit.proto.EnableRemoteTrackRequest.
312
+ * Use `create(EnableRemoteTrackRequestSchema)` to create a new message.
313
+ */
314
+ export declare const EnableRemoteTrackRequestSchema: GenMessage<EnableRemoteTrackRequest>;
416
315
  /**
417
316
  * @generated from message livekit.proto.EnableRemoteTrackResponse
418
317
  */
419
- export declare class EnableRemoteTrackResponse extends Message<EnableRemoteTrackResponse> {
318
+ export type EnableRemoteTrackResponse = Message<"livekit.proto.EnableRemoteTrackResponse"> & {
420
319
  /**
421
- * @generated from field: bool enabled = 1;
320
+ * @generated from field: required bool enabled = 1;
422
321
  */
423
322
  enabled: boolean;
424
- constructor(data?: PartialMessage<EnableRemoteTrackResponse>);
425
- static readonly runtime: typeof proto3;
426
- static readonly typeName = "livekit.proto.EnableRemoteTrackResponse";
427
- static readonly fields: FieldList;
428
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackResponse;
429
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackResponse;
430
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackResponse;
431
- static equals(a: EnableRemoteTrackResponse | PlainMessage<EnableRemoteTrackResponse> | undefined, b: EnableRemoteTrackResponse | PlainMessage<EnableRemoteTrackResponse> | undefined): boolean;
323
+ };
324
+ /**
325
+ * Describes the message livekit.proto.EnableRemoteTrackResponse.
326
+ * Use `create(EnableRemoteTrackResponseSchema)` to create a new message.
327
+ */
328
+ export declare const EnableRemoteTrackResponseSchema: GenMessage<EnableRemoteTrackResponse>;
329
+ /**
330
+ * @generated from enum livekit.proto.TrackKind
331
+ */
332
+ export declare enum TrackKind {
333
+ /**
334
+ * @generated from enum value: KIND_UNKNOWN = 0;
335
+ */
336
+ KIND_UNKNOWN = 0,
337
+ /**
338
+ * @generated from enum value: KIND_AUDIO = 1;
339
+ */
340
+ KIND_AUDIO = 1,
341
+ /**
342
+ * @generated from enum value: KIND_VIDEO = 2;
343
+ */
344
+ KIND_VIDEO = 2
345
+ }
346
+ /**
347
+ * Describes the enum livekit.proto.TrackKind.
348
+ */
349
+ export declare const TrackKindSchema: GenEnum<TrackKind>;
350
+ /**
351
+ * @generated from enum livekit.proto.TrackSource
352
+ */
353
+ export declare enum TrackSource {
354
+ /**
355
+ * @generated from enum value: SOURCE_UNKNOWN = 0;
356
+ */
357
+ SOURCE_UNKNOWN = 0,
358
+ /**
359
+ * @generated from enum value: SOURCE_CAMERA = 1;
360
+ */
361
+ SOURCE_CAMERA = 1,
362
+ /**
363
+ * @generated from enum value: SOURCE_MICROPHONE = 2;
364
+ */
365
+ SOURCE_MICROPHONE = 2,
366
+ /**
367
+ * @generated from enum value: SOURCE_SCREENSHARE = 3;
368
+ */
369
+ SOURCE_SCREENSHARE = 3,
370
+ /**
371
+ * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4;
372
+ */
373
+ SOURCE_SCREENSHARE_AUDIO = 4
432
374
  }
375
+ /**
376
+ * Describes the enum livekit.proto.TrackSource.
377
+ */
378
+ export declare const TrackSourceSchema: GenEnum<TrackSource>;
379
+ /**
380
+ * @generated from enum livekit.proto.StreamState
381
+ */
382
+ export declare enum StreamState {
383
+ /**
384
+ * @generated from enum value: STATE_UNKNOWN = 0;
385
+ */
386
+ STATE_UNKNOWN = 0,
387
+ /**
388
+ * @generated from enum value: STATE_ACTIVE = 1;
389
+ */
390
+ STATE_ACTIVE = 1,
391
+ /**
392
+ * @generated from enum value: STATE_PAUSED = 2;
393
+ */
394
+ STATE_PAUSED = 2
395
+ }
396
+ /**
397
+ * Describes the enum livekit.proto.StreamState.
398
+ */
399
+ export declare const StreamStateSchema: GenEnum<StreamState>;
433
400
  //# sourceMappingURL=track_pb.d.ts.map