@formant/data-sdk 1.81.2 → 1.81.6
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/data-sdk.cjs.js +1 -1
- package/dist/data-sdk.cjs.js.map +1 -1
- package/dist/data-sdk.es.js +9 -13
- package/dist/data-sdk.es.js.map +1 -1
- package/dist/data-sdk.es6.js +9 -13
- package/dist/data-sdk.umd.js +1 -1
- package/package.json +1 -1
package/dist/data-sdk.es.js
CHANGED
|
@@ -25655,16 +25655,13 @@ class Device extends BaseDevice {
|
|
|
25655
25655
|
*/
|
|
25656
25656
|
async getAgentVersion() {
|
|
25657
25657
|
var r;
|
|
25658
|
-
const n = await (await fetch(
|
|
25659
|
-
|
|
25660
|
-
{
|
|
25661
|
-
|
|
25662
|
-
|
|
25663
|
-
"Content-Type": "application/json",
|
|
25664
|
-
Authorization: "Bearer " + Authentication.token
|
|
25665
|
-
}
|
|
25658
|
+
const n = await (await fetch(`${FORMANT_API_URL}/v1/admin/devices/${this.id}`, {
|
|
25659
|
+
method: "GET",
|
|
25660
|
+
headers: {
|
|
25661
|
+
"Content-Type": "application/json",
|
|
25662
|
+
Authorization: "Bearer " + Authentication.token
|
|
25666
25663
|
}
|
|
25667
|
-
)).json();
|
|
25664
|
+
})).json();
|
|
25668
25665
|
return (r = n == null ? void 0 : n.state) == null ? void 0 : r.agentVersion;
|
|
25669
25666
|
}
|
|
25670
25667
|
async getFileUrl(t) {
|
|
@@ -25700,7 +25697,6 @@ class Device extends BaseDevice {
|
|
|
25700
25697
|
} = typeof t == "number" ? { sessionType: t } : t, c = getRtcClientPool({
|
|
25701
25698
|
sessionType: n
|
|
25702
25699
|
}).get(this.handleMessage);
|
|
25703
|
-
this.rtcClient = c;
|
|
25704
25700
|
let l = !1;
|
|
25705
25701
|
const u = new Promise(
|
|
25706
25702
|
(h, R) => setTimeout(() => {
|
|
@@ -25731,12 +25727,12 @@ class Device extends BaseDevice {
|
|
|
25731
25727
|
), h;
|
|
25732
25728
|
};
|
|
25733
25729
|
return Promise.race([d(), u]).then((h) => {
|
|
25734
|
-
this.remoteDevicePeerId = h, this.initConnectionMonitoring(), this.emit("connect");
|
|
25730
|
+
this.remoteDevicePeerId = h, this.initConnectionMonitoring(), this.rtcClient = c, this.emit("connect");
|
|
25735
25731
|
}).catch((h) => {
|
|
25736
25732
|
throw console.debug(
|
|
25737
25733
|
`${(/* @__PURE__ */ new Date()).toISOString()} :: Connection failed: %o`,
|
|
25738
25734
|
h
|
|
25739
|
-
), this.
|
|
25735
|
+
), this.remoteDevicePeerId = null, c.shutdown().catch((R) => {
|
|
25740
25736
|
console.error("rtcClient cannot shutdown: %o", R);
|
|
25741
25737
|
}), this.emit("connection_failed", h), h;
|
|
25742
25738
|
});
|
|
@@ -25809,7 +25805,7 @@ class Device extends BaseDevice {
|
|
|
25809
25805
|
throw new Error(`Could not find command with name "${t}"`);
|
|
25810
25806
|
let u = "";
|
|
25811
25807
|
n === void 0 ? l.parameterEnabled && l.parameterValue && (u = l.parameterValue) : u = n;
|
|
25812
|
-
|
|
25808
|
+
let d = {
|
|
25813
25809
|
value: u,
|
|
25814
25810
|
scrubberTime: (r || /* @__PURE__ */ new Date()).toISOString(),
|
|
25815
25811
|
meta: {
|