@formant/realtime-sdk 0.0.20 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/LICENSE.txt +19 -0
  2. package/README.md +43 -0
  3. package/dist/{common → client}/Credentials.d.ts +1 -1
  4. package/dist/common/BaseClient.d.ts +4 -3
  5. package/dist/common/LogReporter.d.ts +1 -3
  6. package/dist/common/LruCache.d.ts +1 -1
  7. package/dist/common/PromiseLruCache.d.ts +1 -1
  8. package/dist/common/ResponseError.d.ts +3 -2
  9. package/dist/common/StatsManager.d.ts +1 -1
  10. package/dist/common/StatsReporter.d.ts +7 -6
  11. package/dist/common/config/index.d.ts +1 -1
  12. package/dist/common/defined.d.ts +3 -0
  13. package/dist/common/delay.d.ts +1 -1
  14. package/dist/common/redact.d.ts +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/model/AnnotationAreaType.d.ts +1 -1
  17. package/dist/model/CognitoRegion.d.ts +1 -1
  18. package/dist/model/Feature.d.ts +2 -2
  19. package/dist/model/HealthStatus.d.ts +1 -1
  20. package/dist/model/HexRgbColor.d.ts +1 -1
  21. package/dist/model/IDictionary.d.ts +3 -0
  22. package/dist/model/IFilter.d.ts +1 -1
  23. package/dist/model/IPoint.d.ts +1 -1
  24. package/dist/model/IRtcSession.d.ts +1 -1
  25. package/dist/model/ITags.d.ts +2 -3
  26. package/dist/model/IUser.d.ts +10 -4
  27. package/dist/model/IUserScope.d.ts +16 -0
  28. package/dist/model/IsoDate.d.ts +1 -1
  29. package/dist/model/LanguageType.d.ts +2 -0
  30. package/dist/model/LogLevel.d.ts +1 -1
  31. package/dist/model/Marker3DAction.d.ts +1 -1
  32. package/dist/model/Marker3DType.d.ts +1 -1
  33. package/dist/model/OrganizationPlan.d.ts +1 -1
  34. package/dist/model/RequireKeys.d.ts +3 -0
  35. package/dist/model/RtcConnectionStatus.d.ts +1 -1
  36. package/dist/model/RtcIceServerProtocol.d.ts +1 -1
  37. package/dist/model/RtcIceTransportPolicy.d.ts +1 -1
  38. package/dist/model/RtcStreamType.d.ts +2 -2
  39. package/dist/model/SmsOptInStatus.d.ts +2 -0
  40. package/dist/model/StreamType.d.ts +1 -1
  41. package/dist/model/Timeout.d.ts +1 -1
  42. package/dist/model/Timestamp.d.ts +1 -1
  43. package/dist/model/Uuid.d.ts +1 -1
  44. package/dist/model/VideoMimeType.d.ts +1 -1
  45. package/dist/model/cognitoRegions.d.ts +1 -1
  46. package/dist/model/healthStatuses.d.ts +1 -1
  47. package/dist/model/languageTypes.d.ts +1 -0
  48. package/dist/model/rtcStreamTypes.d.ts +2 -1
  49. package/dist/model/smsOptInStatuses.d.ts +1 -0
  50. package/dist/protos/api/signaling/v1/signaling_grpc_web_pb.d.ts +47 -47
  51. package/dist/protos/api/signaling/v1/signaling_grpc_web_pb.js +27 -175
  52. package/dist/protos/api/signaling/v1/signaling_pb.js +7 -1
  53. package/dist/realtime-sdk/src/index.d.ts +10 -10
  54. package/dist/rtc-client/IHasPeerConnection.d.ts +3 -0
  55. package/dist/rtc-client/IHasRemoteDeviceId.d.ts +4 -0
  56. package/dist/rtc-client/RtcClient.d.ts +3 -1
  57. package/dist/rtc-client/RtcConnection.d.ts +18 -14
  58. package/dist/rtc-client/RtcConnectionV1.d.ts +2 -1
  59. package/dist/rtc-client/RtcSessionMetrics.d.ts +5 -4
  60. package/dist/rtc-client/RtcSessionMetricsV1.d.ts +8 -6
  61. package/dist/rtc-client/gatherPingMetrics.d.ts +2 -2
  62. package/dist/rtc-client/models/IIceMode.d.ts +1 -1
  63. package/dist/rtc-client/models/IRtcClientConfiguration.d.ts +1 -1
  64. package/dist/rtc-client/models/IRtcConnectionConfiguration.d.ts +1 -1
  65. package/dist/rtc-client/models/IRtcStreamPayload.d.ts +2 -0
  66. package/dist/rtc-client/models/IStreamControl.d.ts +1 -1
  67. package/dist/rtc-client/models/RtcChannelLabel.d.ts +1 -1
  68. package/dist/rtc-client/models/RtcCommunicationType.d.ts +1 -1
  69. package/dist/rtc-client/utils/assertHasPeerConnection.d.ts +1 -0
  70. package/dist/rtc-client/utils/partition.d.ts +1 -0
  71. package/dist/ui/utils/browser.d.ts +1 -1
  72. package/package.json +3 -3
  73. package/dist/model/IAccessScope.d.ts +0 -5
  74. package/dist/protos/api/signaling/v1/signaling_grpc_pb.js +0 -276
  75. package/dist/version.txt +0 -1
@@ -4,7 +4,11 @@
4
4
  * @public
5
5
  */
6
6
 
7
- // GENERATED CODE -- DO NOT EDIT!
7
+ // Code generated by protoc-gen-grpc-web. DO NOT EDIT.
8
+ // versions:
9
+ // protoc-gen-grpc-web v1.4.1
10
+ // protoc v3.19.1
11
+ // source: api/signaling/v1/signaling.proto
8
12
 
9
13
 
10
14
  /* eslint-disable */
@@ -25,7 +29,7 @@ proto.v1.signaling.api = require('./signaling_pb.js');
25
29
  /**
26
30
  * @param {string} hostname
27
31
  * @param {?Object} credentials
28
- * @param {?Object} options
32
+ * @param {?grpc.web.ClientOptions} options
29
33
  * @constructor
30
34
  * @struct
31
35
  * @final
@@ -33,7 +37,7 @@ proto.v1.signaling.api = require('./signaling_pb.js');
33
37
  proto.v1.signaling.api.SignalingClient =
34
38
  function(hostname, credentials, options) {
35
39
  if (!options) options = {};
36
- options['format'] = 'text';
40
+ options.format = 'text';
37
41
 
38
42
  /**
39
43
  * @private @const {!grpc.web.GrpcWebClientBase} The client
@@ -43,7 +47,7 @@ proto.v1.signaling.api.SignalingClient =
43
47
  /**
44
48
  * @private @const {string} The hostname
45
49
  */
46
- this.hostname_ = hostname;
50
+ this.hostname_ = hostname.replace(/\/+$/, '');
47
51
 
48
52
  };
49
53
 
@@ -51,7 +55,7 @@ proto.v1.signaling.api.SignalingClient =
51
55
  /**
52
56
  * @param {string} hostname
53
57
  * @param {?Object} credentials
54
- * @param {?Object} options
58
+ * @param {?grpc.web.ClientOptions} options
55
59
  * @constructor
56
60
  * @struct
57
61
  * @final
@@ -59,7 +63,7 @@ proto.v1.signaling.api.SignalingClient =
59
63
  proto.v1.signaling.api.SignalingPromiseClient =
60
64
  function(hostname, credentials, options) {
61
65
  if (!options) options = {};
62
- options['format'] = 'text';
66
+ options.format = 'text';
63
67
 
64
68
  /**
65
69
  * @private @const {!grpc.web.GrpcWebClientBase} The client
@@ -69,7 +73,7 @@ proto.v1.signaling.api.SignalingPromiseClient =
69
73
  /**
70
74
  * @private @const {string} The hostname
71
75
  */
72
- this.hostname_ = hostname;
76
+ this.hostname_ = hostname.replace(/\/+$/, '');
73
77
 
74
78
  };
75
79
 
@@ -96,31 +100,12 @@ const methodDescriptor_Signaling_GetHealth = new grpc.web.MethodDescriptor(
96
100
  );
97
101
 
98
102
 
99
- /**
100
- * @const
101
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
102
- * !proto.v1.signaling.api.GetHealthRequest,
103
- * !proto.v1.signaling.api.GetHealthResponse>}
104
- */
105
- const methodInfo_Signaling_GetHealth = new grpc.web.AbstractClientBase.MethodInfo(
106
- proto.v1.signaling.api.GetHealthResponse,
107
- /**
108
- * @param {!proto.v1.signaling.api.GetHealthRequest} request
109
- * @return {!Uint8Array}
110
- */
111
- function(request) {
112
- return request.serializeBinary();
113
- },
114
- proto.v1.signaling.api.GetHealthResponse.deserializeBinary
115
- );
116
-
117
-
118
103
  /**
119
104
  * @param {!proto.v1.signaling.api.GetHealthRequest} request The
120
105
  * request proto
121
106
  * @param {?Object<string, string>} metadata User defined
122
107
  * call metadata
123
- * @param {function(?grpc.web.Error, ?proto.v1.signaling.api.GetHealthResponse)}
108
+ * @param {function(?grpc.web.RpcError, ?proto.v1.signaling.api.GetHealthResponse)}
124
109
  * callback The callback function(error, response)
125
110
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.GetHealthResponse>|undefined}
126
111
  * The XHR Node Readable Stream
@@ -139,7 +124,7 @@ proto.v1.signaling.api.SignalingClient.prototype.getHealth =
139
124
  /**
140
125
  * @param {!proto.v1.signaling.api.GetHealthRequest} request The
141
126
  * request proto
142
- * @param {?Object<string, string>} metadata User defined
127
+ * @param {?Object<string, string>=} metadata User defined
143
128
  * call metadata
144
129
  * @return {!Promise<!proto.v1.signaling.api.GetHealthResponse>}
145
130
  * Promise that resolves to the response
@@ -176,31 +161,12 @@ const methodDescriptor_Signaling_CreatePeer = new grpc.web.MethodDescriptor(
176
161
  );
177
162
 
178
163
 
179
- /**
180
- * @const
181
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
182
- * !proto.v1.signaling.api.CreatePeerRequest,
183
- * !proto.v1.signaling.api.CreatePeerResponse>}
184
- */
185
- const methodInfo_Signaling_CreatePeer = new grpc.web.AbstractClientBase.MethodInfo(
186
- proto.v1.signaling.api.CreatePeerResponse,
187
- /**
188
- * @param {!proto.v1.signaling.api.CreatePeerRequest} request
189
- * @return {!Uint8Array}
190
- */
191
- function(request) {
192
- return request.serializeBinary();
193
- },
194
- proto.v1.signaling.api.CreatePeerResponse.deserializeBinary
195
- );
196
-
197
-
198
164
  /**
199
165
  * @param {!proto.v1.signaling.api.CreatePeerRequest} request The
200
166
  * request proto
201
167
  * @param {?Object<string, string>} metadata User defined
202
168
  * call metadata
203
- * @param {function(?grpc.web.Error, ?proto.v1.signaling.api.CreatePeerResponse)}
169
+ * @param {function(?grpc.web.RpcError, ?proto.v1.signaling.api.CreatePeerResponse)}
204
170
  * callback The callback function(error, response)
205
171
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.CreatePeerResponse>|undefined}
206
172
  * The XHR Node Readable Stream
@@ -219,7 +185,7 @@ proto.v1.signaling.api.SignalingClient.prototype.createPeer =
219
185
  /**
220
186
  * @param {!proto.v1.signaling.api.CreatePeerRequest} request The
221
187
  * request proto
222
- * @param {?Object<string, string>} metadata User defined
188
+ * @param {?Object<string, string>=} metadata User defined
223
189
  * call metadata
224
190
  * @return {!Promise<!proto.v1.signaling.api.CreatePeerResponse>}
225
191
  * Promise that resolves to the response
@@ -256,31 +222,12 @@ const methodDescriptor_Signaling_DeletePeer = new grpc.web.MethodDescriptor(
256
222
  );
257
223
 
258
224
 
259
- /**
260
- * @const
261
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
262
- * !proto.v1.signaling.api.DeletePeerRequest,
263
- * !proto.v1.signaling.api.DeletePeerResponse>}
264
- */
265
- const methodInfo_Signaling_DeletePeer = new grpc.web.AbstractClientBase.MethodInfo(
266
- proto.v1.signaling.api.DeletePeerResponse,
267
- /**
268
- * @param {!proto.v1.signaling.api.DeletePeerRequest} request
269
- * @return {!Uint8Array}
270
- */
271
- function(request) {
272
- return request.serializeBinary();
273
- },
274
- proto.v1.signaling.api.DeletePeerResponse.deserializeBinary
275
- );
276
-
277
-
278
225
  /**
279
226
  * @param {!proto.v1.signaling.api.DeletePeerRequest} request The
280
227
  * request proto
281
228
  * @param {?Object<string, string>} metadata User defined
282
229
  * call metadata
283
- * @param {function(?grpc.web.Error, ?proto.v1.signaling.api.DeletePeerResponse)}
230
+ * @param {function(?grpc.web.RpcError, ?proto.v1.signaling.api.DeletePeerResponse)}
284
231
  * callback The callback function(error, response)
285
232
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.DeletePeerResponse>|undefined}
286
233
  * The XHR Node Readable Stream
@@ -299,7 +246,7 @@ proto.v1.signaling.api.SignalingClient.prototype.deletePeer =
299
246
  /**
300
247
  * @param {!proto.v1.signaling.api.DeletePeerRequest} request The
301
248
  * request proto
302
- * @param {?Object<string, string>} metadata User defined
249
+ * @param {?Object<string, string>=} metadata User defined
303
250
  * call metadata
304
251
  * @return {!Promise<!proto.v1.signaling.api.DeletePeerResponse>}
305
252
  * Promise that resolves to the response
@@ -336,31 +283,12 @@ const methodDescriptor_Signaling_RefreshPeer = new grpc.web.MethodDescriptor(
336
283
  );
337
284
 
338
285
 
339
- /**
340
- * @const
341
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
342
- * !proto.v1.signaling.api.RefreshPeerRequest,
343
- * !proto.v1.signaling.api.RefreshPeerResponse>}
344
- */
345
- const methodInfo_Signaling_RefreshPeer = new grpc.web.AbstractClientBase.MethodInfo(
346
- proto.v1.signaling.api.RefreshPeerResponse,
347
- /**
348
- * @param {!proto.v1.signaling.api.RefreshPeerRequest} request
349
- * @return {!Uint8Array}
350
- */
351
- function(request) {
352
- return request.serializeBinary();
353
- },
354
- proto.v1.signaling.api.RefreshPeerResponse.deserializeBinary
355
- );
356
-
357
-
358
286
  /**
359
287
  * @param {!proto.v1.signaling.api.RefreshPeerRequest} request The
360
288
  * request proto
361
289
  * @param {?Object<string, string>} metadata User defined
362
290
  * call metadata
363
- * @param {function(?grpc.web.Error, ?proto.v1.signaling.api.RefreshPeerResponse)}
291
+ * @param {function(?grpc.web.RpcError, ?proto.v1.signaling.api.RefreshPeerResponse)}
364
292
  * callback The callback function(error, response)
365
293
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.RefreshPeerResponse>|undefined}
366
294
  * The XHR Node Readable Stream
@@ -379,7 +307,7 @@ proto.v1.signaling.api.SignalingClient.prototype.refreshPeer =
379
307
  /**
380
308
  * @param {!proto.v1.signaling.api.RefreshPeerRequest} request The
381
309
  * request proto
382
- * @param {?Object<string, string>} metadata User defined
310
+ * @param {?Object<string, string>=} metadata User defined
383
311
  * call metadata
384
312
  * @return {!Promise<!proto.v1.signaling.api.RefreshPeerResponse>}
385
313
  * Promise that resolves to the response
@@ -416,31 +344,12 @@ const methodDescriptor_Signaling_GetPeers = new grpc.web.MethodDescriptor(
416
344
  );
417
345
 
418
346
 
419
- /**
420
- * @const
421
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
422
- * !proto.v1.signaling.api.GetPeersRequest,
423
- * !proto.v1.signaling.api.GetPeersResponse>}
424
- */
425
- const methodInfo_Signaling_GetPeers = new grpc.web.AbstractClientBase.MethodInfo(
426
- proto.v1.signaling.api.GetPeersResponse,
427
- /**
428
- * @param {!proto.v1.signaling.api.GetPeersRequest} request
429
- * @return {!Uint8Array}
430
- */
431
- function(request) {
432
- return request.serializeBinary();
433
- },
434
- proto.v1.signaling.api.GetPeersResponse.deserializeBinary
435
- );
436
-
437
-
438
347
  /**
439
348
  * @param {!proto.v1.signaling.api.GetPeersRequest} request The
440
349
  * request proto
441
350
  * @param {?Object<string, string>} metadata User defined
442
351
  * call metadata
443
- * @param {function(?grpc.web.Error, ?proto.v1.signaling.api.GetPeersResponse)}
352
+ * @param {function(?grpc.web.RpcError, ?proto.v1.signaling.api.GetPeersResponse)}
444
353
  * callback The callback function(error, response)
445
354
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.GetPeersResponse>|undefined}
446
355
  * The XHR Node Readable Stream
@@ -459,7 +368,7 @@ proto.v1.signaling.api.SignalingClient.prototype.getPeers =
459
368
  /**
460
369
  * @param {!proto.v1.signaling.api.GetPeersRequest} request The
461
370
  * request proto
462
- * @param {?Object<string, string>} metadata User defined
371
+ * @param {?Object<string, string>=} metadata User defined
463
372
  * call metadata
464
373
  * @return {!Promise<!proto.v1.signaling.api.GetPeersResponse>}
465
374
  * Promise that resolves to the response
@@ -496,31 +405,12 @@ const methodDescriptor_Signaling_GetIceServers = new grpc.web.MethodDescriptor(
496
405
  );
497
406
 
498
407
 
499
- /**
500
- * @const
501
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
502
- * !proto.v1.signaling.api.GetIceServersRequest,
503
- * !proto.v1.signaling.api.GetIceServersResponse>}
504
- */
505
- const methodInfo_Signaling_GetIceServers = new grpc.web.AbstractClientBase.MethodInfo(
506
- proto.v1.signaling.api.GetIceServersResponse,
507
- /**
508
- * @param {!proto.v1.signaling.api.GetIceServersRequest} request
509
- * @return {!Uint8Array}
510
- */
511
- function(request) {
512
- return request.serializeBinary();
513
- },
514
- proto.v1.signaling.api.GetIceServersResponse.deserializeBinary
515
- );
516
-
517
-
518
408
  /**
519
409
  * @param {!proto.v1.signaling.api.GetIceServersRequest} request The
520
410
  * request proto
521
411
  * @param {?Object<string, string>} metadata User defined
522
412
  * call metadata
523
- * @param {function(?grpc.web.Error, ?proto.v1.signaling.api.GetIceServersResponse)}
413
+ * @param {function(?grpc.web.RpcError, ?proto.v1.signaling.api.GetIceServersResponse)}
524
414
  * callback The callback function(error, response)
525
415
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.GetIceServersResponse>|undefined}
526
416
  * The XHR Node Readable Stream
@@ -539,7 +429,7 @@ proto.v1.signaling.api.SignalingClient.prototype.getIceServers =
539
429
  /**
540
430
  * @param {!proto.v1.signaling.api.GetIceServersRequest} request The
541
431
  * request proto
542
- * @param {?Object<string, string>} metadata User defined
432
+ * @param {?Object<string, string>=} metadata User defined
543
433
  * call metadata
544
434
  * @return {!Promise<!proto.v1.signaling.api.GetIceServersResponse>}
545
435
  * Promise that resolves to the response
@@ -576,31 +466,12 @@ const methodDescriptor_Signaling_SendSignal = new grpc.web.MethodDescriptor(
576
466
  );
577
467
 
578
468
 
579
- /**
580
- * @const
581
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
582
- * !proto.v1.signaling.api.SendSignalRequest,
583
- * !proto.v1.signaling.api.SendSignalResponse>}
584
- */
585
- const methodInfo_Signaling_SendSignal = new grpc.web.AbstractClientBase.MethodInfo(
586
- proto.v1.signaling.api.SendSignalResponse,
587
- /**
588
- * @param {!proto.v1.signaling.api.SendSignalRequest} request
589
- * @return {!Uint8Array}
590
- */
591
- function(request) {
592
- return request.serializeBinary();
593
- },
594
- proto.v1.signaling.api.SendSignalResponse.deserializeBinary
595
- );
596
-
597
-
598
469
  /**
599
470
  * @param {!proto.v1.signaling.api.SendSignalRequest} request The
600
471
  * request proto
601
472
  * @param {?Object<string, string>} metadata User defined
602
473
  * call metadata
603
- * @param {function(?grpc.web.Error, ?proto.v1.signaling.api.SendSignalResponse)}
474
+ * @param {function(?grpc.web.RpcError, ?proto.v1.signaling.api.SendSignalResponse)}
604
475
  * callback The callback function(error, response)
605
476
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.SendSignalResponse>|undefined}
606
477
  * The XHR Node Readable Stream
@@ -619,7 +490,7 @@ proto.v1.signaling.api.SignalingClient.prototype.sendSignal =
619
490
  /**
620
491
  * @param {!proto.v1.signaling.api.SendSignalRequest} request The
621
492
  * request proto
622
- * @param {?Object<string, string>} metadata User defined
493
+ * @param {?Object<string, string>=} metadata User defined
623
494
  * call metadata
624
495
  * @return {!Promise<!proto.v1.signaling.api.SendSignalResponse>}
625
496
  * Promise that resolves to the response
@@ -656,28 +527,9 @@ const methodDescriptor_Signaling_ReceiveSignalStream = new grpc.web.MethodDescri
656
527
  );
657
528
 
658
529
 
659
- /**
660
- * @const
661
- * @type {!grpc.web.AbstractClientBase.MethodInfo<
662
- * !proto.v1.signaling.api.ReceiveSignalStreamRequest,
663
- * !proto.v1.signaling.api.ReceiveSignalStreamResponse>}
664
- */
665
- const methodInfo_Signaling_ReceiveSignalStream = new grpc.web.AbstractClientBase.MethodInfo(
666
- proto.v1.signaling.api.ReceiveSignalStreamResponse,
667
- /**
668
- * @param {!proto.v1.signaling.api.ReceiveSignalStreamRequest} request
669
- * @return {!Uint8Array}
670
- */
671
- function(request) {
672
- return request.serializeBinary();
673
- },
674
- proto.v1.signaling.api.ReceiveSignalStreamResponse.deserializeBinary
675
- );
676
-
677
-
678
530
  /**
679
531
  * @param {!proto.v1.signaling.api.ReceiveSignalStreamRequest} request The request proto
680
- * @param {?Object<string, string>} metadata User defined
532
+ * @param {?Object<string, string>=} metadata User defined
681
533
  * call metadata
682
534
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.ReceiveSignalStreamResponse>}
683
535
  * The XHR Node Readable Stream
@@ -694,7 +546,7 @@ proto.v1.signaling.api.SignalingClient.prototype.receiveSignalStream =
694
546
 
695
547
  /**
696
548
  * @param {!proto.v1.signaling.api.ReceiveSignalStreamRequest} request The request proto
697
- * @param {?Object<string, string>} metadata User defined
549
+ * @param {?Object<string, string>=} metadata User defined
698
550
  * call metadata
699
551
  * @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.ReceiveSignalStreamResponse>}
700
552
  * The XHR Node Readable Stream
@@ -13,7 +13,13 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = Function('return this')();
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
17
23
 
18
24
  var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
19
25
  goog.object.extend(proto, google_protobuf_wrappers_pb);
@@ -1,16 +1,16 @@
1
1
  export { AuthClient } from "../../client/AuthClient";
2
2
  export { RtcSignalingClient } from "../../client/RtcSignalingClient";
3
- export { Credentials } from "../../common/Credentials";
4
- export { IRtcStream } from "../../model/IRtcStream";
3
+ export { Credentials } from "../../client/Credentials";
5
4
  export { SignalingPromiseClient } from "../../protos/api/signaling/v1/signaling_grpc_web_pb";
6
- export { IRtcClientConfigurationV1 } from "../../rtc-client/models-v1/IRtcClientConfigurationV1";
7
- export { IRtcClientConfiguration } from "../../rtc-client/models/IRtcClientConfiguration";
8
- export { IRtcConnectionStatsInfo } from "../../rtc-client/models/IRtcConnectionStatsInfo";
9
- export { IRtcSendConfiguration } from "../../rtc-client/models/IRtcSendConfiguration";
10
- export { IRtcSessionMetricsMessageCounts } from "../../rtc-client/models/IRtcSessionMetricsMessageCounts";
11
- export { IRtcStreamMessage } from "../../rtc-client/models/IRtcStreamMessage";
12
- export { IRtcStreamPayload } from "../../rtc-client/models/IRtcStreamPayload";
13
- export { IStreamControl } from "../../rtc-client/models/IStreamControl";
14
5
  export { RtcClient } from "../../rtc-client/RtcClient";
15
6
  export { RtcClientV1 } from "../../rtc-client/RtcClientV1";
16
7
  export { createRtcStreamMessage } from "../../rtc-client/utils/createRtcStreamMessage";
8
+ export type { IRtcStream } from "../../model/IRtcStream";
9
+ export type { IRtcClientConfigurationV1 } from "../../rtc-client/models-v1/IRtcClientConfigurationV1";
10
+ export type { IRtcClientConfiguration } from "../../rtc-client/models/IRtcClientConfiguration";
11
+ export type { IRtcConnectionStatsInfo } from "../../rtc-client/models/IRtcConnectionStatsInfo";
12
+ export type { IRtcSendConfiguration } from "../../rtc-client/models/IRtcSendConfiguration";
13
+ export type { IRtcSessionMetricsMessageCounts } from "../../rtc-client/models/IRtcSessionMetricsMessageCounts";
14
+ export type { IRtcStreamMessage } from "../../rtc-client/models/IRtcStreamMessage";
15
+ export type { IRtcStreamPayload } from "../../rtc-client/models/IRtcStreamPayload";
16
+ export type { IStreamControl } from "../../rtc-client/models/IStreamControl";
@@ -0,0 +1,3 @@
1
+ export interface IHasPeerConnection {
2
+ peerConnection: RTCPeerConnection;
3
+ }
@@ -0,0 +1,4 @@
1
+ import { Uuid } from "../model/Uuid";
2
+ export interface IHasRemoteDeviceId {
3
+ getRemoteDeviceId(): Uuid | undefined;
4
+ }
@@ -3,7 +3,6 @@ import { IRtcPeer } from "../model/IRtcPeer";
3
3
  import { RtcConnectionStatus } from "../model/RtcConnectionStatus";
4
4
  import { Timestamp } from "../model/Timestamp";
5
5
  import { Uuid } from "../model/Uuid";
6
- import { RtcConnection } from "./RtcConnection";
7
6
  import { IPingInfo } from "./models/IPingInfo";
8
7
  import { IRtcClientConfiguration } from "./models/IRtcClientConfiguration";
9
8
  import { IRtcConnectionStatsInfo } from "./models/IRtcConnectionStatsInfo";
@@ -11,6 +10,7 @@ import { IRtcSendConfiguration } from "./models/IRtcSendConfiguration";
11
10
  import { IRtcSessionMetricsMessageCounts } from "./models/IRtcSessionMetricsMessageCounts";
12
11
  import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
13
12
  import { IStreamControl } from "./models/IStreamControl";
13
+ import { RtcConnection } from "./RtcConnection";
14
14
  /**
15
15
  * RtcClient to be used by browsers.
16
16
  */
@@ -30,6 +30,7 @@ export declare class RtcClient {
30
30
  private isOutgoingConnection;
31
31
  private peerDataChannelListeners;
32
32
  private rtcInstancesConstructed;
33
+ private statsLoopsExecuted;
33
34
  constructor(config: IRtcClientConfiguration);
34
35
  send(remotePeerId: Uuid, message: IRtcStreamMessage, config: IRtcSendConfiguration): void;
35
36
  controlRemoteStream(remotePeerId: Uuid, streamControl: IStreamControl): void;
@@ -62,6 +63,7 @@ export declare class RtcClient {
62
63
  private closeConnections;
63
64
  private getActiveConnection;
64
65
  private update;
66
+ private gatherConnectionStats;
65
67
  private reset;
66
68
  private updateIceServers;
67
69
  private setupHandlers;
@@ -1,6 +1,8 @@
1
1
  import { Timestamp } from "../model/Timestamp";
2
2
  import { Uuid } from "../model/Uuid";
3
3
  import { Signal } from "../protos/api/signaling/v1/signaling_pb";
4
+ import { IHasPeerConnection } from "./IHasPeerConnection";
5
+ import { IHasRemoteDeviceId } from "./IHasRemoteDeviceId";
4
6
  import { IPingInfo } from "./models/IPingInfo";
5
7
  import { IRtcConnectionConfiguration } from "./models/IRtcConnectionConfiguration";
6
8
  import { IRtcConnectionStatsInfo } from "./models/IRtcConnectionStatsInfo";
@@ -8,8 +10,8 @@ import { IRtcSendConfiguration } from "./models/IRtcSendConfiguration";
8
10
  import { IRtcSessionMetricsMessageCounts } from "./models/IRtcSessionMetricsMessageCounts";
9
11
  import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
10
12
  import { IStreamControl } from "./models/IStreamControl";
11
- export declare class RtcConnection {
12
- peerConnection: RTCPeerConnection;
13
+ export declare class RtcConnection implements IHasPeerConnection, IHasRemoteDeviceId {
14
+ private iceServers;
13
15
  private config;
14
16
  private dataChannelNotifier;
15
17
  private readonly connectTimeoutMs;
@@ -21,20 +23,16 @@ export declare class RtcConnection {
21
23
  private readonly reassemblyTimeoutMs;
22
24
  private readonly reassemblyTableCleanupMs;
23
25
  private readonly heartbeatTimeoutMs;
24
- private heartbeatChannel?;
25
- private latestTtlStreamChannel?;
26
- private reliableStreamChannel?;
27
- private latestReliableStreamChannel?;
28
- private latestTryOnceStreamChannel?;
26
+ private _peerConnection;
27
+ get peerConnection(): RTCPeerConnection;
28
+ private heartbeatChannel;
29
+ private latestTtlStreamChannel;
30
+ private reliableStreamChannel;
31
+ private latestReliableStreamChannel;
32
+ private latestTryOnceStreamChannel;
29
33
  private streamLatestTimestamp;
30
34
  private reassemblyTable;
31
35
  private reassemblyTableLastTimestamp;
32
- private reassemblyTableCleanupTimeout;
33
- private pingUpdateTimeout;
34
- private pingV2UpdateTimeout;
35
- private pingV2MetricsGatherTimeout;
36
- private streamsInfoUpdateTimeout;
37
- private heartbeatTimeout;
38
36
  private pingTimeMs;
39
37
  private lastMessageTimestamp;
40
38
  private sessionMetrics;
@@ -43,7 +41,13 @@ export declare class RtcConnection {
43
41
  private hasIceCandidate;
44
42
  private pingV2Map;
45
43
  private pingInfo;
46
- constructor(peerConnection: RTCPeerConnection, config: IRtcConnectionConfiguration, dataChannelNotifier: (channel: RTCDataChannel) => void);
44
+ private readonly reassemblyTableCleanupTimeout;
45
+ private readonly pingUpdateTimeout;
46
+ private readonly pingV2UpdateTimeout;
47
+ private readonly pingV2MetricsGatherTimeout;
48
+ private readonly streamsInfoUpdateTimeout;
49
+ private readonly heartbeatTimeout;
50
+ constructor(peerConnection: RTCPeerConnection, iceServers: RTCIceServer[], config: IRtcConnectionConfiguration, dataChannelNotifier: (channel: RTCDataChannel) => void);
47
51
  handleSignal(signal: Signal): Promise<Signal | undefined>;
48
52
  /**
49
53
  * Sends a message to the remote peer.
@@ -1,10 +1,11 @@
1
1
  import { IRtcSignal } from "../model/IRtcSignal";
2
+ import { IHasPeerConnection } from "./IHasPeerConnection";
2
3
  import { IRtcConnectionConfigurationV1 } from "./models-v1/IRtcConnectionConfigurationV1";
3
4
  import { IIceMode } from "./models/IIceMode";
4
5
  import { IRtcSendConfiguration } from "./models/IRtcSendConfiguration";
5
6
  import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
6
7
  import { IStreamControl } from "./models/IStreamControl";
7
- export declare class RtcConnectionV1 {
8
+ export declare class RtcConnectionV1 implements IHasPeerConnection {
8
9
  peerConnection: RTCPeerConnection;
9
10
  private config;
10
11
  iceMode?: IIceMode;
@@ -1,13 +1,14 @@
1
1
  import { Timestamp } from "../model/Timestamp";
2
+ import { IHasPeerConnection } from "./IHasPeerConnection";
3
+ import { IHasRemoteDeviceId } from "./IHasRemoteDeviceId";
2
4
  import { IRtcSessionMetricsMessageCounts } from "./models/IRtcSessionMetricsMessageCounts";
3
5
  import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
4
6
  import { IRtcStreamsInfo } from "./models/IRtcStreamsInfo";
5
- import { RtcConnection } from "./RtcConnection";
6
7
  export declare class RtcSessionMetrics {
7
- private sessionId;
8
- private connection;
9
8
  counts: IRtcSessionMetricsMessageCounts;
10
- constructor(sessionId: string, connection: RtcConnection);
9
+ private readonly sessionId;
10
+ private readonly connection;
11
+ constructor(sessionId: string, connection: IHasPeerConnection & IHasRemoteDeviceId);
11
12
  updateRemoteMessagesCounts(message: IRtcStreamMessage): void;
12
13
  getLocalStreamsInfo(timestamp: Timestamp): IRtcStreamsInfo;
13
14
  incrementLocalSent(message: IRtcStreamMessage): void;
@@ -1,12 +1,14 @@
1
+ import { IHasPeerConnection } from "./IHasPeerConnection";
1
2
  import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
2
- import { RtcConnectionV1 } from "./RtcConnectionV1";
3
+ type IRtcConnectionV1 = IHasPeerConnection;
3
4
  export declare class RtcSessionMetricsV1 {
4
- private sessionId;
5
- private connection;
6
- private sentMessagesCounts;
7
- private receivedMessagesCounts;
8
- constructor(sessionId: string, connection: RtcConnectionV1);
5
+ private readonly sentMessagesCounts;
6
+ private readonly receivedMessagesCounts;
7
+ private readonly sessionId;
8
+ private readonly connection;
9
+ constructor(sessionId: string, connection: IRtcConnectionV1);
9
10
  incrementMessageSent(message: IRtcStreamMessage): void;
10
11
  incrementMessageReceived(message: IRtcStreamMessage): void;
11
12
  uploadMetrics(): Promise<void>;
12
13
  }
14
+ export {};
@@ -8,8 +8,8 @@ export interface IPingPong {
8
8
  sent: Timestamp;
9
9
  received: Timestamp;
10
10
  }
11
- export declare type PingValue = IPing | IPingPong;
12
- export declare type PingMap = Map<Uuid, PingValue>;
11
+ export type PingValue = IPing | IPingPong;
12
+ export type PingMap = Map<Uuid, PingValue>;
13
13
  interface IGatherPingV2MetricsOptions {
14
14
  temporalNow?: number;
15
15
  }
@@ -1 +1 @@
1
- export declare type IIceMode = "local" | "STUN" | "TURN";
1
+ export type IIceMode = "local" | "STUN" | "TURN";
@@ -3,7 +3,7 @@ import { Uuid } from "../../model/Uuid";
3
3
  import { SignalingPromiseClient } from "../../protos/api/signaling/v1/signaling_grpc_web_pb";
4
4
  import { SessionType } from "../../protos/api/signaling/v1/signaling_pb";
5
5
  import { IRtcStreamMessage } from "./IRtcStreamMessage";
6
- export declare type IRtcClientConfiguration = {
6
+ export type IRtcClientConfiguration = {
7
7
  receive: (peerId: Uuid, message: IRtcStreamMessage) => void;
8
8
  onStreamsInfoUpdate?: (peerId: Uuid, timestamp: Timestamp) => void;
9
9
  alternateRTCPeerConnection?: typeof RTCPeerConnection;
@@ -1,6 +1,6 @@
1
1
  import { IRtcConnectionBaseConfiguration } from "./IRtcConnectionBaseConfiguration";
2
2
  import { IRtcConnectionRemoteConfiguration } from "./IRtcConnectionRemoteConfiguration";
3
- export declare type IRtcConnectionConfiguration = {
3
+ export type IRtcConnectionConfiguration = {
4
4
  baseConfig: IRtcConnectionBaseConfiguration;
5
5
  remoteConfig?: IRtcConnectionRemoteConfiguration;
6
6
  };
@@ -5,6 +5,7 @@ import { IH264VideoFrame } from "../../model/IH264VideoFrame";
5
5
  import { IJointState } from "../../model/IJointState";
6
6
  import { IJsonString } from "../../model/IJsonString";
7
7
  import { IMarker3DArray } from "../../model/IMarker3DArray";
8
+ import { IOdometry } from "../../model/IOdometry";
8
9
  import { IPoint } from "../../model/IPoint";
9
10
  import { IPoseWithCovariance } from "../../model/IPoseWithCovariance";
10
11
  import { ITransform } from "../../model/ITransform";
@@ -45,4 +46,5 @@ export interface IRtcStreamPayload {
45
46
  point?: IPoint;
46
47
  markerArray?: IMarker3DArray;
47
48
  jsonString?: IJsonString;
49
+ odometry?: IOdometry;
48
50
  }
@@ -1,6 +1,6 @@
1
1
  export declare const rtcPipelineType = "rtc";
2
2
  export declare const telemetryPipelineType = "telemetry";
3
- export declare type IStreamControl = IRtcStreamControl | ITelemetryStreamControl | IDegradeVideoStreamControl | IAudioStreamControl | ISetLowBandwidthMode;
3
+ export type IStreamControl = IRtcStreamControl | ITelemetryStreamControl | IDegradeVideoStreamControl | IAudioStreamControl | ISetLowBandwidthMode;
4
4
  export interface IStreamControlBase {
5
5
  streamName: string;
6
6
  }
@@ -1,2 +1,2 @@
1
1
  import { rtcChannelLabels } from "./rtcChannelLabels";
2
- export declare type RtcChannelLabel = (typeof rtcChannelLabels)[number];
2
+ export type RtcChannelLabel = (typeof rtcChannelLabels)[number];
@@ -1 +1 @@
1
- export declare type RtcCommunicationType = "message" | "message-chunk";
1
+ export type RtcCommunicationType = "message" | "message-chunk";