@rtcstats/rtcstats-js 2.2.0 → 2.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtcstats/rtcstats-js",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "gather WebRTC API traces and statistics",
5
5
  "main": "rtcstats.js",
6
6
  "type": "module",
@@ -6,7 +6,7 @@ const RELOAD_COUNT_KEY = 'rtcstatsReloadCount';
6
6
  export function WebSocketTrace(config = {}) {
7
7
  let buffer = [];
8
8
  let connection;
9
- let lastTime = 0;
9
+ let lastTime = Date.now();
10
10
  let connectionStartTime = 0;
11
11
  const createTime = Date.now();
12
12
 
@@ -82,7 +82,7 @@ export function WebSocketTrace(config = {}) {
82
82
  // is not valid.
83
83
 
84
84
  // Note: this does not use trace so avoids the buffer.
85
- connection.send(JSON.stringify(['create', null, {
85
+ connection.send(JSON.stringify([compressMethod('create'), null, {
86
86
  hardwareConcurrency: navigator.hardwareConcurrency,
87
87
  userAgentData: navigator.userAgentData,
88
88
  deviceMemory: navigator.deviceMemory,