@rtcstats/rtcstats-shared 2.6.2 → 2.6.3

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/compression.js CHANGED
@@ -219,6 +219,13 @@ export function statsDecompression(baseStatsInput, delta) {
219
219
  });
220
220
  }
221
221
 
222
+ // The compression removes the id as it is the key.
223
+ Object.keys(newStats).forEach((id) => {
224
+ if (newStats[id] && typeof newStats[id] === 'object') {
225
+ newStats[id].id = id;
226
+ }
227
+ });
228
+
222
229
  return newStats;
223
230
  }
224
231
 
package/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  // Type definitions for @rtcstats/rtcstats-shared
2
2
 
3
- export async function maybeUncompressDump(blob: Blob): Promise<Blob>;
4
- export async function detectWebRTCInternalsDump(blob: Blob): Promise<boolean>;
5
- export async function readWebRTCInternalsDump(blob: Blob): Promise<object>;
6
- export async function detectRTCStatsDump(blob: Blob): Promise<boolean>;
7
- export async function readRTCStatsDump(blob: Blob): Promise<object>;
8
- export async function extractTracks(peerConnectionTrace: any[]): Promise<any[]>;
3
+ export function maybeUncompressDump(blob: Blob): Promise<Blob>;
4
+ export function detectWebRTCInternalsDump(blob: Blob): Promise<boolean>;
5
+ export function readWebRTCInternalsDump(blob: Blob): Promise<object>;
6
+ export function detectRTCStatsDump(blob: Blob): Promise<boolean>;
7
+ export function readRTCStatsDump(blob: Blob): Promise<object>;
8
+ export function internalsToRtcstats(data: object): object;
9
+ export function readDump(blob: Blob): Promise<object>;
10
+ export function extractTracks(peerConnectionTrace: any[]): Promise<any[]>;
9
11
 
10
12
  export function statsCompression(baseStatsInput: object | RTCStatsReport, newStatsInput: object | RTCStatsReport, statsIdMap: object): object;
11
13
  export function statsDecompression(baseStatsInput: object, delta: object): object;
@@ -17,6 +19,7 @@ export function compressStatsType(type: string): string | number;
17
19
  export function decompressStatsType(typeKey: string | number): string;
18
20
  export function compressStatsProperty(property: string): string | number;
19
21
  export function decompressStatsProperty(property: string | number): string;
22
+ export const computePressureTable: {nominal: number, fair: number, serious: number, critical: number};
20
23
 
21
24
  export function createInternalsTimeSeries(connection: any): object;
22
25
  export function createRtcStatsTimeSeries(trace: any[]): object;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtcstats/rtcstats-shared",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "main": "index.js",
5
5
  "description": "gather WebRTC API traces and statistics",
6
6
  "type": "module",
@@ -17,5 +17,8 @@
17
17
  "license": "MIT",
18
18
  "publishConfig": {
19
19
  "access": "public"
20
+ },
21
+ "devDependencies": {
22
+ "typescript": "^5.9.3"
20
23
  }
21
24
  }