iss-library-digital-video-v3 0.6.3 → 0.6.5
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.
|
@@ -138,8 +138,8 @@ var Ae = { exports: {} };
|
|
|
138
138
|
return t;
|
|
139
139
|
});
|
|
140
140
|
})(Ae);
|
|
141
|
-
var
|
|
142
|
-
const
|
|
141
|
+
var Ve = Ae.exports;
|
|
142
|
+
const Ne = /* @__PURE__ */ Pe(Ve);
|
|
143
143
|
function ee(A, e) {
|
|
144
144
|
return function() {
|
|
145
145
|
return A.apply(e, arguments);
|
|
@@ -644,10 +644,10 @@ function Pt(A, e) {
|
|
|
644
644
|
...e
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function Vt(A) {
|
|
648
648
|
return B.matchAll(/\w+|\[(\w*)]/g, A).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function Nt(A) {
|
|
651
651
|
const e = {}, t = Object.keys(A);
|
|
652
652
|
let n;
|
|
653
653
|
const o = t.length;
|
|
@@ -661,12 +661,12 @@ function ue(A) {
|
|
|
661
661
|
let r = t[s++];
|
|
662
662
|
if (r === "__proto__") return !0;
|
|
663
663
|
const a = Number.isFinite(+r), g = s >= t.length;
|
|
664
|
-
return r = !r && B.isArray(o) ? o.length : r, g ? (B.hasOwnProp(o, r) ? o[r] = [o[r], n] : o[r] = n, !a) : ((!o[r] || !B.isObject(o[r])) && (o[r] = []), e(t, n, o[r], s) && B.isArray(o[r]) && (o[r] =
|
|
664
|
+
return r = !r && B.isArray(o) ? o.length : r, g ? (B.hasOwnProp(o, r) ? o[r] = [o[r], n] : o[r] = n, !a) : ((!o[r] || !B.isObject(o[r])) && (o[r] = []), e(t, n, o[r], s) && B.isArray(o[r]) && (o[r] = Nt(o[r])), !a);
|
|
665
665
|
}
|
|
666
666
|
if (B.isFormData(A) && B.isFunction(A.entries)) {
|
|
667
667
|
const t = {};
|
|
668
668
|
return B.forEachEntry(A, (n, o) => {
|
|
669
|
-
e(
|
|
669
|
+
e(Vt(n), o, t, 0);
|
|
670
670
|
}), t;
|
|
671
671
|
}
|
|
672
672
|
return null;
|
|
@@ -775,7 +775,7 @@ const Wt = B.toObjectSet([
|
|
|
775
775
|
`).forEach(function(r) {
|
|
776
776
|
o = r.indexOf(":"), t = r.substring(0, o).trim().toLowerCase(), n = r.substring(o + 1).trim(), !(!t || e[t] && Wt[t]) && (t === "set-cookie" ? e[t] ? e[t].push(n) : e[t] = [n] : e[t] = e[t] ? e[t] + ", " + n : n);
|
|
777
777
|
}), e;
|
|
778
|
-
},
|
|
778
|
+
}, VA = Symbol("internals");
|
|
779
779
|
function $(A) {
|
|
780
780
|
return A && String(A).trim().toLowerCase();
|
|
781
781
|
}
|
|
@@ -930,7 +930,7 @@ let v = class {
|
|
|
930
930
|
return t.forEach((o) => n.set(o)), n;
|
|
931
931
|
}
|
|
932
932
|
static accessor(e) {
|
|
933
|
-
const n = (this[
|
|
933
|
+
const n = (this[VA] = this[VA] = {
|
|
934
934
|
accessors: {}
|
|
935
935
|
}).accessors, o = this.prototype;
|
|
936
936
|
function s(r) {
|
|
@@ -1028,7 +1028,7 @@ const wA = (A, e, t = 3) => {
|
|
|
1028
1028
|
};
|
|
1029
1029
|
A(w);
|
|
1030
1030
|
}, t);
|
|
1031
|
-
},
|
|
1031
|
+
}, NA = (A, e) => {
|
|
1032
1032
|
const t = A != null;
|
|
1033
1033
|
return [(n) => e[0]({
|
|
1034
1034
|
lengthComputable: t,
|
|
@@ -1373,9 +1373,9 @@ const Qe = (A) => {
|
|
|
1373
1373
|
fetchOptions: _
|
|
1374
1374
|
} = Qe(c), rA = e || fetch;
|
|
1375
1375
|
Z = Z ? (Z + "").toLowerCase() : "text";
|
|
1376
|
-
let
|
|
1377
|
-
const y =
|
|
1378
|
-
|
|
1376
|
+
let N = sn([F, d && d.toAbortSignal()], S), V = null;
|
|
1377
|
+
const y = N && N.unsubscribe && (() => {
|
|
1378
|
+
N.unsubscribe();
|
|
1379
1379
|
});
|
|
1380
1380
|
let sA;
|
|
1381
1381
|
try {
|
|
@@ -1386,7 +1386,7 @@ const Qe = (A) => {
|
|
|
1386
1386
|
duplex: "half"
|
|
1387
1387
|
}), U;
|
|
1388
1388
|
if (B.isFormData(D) && (U = M.headers.get("content-type")) && L.setContentType(U), M.body) {
|
|
1389
|
-
const [Y, aA] =
|
|
1389
|
+
const [Y, aA] = NA(
|
|
1390
1390
|
sA,
|
|
1391
1391
|
wA(XA(I))
|
|
1392
1392
|
);
|
|
@@ -1396,22 +1396,22 @@ const Qe = (A) => {
|
|
|
1396
1396
|
B.isString(x) || (x = x ? "include" : "omit");
|
|
1397
1397
|
const T = s && "credentials" in t.prototype, BA = {
|
|
1398
1398
|
..._,
|
|
1399
|
-
signal:
|
|
1399
|
+
signal: N,
|
|
1400
1400
|
method: l.toUpperCase(),
|
|
1401
1401
|
headers: L.normalize().toJSON(),
|
|
1402
1402
|
body: D,
|
|
1403
1403
|
duplex: "half",
|
|
1404
1404
|
credentials: T ? x : void 0
|
|
1405
1405
|
};
|
|
1406
|
-
|
|
1407
|
-
let Q = await (s ? rA(
|
|
1406
|
+
V = s && new t(u, BA);
|
|
1407
|
+
let Q = await (s ? rA(V, _) : rA(u, BA));
|
|
1408
1408
|
const h = i && (Z === "stream" || Z === "response");
|
|
1409
1409
|
if (i && (G || h && y)) {
|
|
1410
1410
|
const M = {};
|
|
1411
1411
|
["status", "statusText", "headers"].forEach((GA) => {
|
|
1412
1412
|
M[GA] = Q[GA];
|
|
1413
1413
|
});
|
|
1414
|
-
const U = B.toFiniteNumber(Q.headers.get("content-length")), [Y, aA] = G &&
|
|
1414
|
+
const U = B.toFiniteNumber(Q.headers.get("content-length")), [Y, aA] = G && NA(
|
|
1415
1415
|
U,
|
|
1416
1416
|
wA(XA(G), !0)
|
|
1417
1417
|
) || [];
|
|
@@ -1431,16 +1431,16 @@ const Qe = (A) => {
|
|
|
1431
1431
|
status: Q.status,
|
|
1432
1432
|
statusText: Q.statusText,
|
|
1433
1433
|
config: c,
|
|
1434
|
-
request:
|
|
1434
|
+
request: V
|
|
1435
1435
|
});
|
|
1436
1436
|
});
|
|
1437
1437
|
} catch (T) {
|
|
1438
1438
|
throw y && y(), T && T.name === "TypeError" && /Load failed|fetch/i.test(T.message) ? Object.assign(
|
|
1439
|
-
new f("Network Error", f.ERR_NETWORK, c,
|
|
1439
|
+
new f("Network Error", f.ERR_NETWORK, c, V),
|
|
1440
1440
|
{
|
|
1441
1441
|
cause: T.cause || T
|
|
1442
1442
|
}
|
|
1443
|
-
) : f.from(T, T && T.code, c,
|
|
1443
|
+
) : f.from(T, T && T.code, c, V);
|
|
1444
1444
|
}
|
|
1445
1445
|
};
|
|
1446
1446
|
}, ln = /* @__PURE__ */ new Map(), De = (A) => {
|
|
@@ -1881,8 +1881,8 @@ const {
|
|
|
1881
1881
|
CancelToken: Jn,
|
|
1882
1882
|
VERSION: zn,
|
|
1883
1883
|
all: Pn,
|
|
1884
|
-
Cancel:
|
|
1885
|
-
isAxiosError:
|
|
1884
|
+
Cancel: Vn,
|
|
1885
|
+
isAxiosError: Nn,
|
|
1886
1886
|
spread: Xn,
|
|
1887
1887
|
toFormData: Wn,
|
|
1888
1888
|
AxiosHeaders: Hn,
|
|
@@ -1972,7 +1972,7 @@ const Dn = "/lxlicence", hn = {
|
|
|
1972
1972
|
}
|
|
1973
1973
|
console.log("spkId::", a.value);
|
|
1974
1974
|
}
|
|
1975
|
-
M.status === 0 && M.info && (i.value = !0, console.log("✅ TTS初始化成功"), Q !== "init" &&
|
|
1975
|
+
M.status === 0 && M.info && (i.value = !0, console.log("✅ TTS初始化成功"), Q !== "init" && N(o.content)), M.status === 1 && M.audio && (console.log("✅ TTS 接收中..."), console.log("当前执行秒", (/* @__PURE__ */ new Date()).getSeconds()), T(M.audio)), M.status === 2 && console.log("当前执行秒", (/* @__PURE__ */ new Date()).getSeconds());
|
|
1976
1976
|
} catch (M) {
|
|
1977
1977
|
console.error("解析消息失败:", M);
|
|
1978
1978
|
}
|
|
@@ -1991,7 +1991,7 @@ const Dn = "/lxlicence", hn = {
|
|
|
1991
1991
|
d.value.send(JSON.stringify(Q));
|
|
1992
1992
|
} else
|
|
1993
1993
|
console.error("请先初始化"), n("error", "请先初始化");
|
|
1994
|
-
},
|
|
1994
|
+
}, N = (Q) => {
|
|
1995
1995
|
if (Q)
|
|
1996
1996
|
if (d.value && d.value.readyState === WebSocket.OPEN) {
|
|
1997
1997
|
const h = {
|
|
@@ -2005,7 +2005,7 @@ const Dn = "/lxlicence", hn = {
|
|
|
2005
2005
|
d.value.send(JSON.stringify(h));
|
|
2006
2006
|
} else
|
|
2007
2007
|
console.error("请先初始化"), n("error", "请先初始化");
|
|
2008
|
-
},
|
|
2008
|
+
}, V = () => {
|
|
2009
2009
|
if (console.log("关闭连接"), d.value && d.value.readyState === WebSocket.OPEN) {
|
|
2010
2010
|
const Q = { task: "tts", signal: "end" };
|
|
2011
2011
|
d.value.send(JSON.stringify(Q));
|
|
@@ -2014,7 +2014,7 @@ const Dn = "/lxlicence", hn = {
|
|
|
2014
2014
|
if (!c.value)
|
|
2015
2015
|
return n("error", "license未授权"), !1;
|
|
2016
2016
|
try {
|
|
2017
|
-
return u.value = new
|
|
2017
|
+
return u.value = new Ne({
|
|
2018
2018
|
encoding: "16bitInt",
|
|
2019
2019
|
channels: 1,
|
|
2020
2020
|
sampleRate: 24e3,
|
|
@@ -2035,7 +2035,7 @@ const Dn = "/lxlicence", hn = {
|
|
|
2035
2035
|
}, sA = () => {
|
|
2036
2036
|
if (u.value)
|
|
2037
2037
|
try {
|
|
2038
|
-
w.value = !0, E.value = "", _(), i.value = !1,
|
|
2038
|
+
u.value.volume(l.mutedVolume), V(), u.value.destroy(), w.value = !0, E.value = "", _(), i.value = !1, y(), console.log("✅ 音频已停止");
|
|
2039
2039
|
} catch (Q) {
|
|
2040
2040
|
console.warn("停止音频时发生异常:", Q), n("error", "停止音频时发生异常");
|
|
2041
2041
|
}
|
|
@@ -2062,14 +2062,14 @@ const Dn = "/lxlicence", hn = {
|
|
|
2062
2062
|
console.error("请先初始化播放器"), n("error", "请先初始化播放器");
|
|
2063
2063
|
return;
|
|
2064
2064
|
}
|
|
2065
|
-
w.value = !1, C.value = 0, m.value = 0, i.value ? (E.value = "",
|
|
2065
|
+
w.value = !1, C.value = 0, m.value = 0, i.value ? (E.value = "", N(Q)) : L();
|
|
2066
2066
|
}
|
|
2067
2067
|
},
|
|
2068
2068
|
{ immediate: !1 }
|
|
2069
2069
|
), ke(async () => {
|
|
2070
|
-
|
|
2070
|
+
g.value = Je(), await Z(), y();
|
|
2071
2071
|
}), Oe(() => {
|
|
2072
|
-
d.value && (
|
|
2072
|
+
d.value && (V(), u.value && u.value.destroy(), d.value.close());
|
|
2073
2073
|
}), e({
|
|
2074
2074
|
initAudioPlayer: y,
|
|
2075
2075
|
getWssConnectStatus: BA,
|
|
@@ -2097,7 +2097,7 @@ const Dn = "/lxlicence", hn = {
|
|
|
2097
2097
|
])
|
|
2098
2098
|
]));
|
|
2099
2099
|
}
|
|
2100
|
-
}), AA = /* @__PURE__ */ Rn(Zn, [["__scopeId", "data-v-
|
|
2100
|
+
}), AA = /* @__PURE__ */ Rn(Zn, [["__scopeId", "data-v-b6f3d85d"]]), Re = "0.6.5", Se = () => {
|
|
2101
2101
|
Function(`
|
|
2102
2102
|
window.console && console.log('%c灵犀数字人直播组件 iss-library-digital-video %cV${Re}', 'color: #3164F6;font-weight: 500;font-size: 12px;', 'color: #999;');
|
|
2103
2103
|
`)();
|