@whereby.com/media 11.2.2 → 11.2.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/dist/index.cjs CHANGED
@@ -7157,9 +7157,12 @@ class BandwidthTester extends EventEmitter {
7157
7157
  this.emit("result", {
7158
7158
  error: true,
7159
7159
  });
7160
- clearTimeout(this._resultTimeout);
7161
7160
  }
7162
7161
  this._clearTimeouts();
7162
+ if (this._resultTimeout) {
7163
+ clearTimeout(this._resultTimeout);
7164
+ this._resultTimeout = null;
7165
+ }
7163
7166
  clearInterval(this._drawInterval);
7164
7167
  this._drawInterval = null;
7165
7168
  if (this._sendTransport) {
@@ -7396,6 +7399,9 @@ class BandwidthTester extends EventEmitter {
7396
7399
  }
7397
7400
  _reportResults() {
7398
7401
  return __awaiter(this, void 0, void 0, function* () {
7402
+ if (this.closed) {
7403
+ return;
7404
+ }
7399
7405
  const [localSendStats, localRecvStats] = yield Promise.all([
7400
7406
  this._sendTransport.getStats(),
7401
7407
  this._receiveTransport.getStats(),
package/dist/index.mjs CHANGED
@@ -7137,9 +7137,12 @@ class BandwidthTester extends EventEmitter {
7137
7137
  this.emit("result", {
7138
7138
  error: true,
7139
7139
  });
7140
- clearTimeout(this._resultTimeout);
7141
7140
  }
7142
7141
  this._clearTimeouts();
7142
+ if (this._resultTimeout) {
7143
+ clearTimeout(this._resultTimeout);
7144
+ this._resultTimeout = null;
7145
+ }
7143
7146
  clearInterval(this._drawInterval);
7144
7147
  this._drawInterval = null;
7145
7148
  if (this._sendTransport) {
@@ -7376,6 +7379,9 @@ class BandwidthTester extends EventEmitter {
7376
7379
  }
7377
7380
  _reportResults() {
7378
7381
  return __awaiter(this, void 0, void 0, function* () {
7382
+ if (this.closed) {
7383
+ return;
7384
+ }
7379
7385
  const [localSendStats, localRecvStats] = yield Promise.all([
7380
7386
  this._sendTransport.getStats(),
7381
7387
  this._receiveTransport.getStats(),
@@ -7137,9 +7137,12 @@ class BandwidthTester extends EventEmitter {
7137
7137
  this.emit("result", {
7138
7138
  error: true,
7139
7139
  });
7140
- clearTimeout(this._resultTimeout);
7141
7140
  }
7142
7141
  this._clearTimeouts();
7142
+ if (this._resultTimeout) {
7143
+ clearTimeout(this._resultTimeout);
7144
+ this._resultTimeout = null;
7145
+ }
7143
7146
  clearInterval(this._drawInterval);
7144
7147
  this._drawInterval = null;
7145
7148
  if (this._sendTransport) {
@@ -7376,6 +7379,9 @@ class BandwidthTester extends EventEmitter {
7376
7379
  }
7377
7380
  _reportResults() {
7378
7381
  return __awaiter(this, void 0, void 0, function* () {
7382
+ if (this.closed) {
7383
+ return;
7384
+ }
7379
7385
  const [localSendStats, localRecvStats] = yield Promise.all([
7380
7386
  this._sendTransport.getStats(),
7381
7387
  this._receiveTransport.getStats(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whereby.com/media",
3
3
  "description": "Media library for Whereby",
4
- "version": "11.2.2",
4
+ "version": "11.2.3",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/whereby/sdk",
7
7
  "repository": {
@@ -62,8 +62,8 @@
62
62
  "prettier": "^3.5.3",
63
63
  "process": "^0.11.10",
64
64
  "typescript": "^5.8.3",
65
- "@whereby.com/eslint-config": "0.1.0",
66
65
  "@whereby.com/jest-config": "0.1.0",
66
+ "@whereby.com/eslint-config": "0.1.0",
67
67
  "@whereby.com/prettier-config": "0.1.0",
68
68
  "@whereby.com/rollup-config": "0.1.1",
69
69
  "@whereby.com/tsconfig": "0.1.0"