@stream-io/video-client 0.0.1-alpha.7

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 (157) hide show
  1. package/LICENSE +219 -0
  2. package/README.md +14 -0
  3. package/dist/index.d.ts +23 -0
  4. package/dist/index.js +14663 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/src/Batcher.d.ts +12 -0
  7. package/dist/src/CallDropScheduler.d.ts +44 -0
  8. package/dist/src/StreamSfuClient.d.ts +25 -0
  9. package/dist/src/StreamVideoClient.d.ts +145 -0
  10. package/dist/src/__tests__/StreamVideoClient.test.d.ts +1 -0
  11. package/dist/src/config/defaultConfigs.d.ts +2 -0
  12. package/dist/src/config/types.d.ts +29 -0
  13. package/dist/src/coordinator/StreamCoordinatorClient.d.ts +19 -0
  14. package/dist/src/coordinator/connection/base64.d.ts +2 -0
  15. package/dist/src/coordinator/connection/client.d.ts +174 -0
  16. package/dist/src/coordinator/connection/connection.d.ts +139 -0
  17. package/dist/src/coordinator/connection/connection_fallback.d.ts +38 -0
  18. package/dist/src/coordinator/connection/errors.d.ts +16 -0
  19. package/dist/src/coordinator/connection/events.d.ts +7 -0
  20. package/dist/src/coordinator/connection/insights.d.ts +58 -0
  21. package/dist/src/coordinator/connection/signing.d.ts +30 -0
  22. package/dist/src/coordinator/connection/token_manager.d.ts +39 -0
  23. package/dist/src/coordinator/connection/types.d.ts +96 -0
  24. package/dist/src/coordinator/connection/utils.d.ts +25 -0
  25. package/dist/src/devices.d.ts +79 -0
  26. package/dist/src/events/call.d.ts +26 -0
  27. package/dist/src/events/internal.d.ts +8 -0
  28. package/dist/src/events/participant.d.ts +21 -0
  29. package/dist/src/events/speaker.d.ts +10 -0
  30. package/dist/src/gen/coordinator/index.d.ts +1664 -0
  31. package/dist/src/gen/google/protobuf/descriptor.d.ts +1650 -0
  32. package/dist/src/gen/google/protobuf/duration.d.ts +113 -0
  33. package/dist/src/gen/google/protobuf/struct.d.ts +184 -0
  34. package/dist/src/gen/google/protobuf/timestamp.d.ts +158 -0
  35. package/dist/src/gen/video/coordinator/broadcast_v1/broadcast.d.ts +66 -0
  36. package/dist/src/gen/video/coordinator/call_v1/call.d.ts +254 -0
  37. package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.d.ts +351 -0
  38. package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.d.ts +1488 -0
  39. package/dist/src/gen/video/coordinator/client_v1_rpc/envelopes.d.ts +143 -0
  40. package/dist/src/gen/video/coordinator/client_v1_rpc/websocket.d.ts +292 -0
  41. package/dist/src/gen/video/coordinator/edge_v1/edge.d.ts +183 -0
  42. package/dist/src/gen/video/coordinator/event_v1/event.d.ts +411 -0
  43. package/dist/src/gen/video/coordinator/geofence_v1/geofence.d.ts +63 -0
  44. package/dist/src/gen/video/coordinator/member_v1/member.d.ts +59 -0
  45. package/dist/src/gen/video/coordinator/participant_v1/participant.d.ts +103 -0
  46. package/dist/src/gen/video/coordinator/push_v1/push.d.ts +240 -0
  47. package/dist/src/gen/video/coordinator/stat_v1/stat.d.ts +308 -0
  48. package/dist/src/gen/video/coordinator/user_v1/user.d.ts +112 -0
  49. package/dist/src/gen/video/coordinator/utils_v1/utils.d.ts +47 -0
  50. package/dist/src/gen/video/sfu/event/events.d.ts +736 -0
  51. package/dist/src/gen/video/sfu/models/models.d.ts +460 -0
  52. package/dist/src/gen/video/sfu/signal_rpc/signal.client.d.ts +89 -0
  53. package/dist/src/gen/video/sfu/signal_rpc/signal.d.ts +320 -0
  54. package/dist/src/helpers/browsers.d.ts +8 -0
  55. package/dist/src/helpers/sound-detector.d.ts +34 -0
  56. package/dist/src/rpc/createClient.d.ts +10 -0
  57. package/dist/src/rpc/index.d.ts +2 -0
  58. package/dist/src/rpc/latency.d.ts +9 -0
  59. package/dist/src/rtc/Call.d.ts +180 -0
  60. package/dist/src/rtc/CallMetadata.d.ts +9 -0
  61. package/dist/src/rtc/Dispatcher.d.ts +9 -0
  62. package/dist/src/rtc/IceTrickleBuffer.d.ts +11 -0
  63. package/dist/src/rtc/callEventHandlers.d.ts +5 -0
  64. package/dist/src/rtc/codecs.d.ts +2 -0
  65. package/dist/src/rtc/helpers/iceCandidate.d.ts +2 -0
  66. package/dist/src/rtc/helpers/tracks.d.ts +3 -0
  67. package/dist/src/rtc/publisher.d.ts +53 -0
  68. package/dist/src/rtc/signal.d.ts +5 -0
  69. package/dist/src/rtc/subscriber.d.ts +7 -0
  70. package/dist/src/rtc/types.d.ts +84 -0
  71. package/dist/src/rtc/videoLayers.d.ts +17 -0
  72. package/dist/src/stats/coordinator-stats-reporter.d.ts +10 -0
  73. package/dist/src/stats/state-store-stats-reporter.d.ts +57 -0
  74. package/dist/src/stats/types.d.ts +42 -0
  75. package/dist/src/store/index.d.ts +2 -0
  76. package/dist/src/store/rxUtils.d.ts +18 -0
  77. package/dist/src/store/stateStore.d.ts +182 -0
  78. package/generate-openapi.sh +32 -0
  79. package/index.ts +30 -0
  80. package/openapitools.json +7 -0
  81. package/package.json +54 -0
  82. package/rollup.config.mjs +48 -0
  83. package/src/Batcher.ts +43 -0
  84. package/src/CallDropScheduler.ts +192 -0
  85. package/src/StreamSfuClient.ts +185 -0
  86. package/src/StreamVideoClient.ts +487 -0
  87. package/src/__tests__/StreamVideoClient.test.ts +83 -0
  88. package/src/config/defaultConfigs.ts +15 -0
  89. package/src/config/types.ts +30 -0
  90. package/src/coordinator/StreamCoordinatorClient.ts +111 -0
  91. package/src/coordinator/connection/base64.ts +80 -0
  92. package/src/coordinator/connection/client.ts +815 -0
  93. package/src/coordinator/connection/connection.ts +750 -0
  94. package/src/coordinator/connection/connection_fallback.ts +239 -0
  95. package/src/coordinator/connection/errors.ts +70 -0
  96. package/src/coordinator/connection/events.ts +10 -0
  97. package/src/coordinator/connection/insights.ts +88 -0
  98. package/src/coordinator/connection/signing.ts +104 -0
  99. package/src/coordinator/connection/token_manager.ts +160 -0
  100. package/src/coordinator/connection/types.ts +120 -0
  101. package/src/coordinator/connection/utils.ts +148 -0
  102. package/src/devices.ts +266 -0
  103. package/src/events/call.ts +166 -0
  104. package/src/events/internal.ts +47 -0
  105. package/src/events/participant.ts +97 -0
  106. package/src/events/speaker.ts +62 -0
  107. package/src/gen/coordinator/index.ts +1653 -0
  108. package/src/gen/google/protobuf/descriptor.ts +3466 -0
  109. package/src/gen/google/protobuf/duration.ts +232 -0
  110. package/src/gen/google/protobuf/struct.ts +481 -0
  111. package/src/gen/google/protobuf/timestamp.ts +291 -0
  112. package/src/gen/video/coordinator/broadcast_v1/broadcast.ts +154 -0
  113. package/src/gen/video/coordinator/call_v1/call.ts +651 -0
  114. package/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.ts +463 -0
  115. package/src/gen/video/coordinator/client_v1_rpc/client_rpc.ts +3819 -0
  116. package/src/gen/video/coordinator/client_v1_rpc/envelopes.ts +424 -0
  117. package/src/gen/video/coordinator/client_v1_rpc/websocket.ts +719 -0
  118. package/src/gen/video/coordinator/edge_v1/edge.ts +532 -0
  119. package/src/gen/video/coordinator/event_v1/event.ts +1171 -0
  120. package/src/gen/video/coordinator/geofence_v1/geofence.ts +128 -0
  121. package/src/gen/video/coordinator/member_v1/member.ts +138 -0
  122. package/src/gen/video/coordinator/participant_v1/participant.ts +261 -0
  123. package/src/gen/video/coordinator/push_v1/push.ts +651 -0
  124. package/src/gen/video/coordinator/stat_v1/stat.ts +656 -0
  125. package/src/gen/video/coordinator/user_v1/user.ts +277 -0
  126. package/src/gen/video/coordinator/utils_v1/utils.ts +98 -0
  127. package/src/gen/video/sfu/event/events.ts +1962 -0
  128. package/src/gen/video/sfu/models/models.ts +1062 -0
  129. package/src/gen/video/sfu/signal_rpc/signal.client.ts +108 -0
  130. package/src/gen/video/sfu/signal_rpc/signal.ts +906 -0
  131. package/src/helpers/browsers.ts +13 -0
  132. package/src/helpers/sound-detector.ts +85 -0
  133. package/src/rpc/createClient.ts +50 -0
  134. package/src/rpc/index.ts +2 -0
  135. package/src/rpc/latency.ts +43 -0
  136. package/src/rtc/Call.ts +585 -0
  137. package/src/rtc/CallMetadata.ts +24 -0
  138. package/src/rtc/Dispatcher.ts +46 -0
  139. package/src/rtc/IceTrickleBuffer.ts +21 -0
  140. package/src/rtc/callEventHandlers.ts +37 -0
  141. package/src/rtc/codecs.ts +61 -0
  142. package/src/rtc/helpers/iceCandidate.ts +16 -0
  143. package/src/rtc/helpers/tracks.ts +18 -0
  144. package/src/rtc/publisher.ts +305 -0
  145. package/src/rtc/signal.ts +34 -0
  146. package/src/rtc/subscriber.ts +85 -0
  147. package/src/rtc/types.ts +105 -0
  148. package/src/rtc/videoLayers.ts +103 -0
  149. package/src/stats/coordinator-stats-reporter.ts +167 -0
  150. package/src/stats/state-store-stats-reporter.ts +364 -0
  151. package/src/stats/types.ts +46 -0
  152. package/src/store/index.ts +2 -0
  153. package/src/store/rxUtils.ts +42 -0
  154. package/src/store/stateStore.ts +341 -0
  155. package/tsconfig.json +25 -0
  156. package/typedoc.json +11 -0
  157. package/vite.config.ts +11 -0
@@ -0,0 +1,460 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ import { Struct } from "../../../google/protobuf/struct";
8
+ import { Timestamp } from "../../../google/protobuf/timestamp";
9
+ /**
10
+ * @generated from protobuf message stream.video.sfu.models.CallState
11
+ */
12
+ export interface CallState {
13
+ /**
14
+ * @generated from protobuf field: repeated stream.video.sfu.models.Participant participants = 1;
15
+ */
16
+ participants: Participant[];
17
+ }
18
+ /**
19
+ * those who are online in the call
20
+ *
21
+ * @generated from protobuf message stream.video.sfu.models.Participant
22
+ */
23
+ export interface Participant {
24
+ /**
25
+ * @generated from protobuf field: string user_id = 1;
26
+ */
27
+ userId: string;
28
+ /**
29
+ * @generated from protobuf field: string session_id = 2;
30
+ */
31
+ sessionId: string;
32
+ /**
33
+ * map of track id to track type
34
+ *
35
+ * @generated from protobuf field: repeated stream.video.sfu.models.TrackType published_tracks = 3;
36
+ */
37
+ publishedTracks: TrackType[];
38
+ /**
39
+ * @generated from protobuf field: google.protobuf.Timestamp joined_at = 4;
40
+ */
41
+ joinedAt?: Timestamp;
42
+ /**
43
+ * @generated from protobuf field: string track_lookup_prefix = 5;
44
+ */
45
+ trackLookupPrefix: string;
46
+ /**
47
+ * @generated from protobuf field: stream.video.sfu.models.ConnectionQuality connection_quality = 6;
48
+ */
49
+ connectionQuality: ConnectionQuality;
50
+ /**
51
+ * @generated from protobuf field: bool is_speaking = 7;
52
+ */
53
+ isSpeaking: boolean;
54
+ /**
55
+ * @generated from protobuf field: bool is_dominant_speaker = 8;
56
+ */
57
+ isDominantSpeaker: boolean;
58
+ /**
59
+ * @generated from protobuf field: float audio_level = 9;
60
+ */
61
+ audioLevel: number;
62
+ }
63
+ /**
64
+ * @generated from protobuf message stream.video.sfu.models.StreamQuality
65
+ */
66
+ export interface StreamQuality {
67
+ /**
68
+ * @generated from protobuf field: stream.video.sfu.models.VideoQuality video_quality = 1;
69
+ */
70
+ videoQuality: VideoQuality;
71
+ /**
72
+ * @generated from protobuf field: string user_id = 2;
73
+ */
74
+ userId: string;
75
+ }
76
+ /**
77
+ * @generated from protobuf message stream.video.sfu.models.VideoDimension
78
+ */
79
+ export interface VideoDimension {
80
+ /**
81
+ * @generated from protobuf field: uint32 width = 1;
82
+ */
83
+ width: number;
84
+ /**
85
+ * @generated from protobuf field: uint32 height = 2;
86
+ */
87
+ height: number;
88
+ }
89
+ /**
90
+ * @generated from protobuf message stream.video.sfu.models.VideoLayer
91
+ */
92
+ export interface VideoLayer {
93
+ /**
94
+ * for tracks with a single layer, this should be HIGH
95
+ *
96
+ * @generated from protobuf field: string rid = 1;
97
+ */
98
+ rid: string;
99
+ /**
100
+ * @generated from protobuf field: stream.video.sfu.models.VideoDimension video_dimension = 2;
101
+ */
102
+ videoDimension?: VideoDimension;
103
+ /**
104
+ * target bitrate, server will measure actual
105
+ *
106
+ * @generated from protobuf field: uint32 bitrate = 4;
107
+ */
108
+ bitrate: number;
109
+ /**
110
+ * @generated from protobuf field: uint32 fps = 5;
111
+ */
112
+ fps: number;
113
+ /**
114
+ * @generated from protobuf field: stream.video.sfu.models.VideoQuality quality = 6;
115
+ */
116
+ quality: VideoQuality;
117
+ }
118
+ /**
119
+ * @generated from protobuf message stream.video.sfu.models.Codec
120
+ */
121
+ export interface Codec {
122
+ /**
123
+ * @generated from protobuf field: uint32 payload_type = 1;
124
+ */
125
+ payloadType: number;
126
+ /**
127
+ * @generated from protobuf field: string name = 2;
128
+ */
129
+ name: string;
130
+ /**
131
+ * @generated from protobuf field: string fmtp_line = 3;
132
+ */
133
+ fmtpLine: string;
134
+ /**
135
+ * @generated from protobuf field: uint32 clock_rate = 4;
136
+ */
137
+ clockRate: number;
138
+ /**
139
+ * @generated from protobuf field: string encoding_parameters = 5;
140
+ */
141
+ encodingParameters: string;
142
+ /**
143
+ * @generated from protobuf field: repeated string feedbacks = 6;
144
+ */
145
+ feedbacks: string[];
146
+ }
147
+ /**
148
+ * @generated from protobuf message stream.video.sfu.models.ICETrickle
149
+ */
150
+ export interface ICETrickle {
151
+ /**
152
+ * @generated from protobuf field: stream.video.sfu.models.PeerType peer_type = 1;
153
+ */
154
+ peerType: PeerType;
155
+ /**
156
+ * @generated from protobuf field: string ice_candidate = 2;
157
+ */
158
+ iceCandidate: string;
159
+ /**
160
+ * @generated from protobuf field: string session_id = 3;
161
+ */
162
+ sessionId: string;
163
+ }
164
+ /**
165
+ * @generated from protobuf message stream.video.sfu.models.TrackInfo
166
+ */
167
+ export interface TrackInfo {
168
+ /**
169
+ * @generated from protobuf field: string track_id = 1;
170
+ */
171
+ trackId: string;
172
+ /**
173
+ * @generated from protobuf field: stream.video.sfu.models.TrackType track_type = 2;
174
+ */
175
+ trackType: TrackType;
176
+ /**
177
+ * @generated from protobuf field: repeated stream.video.sfu.models.VideoLayer layers = 5;
178
+ */
179
+ layers: VideoLayer[];
180
+ /**
181
+ * @generated from protobuf field: string mid = 6;
182
+ */
183
+ mid: string;
184
+ }
185
+ /**
186
+ * todo remove this
187
+ *
188
+ * @generated from protobuf message stream.video.sfu.models.Call
189
+ */
190
+ export interface Call {
191
+ /**
192
+ * the call type
193
+ *
194
+ * @generated from protobuf field: string type = 1;
195
+ */
196
+ type: string;
197
+ /**
198
+ * the call id
199
+ *
200
+ * @generated from protobuf field: string id = 2;
201
+ */
202
+ id: string;
203
+ /**
204
+ * the id of the user that created this call
205
+ *
206
+ * @generated from protobuf field: string created_by_user_id = 3;
207
+ */
208
+ createdByUserId: string;
209
+ /**
210
+ * the id of the current host for this call
211
+ *
212
+ * @generated from protobuf field: string host_user_id = 4;
213
+ */
214
+ hostUserId: string;
215
+ /**
216
+ * @generated from protobuf field: google.protobuf.Struct custom = 5;
217
+ */
218
+ custom?: Struct;
219
+ /**
220
+ * @generated from protobuf field: google.protobuf.Timestamp created_at = 6;
221
+ */
222
+ createdAt?: Timestamp;
223
+ /**
224
+ * @generated from protobuf field: google.protobuf.Timestamp updated_at = 7;
225
+ */
226
+ updatedAt?: Timestamp;
227
+ }
228
+ /**
229
+ * @generated from protobuf message stream.video.sfu.models.Error
230
+ */
231
+ export interface Error {
232
+ /**
233
+ * @generated from protobuf field: stream.video.sfu.models.ErrorCode code = 1;
234
+ */
235
+ code: ErrorCode;
236
+ /**
237
+ * @generated from protobuf field: string message = 2;
238
+ */
239
+ message: string;
240
+ }
241
+ /**
242
+ * @generated from protobuf enum stream.video.sfu.models.PeerType
243
+ */
244
+ export declare enum PeerType {
245
+ /**
246
+ * todo fix me (marcelo)
247
+ *
248
+ * @generated from protobuf enum value: PEER_TYPE_PUBLISHER_UNSPECIFIED = 0;
249
+ */
250
+ PUBLISHER_UNSPECIFIED = 0,
251
+ /**
252
+ * @generated from protobuf enum value: PEER_TYPE_SUBSCRIBER = 1;
253
+ */
254
+ SUBSCRIBER = 1
255
+ }
256
+ /**
257
+ * @generated from protobuf enum stream.video.sfu.models.ConnectionQuality
258
+ */
259
+ export declare enum ConnectionQuality {
260
+ /**
261
+ * @generated from protobuf enum value: CONNECTION_QUALITY_UNSPECIFIED = 0;
262
+ */
263
+ UNSPECIFIED = 0,
264
+ /**
265
+ * @generated from protobuf enum value: CONNECTION_QUALITY_POOR = 1;
266
+ */
267
+ POOR = 1,
268
+ /**
269
+ * @generated from protobuf enum value: CONNECTION_QUALITY_GOOD = 2;
270
+ */
271
+ GOOD = 2,
272
+ /**
273
+ * @generated from protobuf enum value: CONNECTION_QUALITY_EXCELLENT = 3;
274
+ */
275
+ EXCELLENT = 3
276
+ }
277
+ /**
278
+ * @generated from protobuf enum stream.video.sfu.models.VideoQuality
279
+ */
280
+ export declare enum VideoQuality {
281
+ /**
282
+ * @generated from protobuf enum value: VIDEO_QUALITY_LOW_UNSPECIFIED = 0;
283
+ */
284
+ LOW_UNSPECIFIED = 0,
285
+ /**
286
+ * @generated from protobuf enum value: VIDEO_QUALITY_MID = 1;
287
+ */
288
+ MID = 1,
289
+ /**
290
+ * @generated from protobuf enum value: VIDEO_QUALITY_HIGH = 2;
291
+ */
292
+ HIGH = 2,
293
+ /**
294
+ * @generated from protobuf enum value: VIDEO_QUALITY_OFF = 3;
295
+ */
296
+ OFF = 3
297
+ }
298
+ /**
299
+ * @generated from protobuf enum stream.video.sfu.models.TrackType
300
+ */
301
+ export declare enum TrackType {
302
+ /**
303
+ * @generated from protobuf enum value: TRACK_TYPE_UNSPECIFIED = 0;
304
+ */
305
+ UNSPECIFIED = 0,
306
+ /**
307
+ * @generated from protobuf enum value: TRACK_TYPE_AUDIO = 1;
308
+ */
309
+ AUDIO = 1,
310
+ /**
311
+ * @generated from protobuf enum value: TRACK_TYPE_VIDEO = 2;
312
+ */
313
+ VIDEO = 2,
314
+ /**
315
+ * @generated from protobuf enum value: TRACK_TYPE_SCREEN_SHARE = 3;
316
+ */
317
+ SCREEN_SHARE = 3,
318
+ /**
319
+ * @generated from protobuf enum value: TRACK_TYPE_SCREEN_SHARE_AUDIO = 4;
320
+ */
321
+ SCREEN_SHARE_AUDIO = 4
322
+ }
323
+ /**
324
+ * @generated from protobuf enum stream.video.sfu.models.ErrorCode
325
+ */
326
+ export declare enum ErrorCode {
327
+ /**
328
+ * @generated from protobuf enum value: ERROR_CODE_UNSPECIFIED = 0;
329
+ */
330
+ UNSPECIFIED = 0,
331
+ /**
332
+ * @generated from protobuf enum value: ERROR_CODE_PUBLISH_TRACK_NOT_FOUND = 100;
333
+ */
334
+ PUBLISH_TRACK_NOT_FOUND = 100,
335
+ /**
336
+ * @generated from protobuf enum value: ERROR_CODE_PUBLISH_TRACKS_MISMATCH = 101;
337
+ */
338
+ PUBLISH_TRACKS_MISMATCH = 101,
339
+ /**
340
+ * @generated from protobuf enum value: ERROR_CODE_PUBLISH_TRACK_OUT_OF_ORDER = 102;
341
+ */
342
+ PUBLISH_TRACK_OUT_OF_ORDER = 102,
343
+ /**
344
+ * @generated from protobuf enum value: ERROR_CODE_PUBLISH_TRACK_VIDEO_LAYER_NOT_FOUND = 103;
345
+ */
346
+ PUBLISH_TRACK_VIDEO_LAYER_NOT_FOUND = 103,
347
+ /**
348
+ * @generated from protobuf enum value: ERROR_CODE_PARTICIPANT_NOT_FOUND = 200;
349
+ */
350
+ PARTICIPANT_NOT_FOUND = 200,
351
+ /**
352
+ * @generated from protobuf enum value: ERROR_CODE_CALL_NOT_FOUND = 300;
353
+ */
354
+ CALL_NOT_FOUND = 300,
355
+ /**
356
+ * @generated from protobuf enum value: ERROR_CODE_INTERNAL_SERVER_ERROR = 500;
357
+ */
358
+ INTERNAL_SERVER_ERROR = 500
359
+ }
360
+ declare class CallState$Type extends MessageType<CallState> {
361
+ constructor();
362
+ create(value?: PartialMessage<CallState>): CallState;
363
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CallState): CallState;
364
+ internalBinaryWrite(message: CallState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
365
+ }
366
+ /**
367
+ * @generated MessageType for protobuf message stream.video.sfu.models.CallState
368
+ */
369
+ export declare const CallState: CallState$Type;
370
+ declare class Participant$Type extends MessageType<Participant> {
371
+ constructor();
372
+ create(value?: PartialMessage<Participant>): Participant;
373
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Participant): Participant;
374
+ internalBinaryWrite(message: Participant, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
375
+ }
376
+ /**
377
+ * @generated MessageType for protobuf message stream.video.sfu.models.Participant
378
+ */
379
+ export declare const Participant: Participant$Type;
380
+ declare class StreamQuality$Type extends MessageType<StreamQuality> {
381
+ constructor();
382
+ create(value?: PartialMessage<StreamQuality>): StreamQuality;
383
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamQuality): StreamQuality;
384
+ internalBinaryWrite(message: StreamQuality, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
385
+ }
386
+ /**
387
+ * @generated MessageType for protobuf message stream.video.sfu.models.StreamQuality
388
+ */
389
+ export declare const StreamQuality: StreamQuality$Type;
390
+ declare class VideoDimension$Type extends MessageType<VideoDimension> {
391
+ constructor();
392
+ create(value?: PartialMessage<VideoDimension>): VideoDimension;
393
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VideoDimension): VideoDimension;
394
+ internalBinaryWrite(message: VideoDimension, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
395
+ }
396
+ /**
397
+ * @generated MessageType for protobuf message stream.video.sfu.models.VideoDimension
398
+ */
399
+ export declare const VideoDimension: VideoDimension$Type;
400
+ declare class VideoLayer$Type extends MessageType<VideoLayer> {
401
+ constructor();
402
+ create(value?: PartialMessage<VideoLayer>): VideoLayer;
403
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VideoLayer): VideoLayer;
404
+ internalBinaryWrite(message: VideoLayer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
405
+ }
406
+ /**
407
+ * @generated MessageType for protobuf message stream.video.sfu.models.VideoLayer
408
+ */
409
+ export declare const VideoLayer: VideoLayer$Type;
410
+ declare class Codec$Type extends MessageType<Codec> {
411
+ constructor();
412
+ create(value?: PartialMessage<Codec>): Codec;
413
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Codec): Codec;
414
+ internalBinaryWrite(message: Codec, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
415
+ }
416
+ /**
417
+ * @generated MessageType for protobuf message stream.video.sfu.models.Codec
418
+ */
419
+ export declare const Codec: Codec$Type;
420
+ declare class ICETrickle$Type extends MessageType<ICETrickle> {
421
+ constructor();
422
+ create(value?: PartialMessage<ICETrickle>): ICETrickle;
423
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ICETrickle): ICETrickle;
424
+ internalBinaryWrite(message: ICETrickle, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
425
+ }
426
+ /**
427
+ * @generated MessageType for protobuf message stream.video.sfu.models.ICETrickle
428
+ */
429
+ export declare const ICETrickle: ICETrickle$Type;
430
+ declare class TrackInfo$Type extends MessageType<TrackInfo> {
431
+ constructor();
432
+ create(value?: PartialMessage<TrackInfo>): TrackInfo;
433
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackInfo): TrackInfo;
434
+ internalBinaryWrite(message: TrackInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
435
+ }
436
+ /**
437
+ * @generated MessageType for protobuf message stream.video.sfu.models.TrackInfo
438
+ */
439
+ export declare const TrackInfo: TrackInfo$Type;
440
+ declare class Call$Type extends MessageType<Call> {
441
+ constructor();
442
+ create(value?: PartialMessage<Call>): Call;
443
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Call): Call;
444
+ internalBinaryWrite(message: Call, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
445
+ }
446
+ /**
447
+ * @generated MessageType for protobuf message stream.video.sfu.models.Call
448
+ */
449
+ export declare const Call: Call$Type;
450
+ declare class Error$Type extends MessageType<Error> {
451
+ constructor();
452
+ create(value?: PartialMessage<Error>): Error;
453
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Error): Error;
454
+ internalBinaryWrite(message: Error, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
455
+ }
456
+ /**
457
+ * @generated MessageType for protobuf message stream.video.sfu.models.Error
458
+ */
459
+ export declare const Error: Error$Type;
460
+ export {};
@@ -0,0 +1,89 @@
1
+ import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
2
+ import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
3
+ import type { UpdateMuteStatesResponse } from "./signal";
4
+ import type { UpdateMuteStatesRequest } from "./signal";
5
+ import type { UpdateSubscriptionsResponse } from "./signal";
6
+ import type { UpdateSubscriptionsRequest } from "./signal";
7
+ import type { ICETrickleResponse } from "./signal";
8
+ import type { ICETrickle } from "../models/models";
9
+ import type { SendAnswerResponse } from "./signal";
10
+ import type { SendAnswerRequest } from "./signal";
11
+ import type { SetPublisherResponse } from "./signal";
12
+ import type { SetPublisherRequest } from "./signal";
13
+ import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
14
+ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
15
+ /**
16
+ * @generated from protobuf service stream.video.sfu.signal.SignalServer
17
+ */
18
+ export interface ISignalServerClient {
19
+ /**
20
+ * SetPublisher sends the WebRTC offer for the peer connection used to publish A/V
21
+ *
22
+ * @generated from protobuf rpc: SetPublisher(stream.video.sfu.signal.SetPublisherRequest) returns (stream.video.sfu.signal.SetPublisherResponse);
23
+ */
24
+ setPublisher(input: SetPublisherRequest, options?: RpcOptions): UnaryCall<SetPublisherRequest, SetPublisherResponse>;
25
+ /**
26
+ * answer is sent by the client to the SFU after receiving a subscriber_offer.
27
+ *
28
+ * @generated from protobuf rpc: SendAnswer(stream.video.sfu.signal.SendAnswerRequest) returns (stream.video.sfu.signal.SendAnswerResponse);
29
+ */
30
+ sendAnswer(input: SendAnswerRequest, options?: RpcOptions): UnaryCall<SendAnswerRequest, SendAnswerResponse>;
31
+ /**
32
+ * SendICECandidate sends an ICE candidate to the client
33
+ *
34
+ * @generated from protobuf rpc: IceTrickle(stream.video.sfu.models.ICETrickle) returns (stream.video.sfu.signal.ICETrickleResponse);
35
+ */
36
+ iceTrickle(input: ICETrickle, options?: RpcOptions): UnaryCall<ICETrickle, ICETrickleResponse>;
37
+ /**
38
+ * UpdateSubscribers is used to notify the SFU about the list of video subscriptions
39
+ * TODO: sync subscriptions based on this + update tracks using the dimension info sent by the user
40
+ *
41
+ * @generated from protobuf rpc: UpdateSubscriptions(stream.video.sfu.signal.UpdateSubscriptionsRequest) returns (stream.video.sfu.signal.UpdateSubscriptionsResponse);
42
+ */
43
+ updateSubscriptions(input: UpdateSubscriptionsRequest, options?: RpcOptions): UnaryCall<UpdateSubscriptionsRequest, UpdateSubscriptionsResponse>;
44
+ /**
45
+ * @generated from protobuf rpc: UpdateMuteStates(stream.video.sfu.signal.UpdateMuteStatesRequest) returns (stream.video.sfu.signal.UpdateMuteStatesResponse);
46
+ */
47
+ updateMuteStates(input: UpdateMuteStatesRequest, options?: RpcOptions): UnaryCall<UpdateMuteStatesRequest, UpdateMuteStatesResponse>;
48
+ }
49
+ /**
50
+ * @generated from protobuf service stream.video.sfu.signal.SignalServer
51
+ */
52
+ export declare class SignalServerClient implements ISignalServerClient, ServiceInfo {
53
+ private readonly _transport;
54
+ typeName: string;
55
+ methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
56
+ options: {
57
+ [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
58
+ };
59
+ constructor(_transport: RpcTransport);
60
+ /**
61
+ * SetPublisher sends the WebRTC offer for the peer connection used to publish A/V
62
+ *
63
+ * @generated from protobuf rpc: SetPublisher(stream.video.sfu.signal.SetPublisherRequest) returns (stream.video.sfu.signal.SetPublisherResponse);
64
+ */
65
+ setPublisher(input: SetPublisherRequest, options?: RpcOptions): UnaryCall<SetPublisherRequest, SetPublisherResponse>;
66
+ /**
67
+ * answer is sent by the client to the SFU after receiving a subscriber_offer.
68
+ *
69
+ * @generated from protobuf rpc: SendAnswer(stream.video.sfu.signal.SendAnswerRequest) returns (stream.video.sfu.signal.SendAnswerResponse);
70
+ */
71
+ sendAnswer(input: SendAnswerRequest, options?: RpcOptions): UnaryCall<SendAnswerRequest, SendAnswerResponse>;
72
+ /**
73
+ * SendICECandidate sends an ICE candidate to the client
74
+ *
75
+ * @generated from protobuf rpc: IceTrickle(stream.video.sfu.models.ICETrickle) returns (stream.video.sfu.signal.ICETrickleResponse);
76
+ */
77
+ iceTrickle(input: ICETrickle, options?: RpcOptions): UnaryCall<ICETrickle, ICETrickleResponse>;
78
+ /**
79
+ * UpdateSubscribers is used to notify the SFU about the list of video subscriptions
80
+ * TODO: sync subscriptions based on this + update tracks using the dimension info sent by the user
81
+ *
82
+ * @generated from protobuf rpc: UpdateSubscriptions(stream.video.sfu.signal.UpdateSubscriptionsRequest) returns (stream.video.sfu.signal.UpdateSubscriptionsResponse);
83
+ */
84
+ updateSubscriptions(input: UpdateSubscriptionsRequest, options?: RpcOptions): UnaryCall<UpdateSubscriptionsRequest, UpdateSubscriptionsResponse>;
85
+ /**
86
+ * @generated from protobuf rpc: UpdateMuteStates(stream.video.sfu.signal.UpdateMuteStatesRequest) returns (stream.video.sfu.signal.UpdateMuteStatesResponse);
87
+ */
88
+ updateMuteStates(input: UpdateMuteStatesRequest, options?: RpcOptions): UnaryCall<UpdateMuteStatesRequest, UpdateMuteStatesResponse>;
89
+ }