@livekit/rtc-node 0.10.4 → 0.11.1

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 +48 -2
  30. package/dist/participant.d.ts.map +1 -1
  31. package/dist/participant.js +143 -24
  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 +207 -47
  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
@@ -12,836 +12,502 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
16
- // @generated from file track.proto (package livekit.proto, syntax proto3)
15
+ // @generated by protoc-gen-es v2.2.0 with parameter "target=ts,import_extension=js"
16
+ // @generated from file track.proto (package livekit.proto, syntax proto2)
17
17
  /* eslint-disable */
18
- // @ts-nocheck
19
18
 
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";
19
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
20
+ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
21
+ import type { EncryptionType } from "./e2ee_pb.js";
22
+ import { file_e2ee } from "./e2ee_pb.js";
23
+ import type { FfiOwnedHandle } from "./handle_pb.js";
24
+ import { file_handle } from "./handle_pb.js";
25
+ import type { RtcStats } from "./stats_pb.js";
26
+ import { file_stats } from "./stats_pb.js";
27
+ import type { Message } from "@bufbuild/protobuf";
25
28
 
26
29
  /**
27
- * @generated from enum livekit.proto.TrackKind
30
+ * Describes the file track.proto.
28
31
  */
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
- ]);
32
+ export const file_track: GenFile = /*@__PURE__*/
33
+ fileDesc("Cgt0cmFjay5wcm90bxINbGl2ZWtpdC5wcm90byI+ChdDcmVhdGVWaWRlb1RyYWNrUmVxdWVzdBIMCgRuYW1lGAEgAigJEhUKDXNvdXJjZV9oYW5kbGUYAiACKAQiRAoYQ3JlYXRlVmlkZW9UcmFja1Jlc3BvbnNlEigKBXRyYWNrGAEgAigLMhkubGl2ZWtpdC5wcm90by5Pd25lZFRyYWNrIj4KF0NyZWF0ZUF1ZGlvVHJhY2tSZXF1ZXN0EgwKBG5hbWUYASACKAkSFQoNc291cmNlX2hhbmRsZRgCIAIoBCJEChhDcmVhdGVBdWRpb1RyYWNrUmVzcG9uc2USKAoFdHJhY2sYASACKAsyGS5saXZla2l0LnByb3RvLk93bmVkVHJhY2siJwoPR2V0U3RhdHNSZXF1ZXN0EhQKDHRyYWNrX2hhbmRsZRgBIAIoBCIkChBHZXRTdGF0c1Jlc3BvbnNlEhAKCGFzeW5jX2lkGAEgAigEIlsKEEdldFN0YXRzQ2FsbGJhY2sSEAoIYXN5bmNfaWQYASACKAQSDQoFZXJyb3IYAiABKAkSJgoFc3RhdHMYAyADKAsyFy5saXZla2l0LnByb3RvLlJ0Y1N0YXRzIgwKClRyYWNrRXZlbnQiowIKFFRyYWNrUHVibGljYXRpb25JbmZvEgsKA3NpZBgBIAIoCRIMCgRuYW1lGAIgAigJEiYKBGtpbmQYAyACKA4yGC5saXZla2l0LnByb3RvLlRyYWNrS2luZBIqCgZzb3VyY2UYBCACKA4yGi5saXZla2l0LnByb3RvLlRyYWNrU291cmNlEhMKC3NpbXVsY2FzdGVkGAUgAigIEg0KBXdpZHRoGAYgAigNEg4KBmhlaWdodBgHIAIoDRIRCgltaW1lX3R5cGUYCCACKAkSDQoFbXV0ZWQYCSACKAgSDgoGcmVtb3RlGAogAigIEjYKD2VuY3J5cHRpb25fdHlwZRgLIAIoDjIdLmxpdmVraXQucHJvdG8uRW5jcnlwdGlvblR5cGUieQoVT3duZWRUcmFja1B1YmxpY2F0aW9uEi0KBmhhbmRsZRgBIAIoCzIdLmxpdmVraXQucHJvdG8uRmZpT3duZWRIYW5kbGUSMQoEaW5mbxgCIAIoCzIjLmxpdmVraXQucHJvdG8uVHJhY2tQdWJsaWNhdGlvbkluZm8inwEKCVRyYWNrSW5mbxILCgNzaWQYASACKAkSDAoEbmFtZRgCIAIoCRImCgRraW5kGAMgAigOMhgubGl2ZWtpdC5wcm90by5UcmFja0tpbmQSMAoMc3RyZWFtX3N0YXRlGAQgAigOMhoubGl2ZWtpdC5wcm90by5TdHJlYW1TdGF0ZRINCgVtdXRlZBgFIAIoCBIOCgZyZW1vdGUYBiACKAgiYwoKT3duZWRUcmFjaxItCgZoYW5kbGUYASACKAsyHS5saXZla2l0LnByb3RvLkZmaU93bmVkSGFuZGxlEiYKBGluZm8YAiACKAsyGC5saXZla2l0LnByb3RvLlRyYWNrSW5mbyI7ChVMb2NhbFRyYWNrTXV0ZVJlcXVlc3QSFAoMdHJhY2tfaGFuZGxlGAEgAigEEgwKBG11dGUYAiACKAgiJwoWTG9jYWxUcmFja011dGVSZXNwb25zZRINCgVtdXRlZBgBIAIoCCJBChhFbmFibGVSZW1vdGVUcmFja1JlcXVlc3QSFAoMdHJhY2tfaGFuZGxlGAEgAigEEg8KB2VuYWJsZWQYAiACKAgiLAoZRW5hYmxlUmVtb3RlVHJhY2tSZXNwb25zZRIPCgdlbmFibGVkGAEgAigIKj0KCVRyYWNrS2luZBIQCgxLSU5EX1VOS05PV04QABIOCgpLSU5EX0FVRElPEAESDgoKS0lORF9WSURFTxACKoEBCgtUcmFja1NvdXJjZRISCg5TT1VSQ0VfVU5LTk9XThAAEhEKDVNPVVJDRV9DQU1FUkEQARIVChFTT1VSQ0VfTUlDUk9QSE9ORRACEhYKElNPVVJDRV9TQ1JFRU5TSEFSRRADEhwKGFNPVVJDRV9TQ1JFRU5TSEFSRV9BVURJTxAEKkQKC1N0cmVhbVN0YXRlEhEKDVNUQVRFX1VOS05PV04QABIQCgxTVEFURV9BQ1RJVkUQARIQCgxTVEFURV9QQVVTRUQQAkIQqgINTGl2ZUtpdC5Qcm90bw", [file_e2ee, file_handle, file_stats]);
115
34
 
116
35
  /**
117
36
  * Create a new VideoTrack from a VideoSource
118
37
  *
119
38
  * @generated from message livekit.proto.CreateVideoTrackRequest
120
39
  */
121
- export class CreateVideoTrackRequest extends Message<CreateVideoTrackRequest> {
40
+ export type CreateVideoTrackRequest = Message<"livekit.proto.CreateVideoTrackRequest"> & {
122
41
  /**
123
- * @generated from field: string name = 1;
42
+ * @generated from field: required string name = 1;
124
43
  */
125
- name = "";
44
+ name: string;
126
45
 
127
46
  /**
128
- * @generated from field: uint64 source_handle = 2;
47
+ * @generated from field: required uint64 source_handle = 2;
129
48
  */
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
- ]);
49
+ sourceHandle: bigint;
50
+ };
143
51
 
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
- }
52
+ /**
53
+ * Describes the message livekit.proto.CreateVideoTrackRequest.
54
+ * Use `create(CreateVideoTrackRequestSchema)` to create a new message.
55
+ */
56
+ export const CreateVideoTrackRequestSchema: GenMessage<CreateVideoTrackRequest> = /*@__PURE__*/
57
+ messageDesc(file_track, 0);
160
58
 
161
59
  /**
162
60
  * @generated from message livekit.proto.CreateVideoTrackResponse
163
61
  */
164
- export class CreateVideoTrackResponse extends Message<CreateVideoTrackResponse> {
62
+ export type CreateVideoTrackResponse = Message<"livekit.proto.CreateVideoTrackResponse"> & {
165
63
  /**
166
- * @generated from field: livekit.proto.OwnedTrack track = 1;
64
+ * @generated from field: required livekit.proto.OwnedTrack track = 1;
167
65
  */
168
66
  track?: OwnedTrack;
67
+ };
169
68
 
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
- }
69
+ /**
70
+ * Describes the message livekit.proto.CreateVideoTrackResponse.
71
+ * Use `create(CreateVideoTrackResponseSchema)` to create a new message.
72
+ */
73
+ export const CreateVideoTrackResponseSchema: GenMessage<CreateVideoTrackResponse> = /*@__PURE__*/
74
+ messageDesc(file_track, 1);
197
75
 
198
76
  /**
199
77
  * Create a new AudioTrack from a AudioSource
200
78
  *
201
79
  * @generated from message livekit.proto.CreateAudioTrackRequest
202
80
  */
203
- export class CreateAudioTrackRequest extends Message<CreateAudioTrackRequest> {
81
+ export type CreateAudioTrackRequest = Message<"livekit.proto.CreateAudioTrackRequest"> & {
204
82
  /**
205
- * @generated from field: string name = 1;
83
+ * @generated from field: required string name = 1;
206
84
  */
207
- name = "";
85
+ name: string;
208
86
 
209
87
  /**
210
- * @generated from field: uint64 source_handle = 2;
88
+ * @generated from field: required uint64 source_handle = 2;
211
89
  */
212
- sourceHandle = protoInt64.zero;
213
-
214
- constructor(data?: PartialMessage<CreateAudioTrackRequest>) {
215
- super();
216
- proto3.util.initPartial(data, this);
217
- }
90
+ sourceHandle: bigint;
91
+ };
218
92
 
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
- }
93
+ /**
94
+ * Describes the message livekit.proto.CreateAudioTrackRequest.
95
+ * Use `create(CreateAudioTrackRequestSchema)` to create a new message.
96
+ */
97
+ export const CreateAudioTrackRequestSchema: GenMessage<CreateAudioTrackRequest> = /*@__PURE__*/
98
+ messageDesc(file_track, 2);
242
99
 
243
100
  /**
244
101
  * @generated from message livekit.proto.CreateAudioTrackResponse
245
102
  */
246
- export class CreateAudioTrackResponse extends Message<CreateAudioTrackResponse> {
103
+ export type CreateAudioTrackResponse = Message<"livekit.proto.CreateAudioTrackResponse"> & {
247
104
  /**
248
- * @generated from field: livekit.proto.OwnedTrack track = 1;
105
+ * @generated from field: required livekit.proto.OwnedTrack track = 1;
249
106
  */
250
107
  track?: OwnedTrack;
108
+ };
251
109
 
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
- }
110
+ /**
111
+ * Describes the message livekit.proto.CreateAudioTrackResponse.
112
+ * Use `create(CreateAudioTrackResponseSchema)` to create a new message.
113
+ */
114
+ export const CreateAudioTrackResponseSchema: GenMessage<CreateAudioTrackResponse> = /*@__PURE__*/
115
+ messageDesc(file_track, 3);
279
116
 
280
117
  /**
281
118
  * @generated from message livekit.proto.GetStatsRequest
282
119
  */
283
- export class GetStatsRequest extends Message<GetStatsRequest> {
120
+ export type GetStatsRequest = Message<"livekit.proto.GetStatsRequest"> & {
284
121
  /**
285
- * @generated from field: uint64 track_handle = 1;
122
+ * @generated from field: required uint64 track_handle = 1;
286
123
  */
287
- trackHandle = protoInt64.zero;
124
+ trackHandle: bigint;
125
+ };
288
126
 
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
- }
127
+ /**
128
+ * Describes the message livekit.proto.GetStatsRequest.
129
+ * Use `create(GetStatsRequestSchema)` to create a new message.
130
+ */
131
+ export const GetStatsRequestSchema: GenMessage<GetStatsRequest> = /*@__PURE__*/
132
+ messageDesc(file_track, 4);
316
133
 
317
134
  /**
318
135
  * @generated from message livekit.proto.GetStatsResponse
319
136
  */
320
- export class GetStatsResponse extends Message<GetStatsResponse> {
137
+ export type GetStatsResponse = Message<"livekit.proto.GetStatsResponse"> & {
321
138
  /**
322
- * @generated from field: uint64 async_id = 1;
139
+ * @generated from field: required uint64 async_id = 1;
323
140
  */
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
- }
141
+ asyncId: bigint;
142
+ };
340
143
 
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
- }
144
+ /**
145
+ * Describes the message livekit.proto.GetStatsResponse.
146
+ * Use `create(GetStatsResponseSchema)` to create a new message.
147
+ */
148
+ export const GetStatsResponseSchema: GenMessage<GetStatsResponse> = /*@__PURE__*/
149
+ messageDesc(file_track, 5);
353
150
 
354
151
  /**
355
152
  * @generated from message livekit.proto.GetStatsCallback
356
153
  */
357
- export class GetStatsCallback extends Message<GetStatsCallback> {
154
+ export type GetStatsCallback = Message<"livekit.proto.GetStatsCallback"> & {
358
155
  /**
359
- * @generated from field: uint64 async_id = 1;
156
+ * @generated from field: required uint64 async_id = 1;
360
157
  */
361
- asyncId = protoInt64.zero;
158
+ asyncId: bigint;
362
159
 
363
160
  /**
364
161
  * @generated from field: optional string error = 2;
365
162
  */
366
- error?: string;
163
+ error: string;
367
164
 
368
165
  /**
369
166
  * @generated from field: repeated livekit.proto.RtcStats stats = 3;
370
167
  */
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
- }
168
+ stats: RtcStats[];
169
+ };
389
170
 
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
- }
171
+ /**
172
+ * Describes the message livekit.proto.GetStatsCallback.
173
+ * Use `create(GetStatsCallbackSchema)` to create a new message.
174
+ */
175
+ export const GetStatsCallbackSchema: GenMessage<GetStatsCallback> = /*@__PURE__*/
176
+ messageDesc(file_track, 6);
402
177
 
403
178
  /**
404
179
  * @generated from message livekit.proto.TrackEvent
405
180
  */
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
- }
181
+ export type TrackEvent = Message<"livekit.proto.TrackEvent"> & {
182
+ };
420
183
 
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
- }
184
+ /**
185
+ * Describes the message livekit.proto.TrackEvent.
186
+ * Use `create(TrackEventSchema)` to create a new message.
187
+ */
188
+ export const TrackEventSchema: GenMessage<TrackEvent> = /*@__PURE__*/
189
+ messageDesc(file_track, 7);
433
190
 
434
191
  /**
435
192
  * @generated from message livekit.proto.TrackPublicationInfo
436
193
  */
437
- export class TrackPublicationInfo extends Message<TrackPublicationInfo> {
194
+ export type TrackPublicationInfo = Message<"livekit.proto.TrackPublicationInfo"> & {
438
195
  /**
439
- * @generated from field: string sid = 1;
196
+ * @generated from field: required string sid = 1;
440
197
  */
441
- sid = "";
198
+ sid: string;
442
199
 
443
200
  /**
444
- * @generated from field: string name = 2;
201
+ * @generated from field: required string name = 2;
445
202
  */
446
- name = "";
203
+ name: string;
447
204
 
448
205
  /**
449
- * @generated from field: livekit.proto.TrackKind kind = 3;
206
+ * @generated from field: required livekit.proto.TrackKind kind = 3;
450
207
  */
451
- kind = TrackKind.KIND_UNKNOWN;
208
+ kind: TrackKind;
452
209
 
453
210
  /**
454
- * @generated from field: livekit.proto.TrackSource source = 4;
211
+ * @generated from field: required livekit.proto.TrackSource source = 4;
455
212
  */
456
- source = TrackSource.SOURCE_UNKNOWN;
213
+ source: TrackSource;
457
214
 
458
215
  /**
459
- * @generated from field: bool simulcasted = 5;
216
+ * @generated from field: required bool simulcasted = 5;
460
217
  */
461
- simulcasted = false;
218
+ simulcasted: boolean;
462
219
 
463
220
  /**
464
- * @generated from field: uint32 width = 6;
221
+ * @generated from field: required uint32 width = 6;
465
222
  */
466
- width = 0;
223
+ width: number;
467
224
 
468
225
  /**
469
- * @generated from field: uint32 height = 7;
226
+ * @generated from field: required uint32 height = 7;
470
227
  */
471
- height = 0;
228
+ height: number;
472
229
 
473
230
  /**
474
- * @generated from field: string mime_type = 8;
231
+ * @generated from field: required string mime_type = 8;
475
232
  */
476
- mimeType = "";
233
+ mimeType: string;
477
234
 
478
235
  /**
479
- * @generated from field: bool muted = 9;
236
+ * @generated from field: required bool muted = 9;
480
237
  */
481
- muted = false;
238
+ muted: boolean;
482
239
 
483
240
  /**
484
- * @generated from field: bool remote = 10;
241
+ * @generated from field: required bool remote = 10;
485
242
  */
486
- remote = false;
243
+ remote: boolean;
487
244
 
488
245
  /**
489
- * @generated from field: livekit.proto.EncryptionType encryption_type = 11;
246
+ * @generated from field: required livekit.proto.EncryptionType encryption_type = 11;
490
247
  */
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
- }
248
+ encryptionType: EncryptionType;
249
+ };
517
250
 
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
- }
251
+ /**
252
+ * Describes the message livekit.proto.TrackPublicationInfo.
253
+ * Use `create(TrackPublicationInfoSchema)` to create a new message.
254
+ */
255
+ export const TrackPublicationInfoSchema: GenMessage<TrackPublicationInfo> = /*@__PURE__*/
256
+ messageDesc(file_track, 8);
530
257
 
531
258
  /**
532
259
  * @generated from message livekit.proto.OwnedTrackPublication
533
260
  */
534
- export class OwnedTrackPublication extends Message<OwnedTrackPublication> {
261
+ export type OwnedTrackPublication = Message<"livekit.proto.OwnedTrackPublication"> & {
535
262
  /**
536
- * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
263
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
537
264
  */
538
265
  handle?: FfiOwnedHandle;
539
266
 
540
267
  /**
541
- * @generated from field: livekit.proto.TrackPublicationInfo info = 2;
268
+ * @generated from field: required livekit.proto.TrackPublicationInfo info = 2;
542
269
  */
543
270
  info?: TrackPublicationInfo;
271
+ };
544
272
 
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
- }
273
+ /**
274
+ * Describes the message livekit.proto.OwnedTrackPublication.
275
+ * Use `create(OwnedTrackPublicationSchema)` to create a new message.
276
+ */
277
+ export const OwnedTrackPublicationSchema: GenMessage<OwnedTrackPublication> = /*@__PURE__*/
278
+ messageDesc(file_track, 9);
573
279
 
574
280
  /**
575
281
  * @generated from message livekit.proto.TrackInfo
576
282
  */
577
- export class TrackInfo extends Message<TrackInfo> {
283
+ export type TrackInfo = Message<"livekit.proto.TrackInfo"> & {
578
284
  /**
579
- * @generated from field: string sid = 1;
285
+ * @generated from field: required string sid = 1;
580
286
  */
581
- sid = "";
287
+ sid: string;
582
288
 
583
289
  /**
584
- * @generated from field: string name = 2;
290
+ * @generated from field: required string name = 2;
585
291
  */
586
- name = "";
292
+ name: string;
587
293
 
588
294
  /**
589
- * @generated from field: livekit.proto.TrackKind kind = 3;
295
+ * @generated from field: required livekit.proto.TrackKind kind = 3;
590
296
  */
591
- kind = TrackKind.KIND_UNKNOWN;
297
+ kind: TrackKind;
592
298
 
593
299
  /**
594
- * @generated from field: livekit.proto.StreamState stream_state = 4;
300
+ * @generated from field: required livekit.proto.StreamState stream_state = 4;
595
301
  */
596
- streamState = StreamState.STATE_UNKNOWN;
302
+ streamState: StreamState;
597
303
 
598
304
  /**
599
- * @generated from field: bool muted = 5;
305
+ * @generated from field: required bool muted = 5;
600
306
  */
601
- muted = false;
307
+ muted: boolean;
602
308
 
603
309
  /**
604
- * @generated from field: bool remote = 6;
310
+ * @generated from field: required bool remote = 6;
605
311
  */
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
- }
312
+ remote: boolean;
313
+ };
627
314
 
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
- }
315
+ /**
316
+ * Describes the message livekit.proto.TrackInfo.
317
+ * Use `create(TrackInfoSchema)` to create a new message.
318
+ */
319
+ export const TrackInfoSchema: GenMessage<TrackInfo> = /*@__PURE__*/
320
+ messageDesc(file_track, 10);
640
321
 
641
322
  /**
642
323
  * @generated from message livekit.proto.OwnedTrack
643
324
  */
644
- export class OwnedTrack extends Message<OwnedTrack> {
325
+ export type OwnedTrack = Message<"livekit.proto.OwnedTrack"> & {
645
326
  /**
646
- * @generated from field: livekit.proto.FfiOwnedHandle handle = 1;
327
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
647
328
  */
648
329
  handle?: FfiOwnedHandle;
649
330
 
650
331
  /**
651
- * @generated from field: livekit.proto.TrackInfo info = 2;
332
+ * @generated from field: required livekit.proto.TrackInfo info = 2;
652
333
  */
653
334
  info?: TrackInfo;
335
+ };
654
336
 
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
- }
337
+ /**
338
+ * Describes the message livekit.proto.OwnedTrack.
339
+ * Use `create(OwnedTrackSchema)` to create a new message.
340
+ */
341
+ export const OwnedTrackSchema: GenMessage<OwnedTrack> = /*@__PURE__*/
342
+ messageDesc(file_track, 11);
683
343
 
684
344
  /**
685
345
  * Mute/UnMute a track
686
346
  *
687
347
  * @generated from message livekit.proto.LocalTrackMuteRequest
688
348
  */
689
- export class LocalTrackMuteRequest extends Message<LocalTrackMuteRequest> {
349
+ export type LocalTrackMuteRequest = Message<"livekit.proto.LocalTrackMuteRequest"> & {
690
350
  /**
691
- * @generated from field: uint64 track_handle = 1;
351
+ * @generated from field: required uint64 track_handle = 1;
692
352
  */
693
- trackHandle = protoInt64.zero;
353
+ trackHandle: bigint;
694
354
 
695
355
  /**
696
- * @generated from field: bool mute = 2;
356
+ * @generated from field: required bool mute = 2;
697
357
  */
698
- mute = false;
699
-
700
- constructor(data?: PartialMessage<LocalTrackMuteRequest>) {
701
- super();
702
- proto3.util.initPartial(data, this);
703
- }
704
-
705
- static readonly runtime: typeof proto3 = proto3;
706
- static readonly typeName = "livekit.proto.LocalTrackMuteRequest";
707
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
708
- { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
709
- { no: 2, name: "mute", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
710
- ]);
711
-
712
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackMuteRequest {
713
- return new LocalTrackMuteRequest().fromBinary(bytes, options);
714
- }
358
+ mute: boolean;
359
+ };
715
360
 
716
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackMuteRequest {
717
- return new LocalTrackMuteRequest().fromJson(jsonValue, options);
718
- }
719
-
720
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackMuteRequest {
721
- return new LocalTrackMuteRequest().fromJsonString(jsonString, options);
722
- }
723
-
724
- static equals(a: LocalTrackMuteRequest | PlainMessage<LocalTrackMuteRequest> | undefined, b: LocalTrackMuteRequest | PlainMessage<LocalTrackMuteRequest> | undefined): boolean {
725
- return proto3.util.equals(LocalTrackMuteRequest, a, b);
726
- }
727
- }
361
+ /**
362
+ * Describes the message livekit.proto.LocalTrackMuteRequest.
363
+ * Use `create(LocalTrackMuteRequestSchema)` to create a new message.
364
+ */
365
+ export const LocalTrackMuteRequestSchema: GenMessage<LocalTrackMuteRequest> = /*@__PURE__*/
366
+ messageDesc(file_track, 12);
728
367
 
729
368
  /**
730
369
  * @generated from message livekit.proto.LocalTrackMuteResponse
731
370
  */
732
- export class LocalTrackMuteResponse extends Message<LocalTrackMuteResponse> {
371
+ export type LocalTrackMuteResponse = Message<"livekit.proto.LocalTrackMuteResponse"> & {
733
372
  /**
734
- * @generated from field: bool muted = 1;
373
+ * @generated from field: required bool muted = 1;
735
374
  */
736
- muted = false;
737
-
738
- constructor(data?: PartialMessage<LocalTrackMuteResponse>) {
739
- super();
740
- proto3.util.initPartial(data, this);
741
- }
742
-
743
- static readonly runtime: typeof proto3 = proto3;
744
- static readonly typeName = "livekit.proto.LocalTrackMuteResponse";
745
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
746
- { no: 1, name: "muted", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
747
- ]);
748
-
749
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LocalTrackMuteResponse {
750
- return new LocalTrackMuteResponse().fromBinary(bytes, options);
751
- }
375
+ muted: boolean;
376
+ };
752
377
 
753
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LocalTrackMuteResponse {
754
- return new LocalTrackMuteResponse().fromJson(jsonValue, options);
755
- }
756
-
757
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LocalTrackMuteResponse {
758
- return new LocalTrackMuteResponse().fromJsonString(jsonString, options);
759
- }
760
-
761
- static equals(a: LocalTrackMuteResponse | PlainMessage<LocalTrackMuteResponse> | undefined, b: LocalTrackMuteResponse | PlainMessage<LocalTrackMuteResponse> | undefined): boolean {
762
- return proto3.util.equals(LocalTrackMuteResponse, a, b);
763
- }
764
- }
378
+ /**
379
+ * Describes the message livekit.proto.LocalTrackMuteResponse.
380
+ * Use `create(LocalTrackMuteResponseSchema)` to create a new message.
381
+ */
382
+ export const LocalTrackMuteResponseSchema: GenMessage<LocalTrackMuteResponse> = /*@__PURE__*/
383
+ messageDesc(file_track, 13);
765
384
 
766
385
  /**
767
386
  * Enable/Disable a remote track
768
387
  *
769
388
  * @generated from message livekit.proto.EnableRemoteTrackRequest
770
389
  */
771
- export class EnableRemoteTrackRequest extends Message<EnableRemoteTrackRequest> {
390
+ export type EnableRemoteTrackRequest = Message<"livekit.proto.EnableRemoteTrackRequest"> & {
772
391
  /**
773
- * @generated from field: uint64 track_handle = 1;
392
+ * @generated from field: required uint64 track_handle = 1;
774
393
  */
775
- trackHandle = protoInt64.zero;
394
+ trackHandle: bigint;
776
395
 
777
396
  /**
778
- * @generated from field: bool enabled = 2;
397
+ * @generated from field: required bool enabled = 2;
779
398
  */
780
- enabled = false;
399
+ enabled: boolean;
400
+ };
781
401
 
782
- constructor(data?: PartialMessage<EnableRemoteTrackRequest>) {
783
- super();
784
- proto3.util.initPartial(data, this);
785
- }
402
+ /**
403
+ * Describes the message livekit.proto.EnableRemoteTrackRequest.
404
+ * Use `create(EnableRemoteTrackRequestSchema)` to create a new message.
405
+ */
406
+ export const EnableRemoteTrackRequestSchema: GenMessage<EnableRemoteTrackRequest> = /*@__PURE__*/
407
+ messageDesc(file_track, 14);
786
408
 
787
- static readonly runtime: typeof proto3 = proto3;
788
- static readonly typeName = "livekit.proto.EnableRemoteTrackRequest";
789
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
790
- { no: 1, name: "track_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
791
- { no: 2, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
792
- ]);
409
+ /**
410
+ * @generated from message livekit.proto.EnableRemoteTrackResponse
411
+ */
412
+ export type EnableRemoteTrackResponse = Message<"livekit.proto.EnableRemoteTrackResponse"> & {
413
+ /**
414
+ * @generated from field: required bool enabled = 1;
415
+ */
416
+ enabled: boolean;
417
+ };
793
418
 
794
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackRequest {
795
- return new EnableRemoteTrackRequest().fromBinary(bytes, options);
796
- }
419
+ /**
420
+ * Describes the message livekit.proto.EnableRemoteTrackResponse.
421
+ * Use `create(EnableRemoteTrackResponseSchema)` to create a new message.
422
+ */
423
+ export const EnableRemoteTrackResponseSchema: GenMessage<EnableRemoteTrackResponse> = /*@__PURE__*/
424
+ messageDesc(file_track, 15);
797
425
 
798
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackRequest {
799
- return new EnableRemoteTrackRequest().fromJson(jsonValue, options);
800
- }
426
+ /**
427
+ * @generated from enum livekit.proto.TrackKind
428
+ */
429
+ export enum TrackKind {
430
+ /**
431
+ * @generated from enum value: KIND_UNKNOWN = 0;
432
+ */
433
+ KIND_UNKNOWN = 0,
801
434
 
802
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackRequest {
803
- return new EnableRemoteTrackRequest().fromJsonString(jsonString, options);
804
- }
435
+ /**
436
+ * @generated from enum value: KIND_AUDIO = 1;
437
+ */
438
+ KIND_AUDIO = 1,
805
439
 
806
- static equals(a: EnableRemoteTrackRequest | PlainMessage<EnableRemoteTrackRequest> | undefined, b: EnableRemoteTrackRequest | PlainMessage<EnableRemoteTrackRequest> | undefined): boolean {
807
- return proto3.util.equals(EnableRemoteTrackRequest, a, b);
808
- }
440
+ /**
441
+ * @generated from enum value: KIND_VIDEO = 2;
442
+ */
443
+ KIND_VIDEO = 2,
809
444
  }
810
445
 
811
446
  /**
812
- * @generated from message livekit.proto.EnableRemoteTrackResponse
447
+ * Describes the enum livekit.proto.TrackKind.
448
+ */
449
+ export const TrackKindSchema: GenEnum<TrackKind> = /*@__PURE__*/
450
+ enumDesc(file_track, 0);
451
+
452
+ /**
453
+ * @generated from enum livekit.proto.TrackSource
813
454
  */
814
- export class EnableRemoteTrackResponse extends Message<EnableRemoteTrackResponse> {
455
+ export enum TrackSource {
815
456
  /**
816
- * @generated from field: bool enabled = 1;
457
+ * @generated from enum value: SOURCE_UNKNOWN = 0;
817
458
  */
818
- enabled = false;
459
+ SOURCE_UNKNOWN = 0,
460
+
461
+ /**
462
+ * @generated from enum value: SOURCE_CAMERA = 1;
463
+ */
464
+ SOURCE_CAMERA = 1,
465
+
466
+ /**
467
+ * @generated from enum value: SOURCE_MICROPHONE = 2;
468
+ */
469
+ SOURCE_MICROPHONE = 2,
819
470
 
820
- constructor(data?: PartialMessage<EnableRemoteTrackResponse>) {
821
- super();
822
- proto3.util.initPartial(data, this);
823
- }
471
+ /**
472
+ * @generated from enum value: SOURCE_SCREENSHARE = 3;
473
+ */
474
+ SOURCE_SCREENSHARE = 3,
824
475
 
825
- static readonly runtime: typeof proto3 = proto3;
826
- static readonly typeName = "livekit.proto.EnableRemoteTrackResponse";
827
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
828
- { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
829
- ]);
476
+ /**
477
+ * @generated from enum value: SOURCE_SCREENSHARE_AUDIO = 4;
478
+ */
479
+ SOURCE_SCREENSHARE_AUDIO = 4,
480
+ }
830
481
 
831
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnableRemoteTrackResponse {
832
- return new EnableRemoteTrackResponse().fromBinary(bytes, options);
833
- }
482
+ /**
483
+ * Describes the enum livekit.proto.TrackSource.
484
+ */
485
+ export const TrackSourceSchema: GenEnum<TrackSource> = /*@__PURE__*/
486
+ enumDesc(file_track, 1);
834
487
 
835
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnableRemoteTrackResponse {
836
- return new EnableRemoteTrackResponse().fromJson(jsonValue, options);
837
- }
488
+ /**
489
+ * @generated from enum livekit.proto.StreamState
490
+ */
491
+ export enum StreamState {
492
+ /**
493
+ * @generated from enum value: STATE_UNKNOWN = 0;
494
+ */
495
+ STATE_UNKNOWN = 0,
838
496
 
839
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnableRemoteTrackResponse {
840
- return new EnableRemoteTrackResponse().fromJsonString(jsonString, options);
841
- }
497
+ /**
498
+ * @generated from enum value: STATE_ACTIVE = 1;
499
+ */
500
+ STATE_ACTIVE = 1,
842
501
 
843
- static equals(a: EnableRemoteTrackResponse | PlainMessage<EnableRemoteTrackResponse> | undefined, b: EnableRemoteTrackResponse | PlainMessage<EnableRemoteTrackResponse> | undefined): boolean {
844
- return proto3.util.equals(EnableRemoteTrackResponse, a, b);
845
- }
502
+ /**
503
+ * @generated from enum value: STATE_PAUSED = 2;
504
+ */
505
+ STATE_PAUSED = 2,
846
506
  }
847
507
 
508
+ /**
509
+ * Describes the enum livekit.proto.StreamState.
510
+ */
511
+ export const StreamStateSchema: GenEnum<StreamState> = /*@__PURE__*/
512
+ enumDesc(file_track, 2);
513
+