@stream-io/video-client 0.7.0 → 0.7.2

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.
@@ -472,7 +472,9 @@ export interface CallEndedEvent {
472
472
  */
473
473
  user?: UserResponse;
474
474
  }
475
+
475
476
  /**
477
+ *
476
478
  * @export
477
479
  * @interface CallEvent
478
480
  */
@@ -483,6 +485,12 @@ export interface CallEvent {
483
485
  * @memberof CallEvent
484
486
  */
485
487
  description: string;
488
+ /**
489
+ *
490
+ * @type {number}
491
+ * @memberof CallEvent
492
+ */
493
+ end_timestamp: number;
486
494
  /**
487
495
  *
488
496
  * @type {number}
@@ -502,6 +510,7 @@ export interface CallEvent {
502
510
  */
503
511
  type: string;
504
512
  }
513
+
505
514
  /**
506
515
  * This event is sent when HLS broadcasting has failed
507
516
  * @export
@@ -1654,41 +1663,47 @@ export interface CallStateResponseFields {
1654
1663
  own_capabilities: Array<OwnCapability>;
1655
1664
  }
1656
1665
  /**
1657
- * CallTranscription represents a transcription of a call.
1666
+ *
1658
1667
  * @export
1659
1668
  * @interface CallStatsReportSummaryResponse
1660
1669
  */
1661
1670
  export interface CallStatsReportSummaryResponse {
1662
1671
  /**
1663
1672
  *
1664
- * @type {number}
1673
+ * @type {string}
1665
1674
  * @memberof CallStatsReportSummaryResponse
1666
1675
  */
1667
- app_pk: number;
1676
+ call_cid: string;
1668
1677
  /**
1669
1678
  *
1670
1679
  * @type {string}
1671
1680
  * @memberof CallStatsReportSummaryResponse
1672
1681
  */
1673
- call_cid: string;
1682
+ call_session_id: string;
1674
1683
  /**
1675
1684
  *
1676
1685
  * @type {string}
1677
1686
  * @memberof CallStatsReportSummaryResponse
1678
1687
  */
1679
- call_session_id: string;
1688
+ call_status: string;
1680
1689
  /**
1681
1690
  *
1682
1691
  * @type {string}
1683
1692
  * @memberof CallStatsReportSummaryResponse
1684
1693
  */
1685
- call_status: string;
1694
+ created_at?: string;
1686
1695
  /**
1687
1696
  *
1688
1697
  * @type {string}
1689
1698
  * @memberof CallStatsReportSummaryResponse
1690
1699
  */
1691
1700
  first_stats_time: string;
1701
+ /**
1702
+ *
1703
+ * @type {number}
1704
+ * @memberof CallStatsReportSummaryResponse
1705
+ */
1706
+ quality_score?: number;
1692
1707
  }
1693
1708
  /**
1694
1709
  *
@@ -2084,6 +2099,64 @@ export interface ClosedCaptionEvent {
2084
2099
  */
2085
2100
  type: string;
2086
2101
  }
2102
+
2103
+ /**
2104
+ *
2105
+ * @export
2106
+ * @interface CollectUserFeedbackRequest
2107
+ */
2108
+ export interface CollectUserFeedbackRequest {
2109
+ /**
2110
+ *
2111
+ * @type {object}
2112
+ * @memberof CollectUserFeedbackRequest
2113
+ */
2114
+ custom?: { [key:string]: any };
2115
+ /**
2116
+ *
2117
+ * @type {number}
2118
+ * @memberof CollectUserFeedbackRequest
2119
+ */
2120
+ rating?: number;
2121
+ /**
2122
+ *
2123
+ * @type {string}
2124
+ * @memberof CollectUserFeedbackRequest
2125
+ */
2126
+ reason?: string;
2127
+ /**
2128
+ *
2129
+ * @type {string}
2130
+ * @memberof CollectUserFeedbackRequest
2131
+ */
2132
+ sdk: string;
2133
+ /**
2134
+ *
2135
+ * @type {string}
2136
+ * @memberof CollectUserFeedbackRequest
2137
+ */
2138
+ sdk_version: string;
2139
+ /**
2140
+ *
2141
+ * @type {string}
2142
+ * @memberof CollectUserFeedbackRequest
2143
+ */
2144
+ user_session_id: string;
2145
+ }
2146
+ /**
2147
+ *
2148
+ * @export
2149
+ * @interface CollectUserFeedbackResponse
2150
+ */
2151
+ export interface CollectUserFeedbackResponse {
2152
+ /**
2153
+ * Duration of the request in human-readable format
2154
+ * @type {string}
2155
+ * @memberof CollectUserFeedbackResponse
2156
+ */
2157
+ duration: string;
2158
+ }
2159
+
2087
2160
  /**
2088
2161
  *
2089
2162
  * @export
@@ -2563,6 +2636,51 @@ export interface GeofenceSettingsRequest {
2563
2636
  */
2564
2637
  names?: Array<string>;
2565
2638
  }
2639
+
2640
+ /**
2641
+ *
2642
+ * @export
2643
+ * @interface GeolocationResult
2644
+ */
2645
+ export interface GeolocationResult {
2646
+ /**
2647
+ *
2648
+ * @type {number}
2649
+ * @memberof GeolocationResult
2650
+ */
2651
+ accuracy_radius: number;
2652
+ /**
2653
+ *
2654
+ * @type {string}
2655
+ * @memberof GeolocationResult
2656
+ */
2657
+ continent_code: string;
2658
+ /**
2659
+ *
2660
+ * @type {string}
2661
+ * @memberof GeolocationResult
2662
+ */
2663
+ country_iso_code: string;
2664
+ /**
2665
+ *
2666
+ * @type {number}
2667
+ * @memberof GeolocationResult
2668
+ */
2669
+ latitude: number;
2670
+ /**
2671
+ *
2672
+ * @type {number}
2673
+ * @memberof GeolocationResult
2674
+ */
2675
+ longitude: number;
2676
+ /**
2677
+ *
2678
+ * @type {string}
2679
+ * @memberof GeolocationResult
2680
+ */
2681
+ subdivision_iso_code: string;
2682
+ }
2683
+
2566
2684
  /**
2567
2685
  *
2568
2686
  * @export
@@ -2636,6 +2754,18 @@ export interface GetCallStatsResponse {
2636
2754
  * @memberof GetCallStatsResponse
2637
2755
  */
2638
2756
  duration: string;
2757
+ /**
2758
+ *
2759
+ * @type {number}
2760
+ * @memberof GetCallStatsResponse
2761
+ */
2762
+ max_jitter: number;
2763
+ /**
2764
+ *
2765
+ * @type {number}
2766
+ * @memberof GetCallStatsResponse
2767
+ */
2768
+ max_latency: number;
2639
2769
  /**
2640
2770
  *
2641
2771
  * @type {number}
@@ -4205,6 +4335,33 @@ export interface StopTranscriptionResponse {
4205
4335
  */
4206
4336
  duration: string;
4207
4337
  }
4338
+
4339
+ /**
4340
+ *
4341
+ * @export
4342
+ * @interface Subsession
4343
+ */
4344
+ export interface Subsession {
4345
+ /**
4346
+ *
4347
+ * @type {number}
4348
+ * @memberof Subsession
4349
+ */
4350
+ ended_at: number;
4351
+ /**
4352
+ *
4353
+ * @type {number}
4354
+ * @memberof Subsession
4355
+ */
4356
+ joined_at: number;
4357
+ /**
4358
+ *
4359
+ * @type {string}
4360
+ * @memberof Subsession
4361
+ */
4362
+ sfu_id: string;
4363
+ }
4364
+
4208
4365
  /**
4209
4366
  *
4210
4367
  * @export
@@ -4770,16 +4927,59 @@ export interface UserResponse {
4770
4927
  }
4771
4928
 
4772
4929
  /**
4930
+ *
4773
4931
  * @export
4774
4932
  * @interface UserSessionStats
4775
4933
  */
4776
4934
  export interface UserSessionStats {
4935
+ /**
4936
+ *
4937
+ * @type {string}
4938
+ * @memberof UserSessionStats
4939
+ */
4940
+ browser?: string;
4941
+ /**
4942
+ *
4943
+ * @type {string}
4944
+ * @memberof UserSessionStats
4945
+ */
4946
+ browser_version?: string;
4947
+ /**
4948
+ *
4949
+ * @type {string}
4950
+ * @memberof UserSessionStats
4951
+ */
4952
+ current_ip?: string;
4953
+ /**
4954
+ *
4955
+ * @type {string}
4956
+ * @memberof UserSessionStats
4957
+ */
4958
+ current_sfu?: string;
4959
+ /**
4960
+ *
4961
+ * @type {string}
4962
+ * @memberof UserSessionStats
4963
+ */
4964
+ device_model?: string;
4965
+ /**
4966
+ *
4967
+ * @type {string}
4968
+ * @memberof UserSessionStats
4969
+ */
4970
+ device_version?: string;
4777
4971
  /**
4778
4972
  *
4779
4973
  * @type {number}
4780
4974
  * @memberof UserSessionStats
4781
4975
  */
4782
4976
  freeze_duration_seconds: number;
4977
+ /**
4978
+ *
4979
+ * @type {GeolocationResult}
4980
+ * @memberof UserSessionStats
4981
+ */
4982
+ geolocation?: GeolocationResult;
4783
4983
  /**
4784
4984
  *
4785
4985
  * @type {Stats}
@@ -4792,18 +4992,72 @@ export interface UserSessionStats {
4792
4992
  * @memberof UserSessionStats
4793
4993
  */
4794
4994
  latency?: Stats;
4995
+ /**
4996
+ *
4997
+ * @type {number}
4998
+ * @memberof UserSessionStats
4999
+ */
5000
+ max_fir_per_minute?: number;
5001
+ /**
5002
+ *
5003
+ * @type {number}
5004
+ * @memberof UserSessionStats
5005
+ */
5006
+ max_freezes_per_minute?: number;
5007
+ /**
5008
+ *
5009
+ * @type {number}
5010
+ * @memberof UserSessionStats
5011
+ */
5012
+ max_nack_per_minute?: number;
5013
+ /**
5014
+ *
5015
+ * @type {number}
5016
+ * @memberof UserSessionStats
5017
+ */
5018
+ max_pli_per_minute?: number;
5019
+ /**
5020
+ *
5021
+ * @type {VideoQuality}
5022
+ * @memberof UserSessionStats
5023
+ */
5024
+ max_publishing_video_quality?: VideoQuality;
5025
+ /**
5026
+ *
5027
+ * @type {VideoQuality}
5028
+ * @memberof UserSessionStats
5029
+ */
5030
+ max_receiving_video_quality?: VideoQuality;
5031
+ /**
5032
+ *
5033
+ * @type {string}
5034
+ * @memberof UserSessionStats
5035
+ */
5036
+ os?: string;
4795
5037
  /**
4796
5038
  *
4797
5039
  * @type {string}
4798
5040
  * @memberof UserSessionStats
4799
5041
  */
4800
- os: string;
5042
+ os_version?: string;
4801
5043
  /**
4802
5044
  *
4803
5045
  * @type {number}
4804
5046
  * @memberof UserSessionStats
4805
5047
  */
4806
5048
  packet_loss_fraction: number;
5049
+ /**
5050
+ *
5051
+ * @type {string}
5052
+ * @memberof UserSessionStats
5053
+ */
5054
+ publishing_audio_codec?: string;
5055
+ /**
5056
+ *
5057
+ * @type {number}
5058
+ * @memberof UserSessionStats
5059
+ */
5060
+ publishing_duration_seconds: number;
4807
5061
  /**
4808
5062
  *
4809
5063
  * @type {number}
@@ -4815,25 +5069,55 @@ export interface UserSessionStats {
4815
5069
  * @type {string}
4816
5070
  * @memberof UserSessionStats
4817
5071
  */
4818
- sdk: string;
5072
+ receiving_audio_codec?: string;
5073
+ /**
5074
+ *
5075
+ * @type {number}
5076
+ * @memberof UserSessionStats
5077
+ */
5078
+ receiving_duration_seconds: number;
4819
5079
  /**
4820
5080
  *
4821
5081
  * @type {string}
4822
5082
  * @memberof UserSessionStats
4823
5083
  */
4824
- sdk_version: string;
5084
+ sdk?: string;
5085
+ /**
5086
+ *
5087
+ * @type {string}
5088
+ * @memberof UserSessionStats
5089
+ */
5090
+ sdk_version?: string;
5091
+ /**
5092
+ *
5093
+ * @type {Array<Subsession>}
5094
+ * @memberof UserSessionStats
5095
+ */
5096
+ subsessions?: Array<Subsession>;
4825
5097
  /**
4826
5098
  *
4827
5099
  * @type {CallTimeline}
4828
5100
  * @memberof UserSessionStats
4829
5101
  */
4830
5102
  timeline?: CallTimeline;
5103
+ /**
5104
+ *
5105
+ * @type {number}
5106
+ * @memberof UserSessionStats
5107
+ */
5108
+ total_pixels_in: number;
5109
+ /**
5110
+ *
5111
+ * @type {number}
5112
+ * @memberof UserSessionStats
5113
+ */
5114
+ total_pixels_out: number;
4831
5115
  /**
4832
5116
  *
4833
5117
  * @type {string}
4834
5118
  * @memberof UserSessionStats
4835
5119
  */
4836
- webrtc_version: string;
5120
+ webrtc_version?: string;
4837
5121
  }
4838
5122
  /**
4839
5123
  *
@@ -4952,6 +5236,40 @@ export const VideoSettingsRequestCameraFacingEnum = {
4952
5236
  export type VideoSettingsRequestCameraFacingEnum =
4953
5237
  (typeof VideoSettingsRequestCameraFacingEnum)[keyof typeof VideoSettingsRequestCameraFacingEnum];
4954
5238
 
5239
+ /**
5240
+ *
5241
+ * @export
5242
+ * @interface VideoQuality
5243
+ */
5244
+ export interface VideoQuality {
5245
+ /**
5246
+ *
5247
+ * @type {VideoResolution}
5248
+ * @memberof VideoQuality
5249
+ */
5250
+ resolution: VideoResolution;
5251
+ }
5252
+
5253
+ /**
5254
+ *
5255
+ * @export
5256
+ * @interface VideoResolution
5257
+ */
5258
+ export interface VideoResolution {
5259
+ /**
5260
+ *
5261
+ * @type {number}
5262
+ * @memberof VideoResolution
5263
+ */
5264
+ height: number;
5265
+ /**
5266
+ *
5267
+ * @type {number}
5268
+ * @memberof VideoResolution
5269
+ */
5270
+ width: number;
5271
+ }
5272
+
4955
5273
  /**
4956
5274
  *
4957
5275
  * @export
@@ -1,3 +1,6 @@
1
+ import { LocalClientDetailsType } from '../client-details';
2
+ import { SdkType } from '../gen/video/sfu/models/models';
3
+
1
4
  /**
2
5
  * Flatten the stats report into an array of stats objects.
3
6
  *
@@ -10,3 +13,23 @@ export const flatten = (report: RTCStatsReport) => {
10
13
  });
11
14
  return stats;
12
15
  };
16
+
17
+ export const getSdkSignature = (clientDetails: LocalClientDetailsType) => {
18
+ const { sdk, ...platform } = clientDetails;
19
+ const sdkName =
20
+ sdk && sdk.type === SdkType.REACT
21
+ ? 'stream-react'
22
+ : sdk && sdk.type === SdkType.REACT_NATIVE
23
+ ? 'stream-react-native'
24
+ : 'stream-js';
25
+
26
+ const sdkVersion = sdk
27
+ ? `${sdk.major}.${sdk.minor}.${sdk.patch}`
28
+ : '0.0.0-development';
29
+
30
+ return {
31
+ sdkName,
32
+ sdkVersion,
33
+ ...platform,
34
+ };
35
+ };