opensips-js 0.1.9 → 0.1.10
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.d.ts +0 -15
- package/dist/opensips-js.cjs.js +54 -54
- package/dist/opensips-js.es.js +2 -22
- package/dist/opensips-js.iife.js +44 -44
- package/dist/opensips-js.umd.js +44 -44
- package/package.json +1 -1
package/dist/opensips-js.es.js
CHANGED
|
@@ -23417,35 +23417,15 @@ class iE {
|
|
|
23417
23417
|
}
|
|
23418
23418
|
class lE {
|
|
23419
23419
|
constructor() {
|
|
23420
|
-
this.resumePromise = null, this.
|
|
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.
|
|
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",
|