opensips-js 0.1.9 → 0.1.11

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.
@@ -23390,7 +23390,7 @@ class iE {
23390
23390
  n && n.getTracks().length && await this.beginCalculation(t, n, a);
23391
23391
  }
23392
23392
  stop(t) {
23393
- this.clearVolumeInterval(t), this.analysers[t] && (this.analysers[t].disconnect(), delete this.analysers[t]);
23393
+ this.clearVolumeInterval(t), this.analysers[t] && typeof this.analysers[t].disconnect == "function" && (this.analysers[t].disconnect(), delete this.analysers[t]);
23394
23394
  }
23395
23395
  clearVolumeInterval(t) {
23396
23396
  this.intervals[t] && (clearInterval(this.intervals[t]), delete this.intervals[t]);
@@ -23417,35 +23417,15 @@ class iE {
23417
23417
  }
23418
23418
  class lE {
23419
23419
  constructor() {
23420
- this.resumePromise = null, this.stateChangeCount = 0, this.lastStateChange = Date.now(), this.resumeAttempts = 0, this.context = new AudioContext(), this.context.addEventListener("statechange", () => {
23421
- this.stateChangeCount++;
23422
- const t = Date.now();
23423
- this.lastStateChange = t;
23424
- });
23420
+ this.resumePromise = null, this.context = new AudioContext();
23425
23421
  }
23426
23422
  async getContext() {
23427
- return this.context.state === "suspended" && (this.resumeAttempts++, this.resumePromise || (this.resumePromise = this.context.resume().then(() => {
23423
+ return this.context.state === "suspended" && (this.resumePromise || (this.resumePromise = this.context.resume().then(() => {
23428
23424
  this.resumePromise = null;
23429
23425
  }).catch((t) => {
23430
23426
  throw this.resumePromise = null, t;
23431
23427
  })), await this.resumePromise), this.context;
23432
23428
  }
23433
- get rawContext() {
23434
- return this.context;
23435
- }
23436
- getDebugInfo() {
23437
- return {
23438
- state: this.context.state,
23439
- sampleRate: this.context.sampleRate,
23440
- currentTime: this.context.currentTime,
23441
- stateChangeCount: this.stateChangeCount,
23442
- resumeAttempts: this.resumeAttempts,
23443
- lastStateChange: new Date(this.lastStateChange).toISOString(),
23444
- hasResumePromise: !!this.resumePromise,
23445
- documentHidden: document.hidden,
23446
- documentVisibility: document.visibilityState
23447
- };
23448
- }
23449
23429
  }
23450
23430
  const da = {
23451
23431
  SELECTED_INPUT_DEVICE: "OpensipsJSInputDevice",