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