@pexip/peer-connection-stats 18.5.4 → 18.6.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.
- package/CHANGELOG.md +19 -0
- package/api-docs/functions/addDeltaStats.mdx +27 -9
- package/api-docs/functions/calculateQuality.mdx +1 -1
- package/api-docs/functions/statsFrom.mdx +3 -1
- package/api-docs/functions/statsFromRTCPeer.mdx +5 -3
- package/api-docs/interfaces/CandidatePair.mdx +1 -1
- package/api-docs/interfaces/Codec.mdx +1 -1
- package/api-docs/interfaces/MediaSource.mdx +1 -1
- package/api-docs/interfaces/Metrics.mdx +2 -2
- package/api-docs/interfaces/OutboundVideo.mdx +1 -1
- package/api-docs/interfaces/RTCStats.mdx +1 -1
- package/api-docs/interfaces/Remote.mdx +1 -1
- package/api-docs/interfaces/StatsCollector.mdx +2 -2
- package/api-docs/interfaces/StatsCollectorOptions.mdx +1 -1
- package/api-docs/interfaces/Stream.mdx +1 -1
- package/api-docs/interfaces/Track.mdx +1 -1
- package/api-docs/interfaces/Transport.mdx +1 -1
- package/api-docs/interfaces/VideoMetrics.mdx +2 -2
- package/package.json +8 -8
- package/dist/tsconfig.build.tsbuildinfo +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 18.6.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [44ad859]
|
|
8
|
+
- Updated dependencies [514c523]
|
|
9
|
+
- @pexip/utils@17.4.0
|
|
10
|
+
|
|
11
|
+
## 18.5.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- fb41d4d: Changes related to Typescript V6 Upgrade
|
|
16
|
+
- Updated dependencies [498ff3b]
|
|
17
|
+
- Updated dependencies [fb41d4d]
|
|
18
|
+
- Updated dependencies [b99c070]
|
|
19
|
+
- @pexip/utils@17.3.0
|
|
20
|
+
- @pexip/signal@16.9.5
|
|
21
|
+
|
|
3
22
|
## 18.5.4
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -82,8 +82,12 @@ function addDeltaStats(newStats, cache): readonly [
|
|
|
82
82
|
|
|
83
83
|
readonly \[
|
|
84
84
|
\| \{
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
```ts
|
|
86
|
+
type: "inbound-rtp" | "outbound-rtp";
|
|
87
|
+
```
|
|
88
|
+
```ts
|
|
89
|
+
kind: "audio" | "video";
|
|
90
|
+
```
|
|
87
91
|
`bitrate?`: `number`;
|
|
88
92
|
`bytesTransmitted?`: `number`;
|
|
89
93
|
`codec?`: `string`;
|
|
@@ -98,8 +102,12 @@ readonly \[
|
|
|
98
102
|
`quality?`: [`Quality`](../enumerations/Quality.mdx);
|
|
99
103
|
\}
|
|
100
104
|
\| \{
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
```ts
|
|
106
|
+
type: "inbound-rtp" | "outbound-rtp";
|
|
107
|
+
```
|
|
108
|
+
```ts
|
|
109
|
+
kind: "audio" | "video";
|
|
110
|
+
```
|
|
103
111
|
`bitrate?`: `number`;
|
|
104
112
|
`bytesTransmitted?`: `number`;
|
|
105
113
|
`codec?`: `string`;
|
|
@@ -120,8 +128,12 @@ readonly \[
|
|
|
120
128
|
`averageDecodeTime?`: `number`;
|
|
121
129
|
\}
|
|
122
130
|
\| \{
|
|
123
|
-
|
|
124
|
-
|
|
131
|
+
```ts
|
|
132
|
+
type: "inbound-rtp" | "outbound-rtp";
|
|
133
|
+
```
|
|
134
|
+
```ts
|
|
135
|
+
kind: "audio" | "video";
|
|
136
|
+
```
|
|
125
137
|
`bitrate?`: `number`;
|
|
126
138
|
`bytesTransmitted?`: `number`;
|
|
127
139
|
`codec?`: `string`;
|
|
@@ -142,11 +154,17 @@ readonly \[
|
|
|
142
154
|
`totalPacketSendDelay?`: `number`;
|
|
143
155
|
`averagePacketSendDelay?`: `number`;
|
|
144
156
|
`averageEncodeTime?`: `number`;
|
|
145
|
-
|
|
146
|
-
|
|
157
|
+
```ts
|
|
158
|
+
qualityLimitationReason?: "cpu" | "bandwidth" | "other" | "none";
|
|
159
|
+
```
|
|
160
|
+
```ts
|
|
161
|
+
qualityLimitationDurations?: {
|
|
162
|
+
```
|
|
147
163
|
`cpu?`: `number`;
|
|
148
164
|
`bandwidth?`: `number`;
|
|
149
165
|
`other?`: `number`;
|
|
150
166
|
`none?`: `number`;
|
|
151
167
|
\};
|
|
152
|
-
|
|
168
|
+
```ts
|
|
169
|
+
}, Quality, CallQualityStats]
|
|
170
|
+
```
|
|
@@ -19,9 +19,11 @@ https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpStreamStats
|
|
|
19
19
|
|
|
20
20
|
| Parameter | Type |
|
|
21
21
|
| ------ | ------ |
|
|
22
|
-
| `rtcPeer` |
|
|
23
|
-
| `rtcPeer.getStats` | (
|
|
22
|
+
| `rtcPeer` | `{ getStats: (selector?) => Promise<RTCStatsReport>; }` |
|
|
23
|
+
| `rtcPeer.getStats` | `(selector?) => Promise<RTCStatsReport>` |
|
|
24
24
|
|
|
25
25
|
## Returns
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
```ts
|
|
28
|
+
Promise<NormalizedRTCStats>
|
|
29
|
+
```
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| Property | Type | Overrides | Inherited from |
|
|
14
14
|
| ------ | ------ | ------ | ------ |
|
|
15
15
|
| <a id="id"></a> `id` | `string` | - | [`RTCStats`](RTCStats.mdx).[`id`](RTCStats.mdx#id) |
|
|
16
|
-
| <a id="kind"></a> `kind?` | `"audio"
|
|
16
|
+
| <a id="kind"></a> `kind?` | `"audio" \| "video"` | - | [`RTCStats`](RTCStats.mdx).[`kind`](RTCStats.mdx#kind) |
|
|
17
17
|
| <a id="timestamp"></a> `timestamp?` | `number` | - | [`RTCStats`](RTCStats.mdx).[`timestamp`](RTCStats.mdx#timestamp) |
|
|
18
18
|
| <a id="type"></a> `type` | `"candidate-pair"` | [`RTCStats`](RTCStats.mdx).[`type`](RTCStats.mdx#type) | - |
|
|
19
19
|
| <a id="availableincomingbitrate"></a> `availableIncomingBitrate?` | `number` | - | - |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| Property | Type | Overrides | Inherited from |
|
|
14
14
|
| ------ | ------ | ------ | ------ |
|
|
15
15
|
| <a id="id"></a> `id` | `string` | - | [`RTCStats`](RTCStats.mdx).[`id`](RTCStats.mdx#id) |
|
|
16
|
-
| <a id="kind"></a> `kind?` | `"audio"
|
|
16
|
+
| <a id="kind"></a> `kind?` | `"audio" \| "video"` | - | [`RTCStats`](RTCStats.mdx).[`kind`](RTCStats.mdx#kind) |
|
|
17
17
|
| <a id="timestamp"></a> `timestamp?` | `number` | - | [`RTCStats`](RTCStats.mdx).[`timestamp`](RTCStats.mdx#timestamp) |
|
|
18
18
|
| <a id="type"></a> `type` | `"codec"` | [`RTCStats`](RTCStats.mdx).[`type`](RTCStats.mdx#type) | - |
|
|
19
19
|
| <a id="mimetype"></a> `mimeType?` | `string` | - | - |
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
| <a id="id"></a> `id` | `string` | - | [`RTCStats`](RTCStats.mdx).[`id`](RTCStats.mdx#id) |
|
|
16
16
|
| <a id="timestamp"></a> `timestamp?` | `number` | - | [`RTCStats`](RTCStats.mdx).[`timestamp`](RTCStats.mdx#timestamp) |
|
|
17
17
|
| <a id="type"></a> `type` | `"media-source"` | [`RTCStats`](RTCStats.mdx).[`type`](RTCStats.mdx#type) | - |
|
|
18
|
-
| <a id="kind"></a> `kind` | `"audio"
|
|
18
|
+
| <a id="kind"></a> `kind` | `"audio" \| "video"` | [`RTCStats`](RTCStats.mdx).[`kind`](RTCStats.mdx#kind) | - |
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
| Property | Type |
|
|
8
8
|
| ------ | ------ |
|
|
9
|
-
| <a id="type"></a> `type` | `"inbound-rtp"
|
|
10
|
-
| <a id="kind"></a> `kind` | `"audio"
|
|
9
|
+
| <a id="type"></a> `type` | `"inbound-rtp" \| "outbound-rtp"` |
|
|
10
|
+
| <a id="kind"></a> `kind` | `"audio" \| "video"` |
|
|
11
11
|
| <a id="bitrate"></a> `bitrate?` | `number` |
|
|
12
12
|
| <a id="bytestransmitted"></a> `bytesTransmitted?` | `number` |
|
|
13
13
|
| <a id="codec"></a> `codec?` | `string` |
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
| <a id="framesencoded"></a> `framesEncoded?` | `number` | - | - |
|
|
33
33
|
| <a id="bitratemean"></a> `bitrateMean?` | `number` | - | - |
|
|
34
34
|
| <a id="frameratemean"></a> `framerateMean?` | `number` | - | - |
|
|
35
|
-
| <a id="qualitylimitationreason"></a> `qualityLimitationReason?` | `"cpu"
|
|
35
|
+
| <a id="qualitylimitationreason"></a> `qualityLimitationReason?` | `"cpu" \| "bandwidth" \| "other" \| "none"` | - | - |
|
|
36
36
|
| <a id="qualitylimitationdurations"></a> `qualityLimitationDurations?` | `object` | - | - |
|
|
37
37
|
| `qualityLimitationDurations.cpu?` | `number` | - | - |
|
|
38
38
|
| `qualityLimitationDurations.bandwidth?` | `number` | - | - |
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
| ------ | ------ |
|
|
25
25
|
| <a id="id"></a> `id` | `string` |
|
|
26
26
|
| <a id="type"></a> `type` | `string` |
|
|
27
|
-
| <a id="kind"></a> `kind?` | `"audio"
|
|
27
|
+
| <a id="kind"></a> `kind?` | `"audio" \| "video"` |
|
|
28
28
|
| <a id="timestamp"></a> `timestamp?` | `number` |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| Property | Type | Overrides | Inherited from |
|
|
14
14
|
| ------ | ------ | ------ | ------ |
|
|
15
15
|
| <a id="id"></a> `id` | `string` | - | [`RTCStats`](RTCStats.mdx).[`id`](RTCStats.mdx#id) |
|
|
16
|
-
| <a id="kind"></a> `kind?` | `"audio"
|
|
16
|
+
| <a id="kind"></a> `kind?` | `"audio" \| "video"` | - | [`RTCStats`](RTCStats.mdx).[`kind`](RTCStats.mdx#kind) |
|
|
17
17
|
| <a id="timestamp"></a> `timestamp?` | `number` | - | [`RTCStats`](RTCStats.mdx).[`timestamp`](RTCStats.mdx#timestamp) |
|
|
18
18
|
| <a id="type"></a> `type` | `"remote-inbound-rtp"` | [`RTCStats`](RTCStats.mdx).[`type`](RTCStats.mdx#type) | - |
|
|
19
19
|
| <a id="jitter"></a> `jitter?` | `number` | - | - |
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
| Property | Type |
|
|
4
4
|
| ------ | ------ |
|
|
5
|
-
| <a id="resetstats"></a> `resetStats` | () => () =>
|
|
6
|
-
| <a id="cleanup"></a> `cleanup` | () =>
|
|
5
|
+
| <a id="resetstats"></a> `resetStats` | `() => () => void` |
|
|
6
|
+
| <a id="cleanup"></a> `cleanup` | `() => void` |
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
| Property | Type |
|
|
4
4
|
| ------ | ------ |
|
|
5
5
|
| <a id="input"></a> `input` | `object` |
|
|
6
|
-
| `input.getStats` | (
|
|
6
|
+
| `input.getStats` | `(selector?) => Promise<RTCStatsReport>` |
|
|
7
7
|
| <a id="signals"></a> `signals` | [`StatsSignals`](StatsSignals.mdx) |
|
|
8
8
|
| <a id="interval"></a> `interval?` | `number` |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| Property | Type | Overrides | Inherited from |
|
|
14
14
|
| ------ | ------ | ------ | ------ |
|
|
15
15
|
| <a id="id"></a> `id` | `string` | - | [`RTCStats`](RTCStats.mdx).[`id`](RTCStats.mdx#id) |
|
|
16
|
-
| <a id="kind"></a> `kind?` | `"audio"
|
|
16
|
+
| <a id="kind"></a> `kind?` | `"audio" \| "video"` | - | [`RTCStats`](RTCStats.mdx).[`kind`](RTCStats.mdx#kind) |
|
|
17
17
|
| <a id="timestamp"></a> `timestamp?` | `number` | - | [`RTCStats`](RTCStats.mdx).[`timestamp`](RTCStats.mdx#timestamp) |
|
|
18
18
|
| <a id="type"></a> `type` | `"stream"` | [`RTCStats`](RTCStats.mdx).[`type`](RTCStats.mdx#type) | - |
|
|
19
19
|
| <a id="tracks"></a> `tracks?` | [`Track`](Track.mdx)[] | - | - |
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
| <a id="id"></a> `id` | `string` | - | [`RTCStats`](RTCStats.mdx).[`id`](RTCStats.mdx#id) |
|
|
16
16
|
| <a id="timestamp"></a> `timestamp?` | `number` | - | [`RTCStats`](RTCStats.mdx).[`timestamp`](RTCStats.mdx#timestamp) |
|
|
17
17
|
| <a id="type"></a> `type` | `"track"` | [`RTCStats`](RTCStats.mdx).[`type`](RTCStats.mdx#type) | - |
|
|
18
|
-
| <a id="kind"></a> `kind` | `"audio"
|
|
18
|
+
| <a id="kind"></a> `kind` | `"audio" \| "video"` | [`RTCStats`](RTCStats.mdx).[`kind`](RTCStats.mdx#kind) | - |
|
|
19
19
|
| <a id="mediasource"></a> `mediaSource?` | [`MediaSource`](MediaSource.mdx) | - | - |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
| Property | Type | Overrides | Inherited from |
|
|
14
14
|
| ------ | ------ | ------ | ------ |
|
|
15
15
|
| <a id="id"></a> `id` | `string` | - | [`RTCStats`](RTCStats.mdx).[`id`](RTCStats.mdx#id) |
|
|
16
|
-
| <a id="kind"></a> `kind?` | `"audio"
|
|
16
|
+
| <a id="kind"></a> `kind?` | `"audio" \| "video"` | - | [`RTCStats`](RTCStats.mdx).[`kind`](RTCStats.mdx#kind) |
|
|
17
17
|
| <a id="timestamp"></a> `timestamp?` | `number` | - | [`RTCStats`](RTCStats.mdx).[`timestamp`](RTCStats.mdx#timestamp) |
|
|
18
18
|
| <a id="type"></a> `type` | `"transport"` | [`RTCStats`](RTCStats.mdx).[`type`](RTCStats.mdx#type) | - |
|
|
19
19
|
| <a id="selectedcandidatepair"></a> `selectedCandidatePair?` | [`CandidatePair`](CandidatePair.mdx) | - | - |
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
| Property | Type | Inherited from |
|
|
8
8
|
| ------ | ------ | ------ |
|
|
9
|
-
| <a id="type"></a> `type` | `"inbound-rtp"
|
|
10
|
-
| <a id="kind"></a> `kind` | `"audio"
|
|
9
|
+
| <a id="type"></a> `type` | `"inbound-rtp" \| "outbound-rtp"` | [`Metrics`](Metrics.mdx).[`type`](Metrics.mdx#type) |
|
|
10
|
+
| <a id="kind"></a> `kind` | `"audio" \| "video"` | [`Metrics`](Metrics.mdx).[`kind`](Metrics.mdx#kind) |
|
|
11
11
|
| <a id="bitrate"></a> `bitrate?` | `number` | [`Metrics`](Metrics.mdx).[`bitrate`](Metrics.mdx#bitrate) |
|
|
12
12
|
| <a id="bytestransmitted"></a> `bytesTransmitted?` | `number` | [`Metrics`](Metrics.mdx).[`bytesTransmitted`](Metrics.mdx#bytestransmitted) |
|
|
13
13
|
| <a id="codec"></a> `codec?` | `string` | [`Metrics`](Metrics.mdx).[`codec`](Metrics.mdx#codec) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pexip/peer-connection-stats",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.6.0",
|
|
4
4
|
"description": "Normalizer of RTCStats and related",
|
|
5
5
|
"homepage": "https://developer.pexip.com",
|
|
6
6
|
"bugs": "https://gitlab.com/pexip/zoo/issues",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"docs": "typedoc"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@pexip/signal": "16.9.
|
|
49
|
-
"@pexip/utils": "17.
|
|
48
|
+
"@pexip/signal": "16.9.5",
|
|
49
|
+
"@pexip/utils": "17.4.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@pexip/bundler": "18.2.
|
|
53
|
-
"@swc/core": "^1.
|
|
52
|
+
"@pexip/bundler": "18.2.1",
|
|
53
|
+
"@swc/core": "^1.15.33",
|
|
54
54
|
"@swc/jest": "^0.2.39",
|
|
55
55
|
"jest": "^29.5.12",
|
|
56
56
|
"jest-junit": "^16.0.0",
|
|
57
57
|
"prettier": "^3.2.5",
|
|
58
|
-
"typedoc": "^0.28.
|
|
59
|
-
"typedoc-plugin-markdown": "^4.
|
|
60
|
-
"typescript": "~
|
|
58
|
+
"typedoc": "^0.28.18",
|
|
59
|
+
"typedoc-plugin-markdown": "^4.11.0",
|
|
60
|
+
"typescript": "~6.0.2"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/statsCollector.ts","../src/statsCollector.types.ts","../src/typeGuards.ts","../src/utils.ts","../src/tests/statsCollector.chrome-inbound-presentation.fixtures.ts","../src/tests/statsCollector.chrome-multiple.fixtures.ts","../src/tests/statsCollector.chrome-outbound-presentation.fixtures.ts","../src/tests/statsCollector.firefox.fixtures.ts","../../../@types/globals.d.ts"],"version":"5.7.3"}
|