@voicenter-team/opensips-js 1.0.105 → 1.0.107
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/opensips-js.cjs.js +4 -4
- package/dist/opensips-js.es.js +122 -48
- package/dist/opensips-js.iife.js +4 -4
- package/dist/opensips-js.umd.js +4 -4
- package/package.json +1 -1
package/dist/opensips-js.es.js
CHANGED
@@ -67714,9 +67714,13 @@ var hce = {};
|
|
67714
67714
|
C = Symbol("Symbol.iterator");
|
67715
67715
|
for (var N = "Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "), $ = 0; $ < N.length; $++) {
|
67716
67716
|
var U = i[N[$]];
|
67717
|
-
typeof U == "function" && typeof U.prototype[C] != "function" && t(U.prototype, C, {
|
67718
|
-
|
67719
|
-
|
67717
|
+
typeof U == "function" && typeof U.prototype[C] != "function" && t(U.prototype, C, {
|
67718
|
+
configurable: !0,
|
67719
|
+
writable: !0,
|
67720
|
+
value: function() {
|
67721
|
+
return a(e(this));
|
67722
|
+
}
|
67723
|
+
});
|
67720
67724
|
}
|
67721
67725
|
return C;
|
67722
67726
|
});
|
@@ -68059,13 +68063,15 @@ var hce = {};
|
|
68059
68063
|
});
|
68060
68064
|
function G(C, N) {
|
68061
68065
|
C instanceof String && (C += "");
|
68062
|
-
var $ = 0, U = !1, z = {
|
68063
|
-
|
68064
|
-
|
68065
|
-
|
68066
|
+
var $ = 0, U = !1, z = {
|
68067
|
+
next: function() {
|
68068
|
+
if (!U && $ < C.length) {
|
68069
|
+
var J = $++;
|
68070
|
+
return { value: N(J, C[J]), done: !1 };
|
68071
|
+
}
|
68072
|
+
return U = !0, { done: !0, value: void 0 };
|
68066
68073
|
}
|
68067
|
-
|
68068
|
-
} };
|
68074
|
+
};
|
68069
68075
|
return z[Symbol.iterator] = function() {
|
68070
68076
|
return z;
|
68071
68077
|
}, z;
|
@@ -68445,7 +68451,14 @@ var hce = {};
|
|
68445
68451
|
return ht ? N = C[ht] : N = C.A, N ?? 0;
|
68446
68452
|
}
|
68447
68453
|
function is(C, N) {
|
68448
|
-
ht ? C[ht] = N : C.A !== void 0 ? C.A = N : Object.defineProperties(C, {
|
68454
|
+
ht ? C[ht] = N : C.A !== void 0 ? C.A = N : Object.defineProperties(C, {
|
68455
|
+
A: {
|
68456
|
+
value: N,
|
68457
|
+
configurable: !0,
|
68458
|
+
writable: !0,
|
68459
|
+
enumerable: !1
|
68460
|
+
}
|
68461
|
+
});
|
68449
68462
|
}
|
68450
68463
|
function Er(C) {
|
68451
68464
|
return jt(C, 1), C;
|
@@ -69104,7 +69117,12 @@ var hce = {};
|
|
69104
69117
|
function Ja(C) {
|
69105
69118
|
return ji(C, Zn, 1).map(function(N) {
|
69106
69119
|
var $ = bn(N, 1);
|
69107
|
-
return {
|
69120
|
+
return {
|
69121
|
+
index: $ ?? 0,
|
69122
|
+
qa: as(N, 2),
|
69123
|
+
label: bn(N, 3) != null ? Ws(bn(N, 3), "") : void 0,
|
69124
|
+
displayName: bn(N, 4) != null ? Ws(bn(N, 4), "") : void 0
|
69125
|
+
};
|
69108
69126
|
});
|
69109
69127
|
}
|
69110
69128
|
function Qa(C) {
|
@@ -69168,6 +69186,7 @@ var hce = {};
|
|
69168
69186
|
window[C] = N;
|
69169
69187
|
}
|
69170
69188
|
function bd(C) {
|
69189
|
+
console.log("create script");
|
69171
69190
|
var N = document.createElement("script");
|
69172
69191
|
return N.setAttribute("src", C), N.setAttribute("crossorigin", "anonymous"), new Promise(function($) {
|
69173
69192
|
N.addEventListener("load", function() {
|
@@ -69301,7 +69320,10 @@ var hce = {};
|
|
69301
69320
|
}, r.setOptions = function(C, N) {
|
69302
69321
|
var $ = this;
|
69303
69322
|
if (N = N || this.h.options) {
|
69304
|
-
for (var U = [], z = [], J = {}, K = o(Object.keys(C)), se = K.next(); !se.done; J = {
|
69323
|
+
for (var U = [], z = [], J = {}, K = o(Object.keys(C)), se = K.next(); !se.done; J = {
|
69324
|
+
X: J.X,
|
69325
|
+
Y: J.Y
|
69326
|
+
}, se = K.next())
|
69305
69327
|
if (se = se.value, !(se in this.l && this.l[se] === C[se])) {
|
69306
69328
|
this.l[se] = C[se];
|
69307
69329
|
var pe = N[se];
|
@@ -69316,9 +69338,16 @@ var hce = {};
|
|
69316
69338
|
};
|
69317
69339
|
}(J))), pe.graphOptionXref && (se = Object.assign(
|
69318
69340
|
{},
|
69319
|
-
{
|
69341
|
+
{
|
69342
|
+
calculatorName: "",
|
69343
|
+
calculatorIndex: 0
|
69344
|
+
},
|
69320
69345
|
pe.graphOptionXref,
|
69321
|
-
{
|
69346
|
+
{
|
69347
|
+
valueNumber: pe.type === 1 ? C[se] : 0,
|
69348
|
+
valueBoolean: pe.type === 0 ? C[se] : !1,
|
69349
|
+
valueString: pe.type === 2 ? C[se] : ""
|
69350
|
+
}
|
69322
69351
|
), z.push(se)));
|
69323
69352
|
}
|
69324
69353
|
(U.length !== 0 || z.length !== 0) && (this.u = !0, this.H = (this.H === void 0 ? [] : this.H).concat(z), this.F = (this.F === void 0 ? [] : this.F).concat(U));
|
@@ -69459,7 +69488,11 @@ var hce = {};
|
|
69459
69488
|
if (dt) {
|
69460
69489
|
for (var Un = dt.getRectList(), ys = dt.getLandmarksList(), ls = dt.getClassificationsList(), Vt = [], Kn = 0; Kn < Un.size(); ++Kn) {
|
69461
69490
|
var Rr = ql(Un.get(Kn)), Qo = as(Rr, 1), ac = as(Rr, 2), oc = as(Rr, 3), lc = as(Rr, 4), Td = as(Rr, 5, 0), ro = void 0;
|
69462
|
-
ro = ro === void 0 ? 0 : ro, Rr = {
|
69491
|
+
ro = ro === void 0 ? 0 : ro, Rr = {
|
69492
|
+
la: { sa: Qo, ta: ac, height: oc, width: lc, rotation: Td, pa: Ws(bn(Rr, 6), ro) },
|
69493
|
+
ea: ji(Aa(ys.get(Kn)), Ya, 1).map(Qa),
|
69494
|
+
ba: Ja(vd(ls.get(Kn)))
|
69495
|
+
}, Vt.push(Rr);
|
69463
69496
|
}
|
69464
69497
|
Un = Vt;
|
69465
69498
|
} else
|
@@ -69516,19 +69549,21 @@ var hce = {};
|
|
69516
69549
|
function ic(C, N) {
|
69517
69550
|
for (var $ = N.name || "$", U = [].concat(u(N.wants)), z = new C.i.StringList(), J = o(N.wants), K = J.next(); !K.done; K = J.next())
|
69518
69551
|
z.push_back(K.value);
|
69519
|
-
J = C.i.PacketListener.implement({
|
69520
|
-
|
69521
|
-
pe
|
69522
|
-
|
69523
|
-
|
69524
|
-
|
69525
|
-
|
69526
|
-
var
|
69527
|
-
|
69528
|
-
|
69529
|
-
|
69530
|
-
|
69531
|
-
|
69552
|
+
J = C.i.PacketListener.implement({
|
69553
|
+
onResults: function(se) {
|
69554
|
+
for (var pe = {}, ke = 0; ke < N.wants.length; ++ke)
|
69555
|
+
pe[U[ke]] = se.get(ke);
|
69556
|
+
var je = C.listeners[$];
|
69557
|
+
je && (C.I = Yo(C, pe, N.outs).then(function(yt) {
|
69558
|
+
yt = je(yt);
|
69559
|
+
for (var dt = 0; dt < N.wants.length; ++dt) {
|
69560
|
+
var Ze = pe[U[dt]];
|
69561
|
+
typeof Ze == "object" && Ze.hasOwnProperty && Ze.hasOwnProperty("delete") && Ze.delete();
|
69562
|
+
}
|
69563
|
+
yt && (C.I = yt);
|
69564
|
+
}));
|
69565
|
+
}
|
69566
|
+
}), C.j.attachMultiListener(z, J), z.delete();
|
69532
69567
|
}
|
69533
69568
|
r.onResults = function(C, N) {
|
69534
69569
|
this.listeners[N || "$"] = C;
|
@@ -69543,21 +69578,58 @@ var hce = {};
|
|
69543
69578
|
}
|
69544
69579
|
function so(C) {
|
69545
69580
|
var N = this;
|
69546
|
-
C = C || {}, this.h = new Na({
|
69547
|
-
|
69548
|
-
|
69549
|
-
|
69550
|
-
|
69551
|
-
|
69552
|
-
|
69553
|
-
|
69554
|
-
|
69555
|
-
|
69556
|
-
|
69557
|
-
|
69558
|
-
|
69581
|
+
C = C || {}, this.h = new Na({
|
69582
|
+
locateFile: C.locateFile,
|
69583
|
+
files: function($) {
|
69584
|
+
return [{ simd: !0, url: "selfie_segmentation_solution_simd_wasm_bin.js" }, {
|
69585
|
+
simd: !1,
|
69586
|
+
url: "selfie_segmentation_solution_wasm_bin.js"
|
69587
|
+
}, { data: !0, url: no($.modelSelection) }];
|
69588
|
+
},
|
69589
|
+
graph: { url: "selfie_segmentation.binarypb" },
|
69590
|
+
listeners: [{
|
69591
|
+
wants: ["segmentation_mask", "image_transformed"],
|
69592
|
+
outs: {
|
69593
|
+
image: { type: "texture", stream: "image_transformed" },
|
69594
|
+
segmentationMask: { type: "texture", stream: "segmentation_mask" }
|
69595
|
+
}
|
69596
|
+
}],
|
69597
|
+
inputs: {
|
69598
|
+
image: {
|
69599
|
+
type: "video",
|
69600
|
+
stream: "input_frames_gpu"
|
69601
|
+
}
|
69602
|
+
},
|
69603
|
+
options: {
|
69604
|
+
useCpuInference: {
|
69605
|
+
type: 0,
|
69606
|
+
graphOptionXref: { calculatorType: "InferenceCalculator", fieldName: "use_cpu_inference" },
|
69607
|
+
default: typeof window != "object" || window.navigator === void 0 ? !1 : "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document
|
69608
|
+
},
|
69609
|
+
selfieMode: {
|
69610
|
+
type: 0,
|
69611
|
+
graphOptionXref: {
|
69612
|
+
calculatorType: "GlScalerCalculator",
|
69613
|
+
calculatorIndex: 1,
|
69614
|
+
fieldName: "flip_horizontal"
|
69615
|
+
}
|
69616
|
+
},
|
69617
|
+
modelSelection: {
|
69618
|
+
type: 1,
|
69619
|
+
graphOptionXref: {
|
69620
|
+
calculatorType: "ConstantSidePacketCalculator",
|
69621
|
+
calculatorName: "ConstantSidePacketCalculatorModelSelection",
|
69622
|
+
fieldName: "int_value"
|
69623
|
+
},
|
69624
|
+
onChange: function($) {
|
69625
|
+
var U, z, J;
|
69626
|
+
return L(function(K) {
|
69627
|
+
return K.h == 1 ? (U = no($), z = "third_party/mediapipe/modules/selfie_segmentation/" + U, I(K, Xo(N.h, U), 2)) : (J = K.i, N.h.overrideFile(z, J), K.return(!0));
|
69628
|
+
});
|
69629
|
+
}
|
69630
|
+
}
|
69559
69631
|
}
|
69560
|
-
}
|
69632
|
+
});
|
69561
69633
|
}
|
69562
69634
|
r = so.prototype, r.close = function() {
|
69563
69635
|
return this.h.close(), Promise.resolve();
|
@@ -71291,8 +71363,8 @@ class o_e extends Dw {
|
|
71291
71363
|
Mh.MediaPipeSelfieSegmentation,
|
71292
71364
|
{
|
71293
71365
|
runtime: cx.runtime,
|
71294
|
-
modelType: cx.modelType
|
71295
|
-
|
71366
|
+
modelType: cx.modelType,
|
71367
|
+
solutionPath: "https://cdn.jsdelivr.net/npm/@mediapipe/selfie_segmentation@0.1.1675465747"
|
71296
71368
|
}
|
71297
71369
|
);
|
71298
71370
|
}
|
@@ -74675,7 +74747,9 @@ class Pw extends G$ {
|
|
74675
74747
|
this._receiveInviteResponse(s);
|
74676
74748
|
}
|
74677
74749
|
});
|
74678
|
-
await this.generateStream(),
|
74750
|
+
if (await this.generateStream(), console.log("this.stream", this.stream), !this.stream || !this.stream.getTracks().length)
|
74751
|
+
return;
|
74752
|
+
this.addTracks(this.stream.getTracks());
|
74679
74753
|
const t = {
|
74680
74754
|
audio: !1,
|
74681
74755
|
// offerToReceiveAudio
|
@@ -74779,7 +74853,7 @@ class Pw extends G$ {
|
|
74779
74853
|
}), this.session._ua.emit("pluginDetach", this.name);
|
74780
74854
|
}
|
74781
74855
|
async stopMedia() {
|
74782
|
-
this._connection && (this._connection.close(), this._connection = null);
|
74856
|
+
this._connection && (this._connection.close(), this._connection = null), this.stream && (this.stream = null);
|
74783
74857
|
}
|
74784
74858
|
async stop() {
|
74785
74859
|
await this.session.stopProcessPlugins(this.type);
|
@@ -74802,12 +74876,12 @@ class l_e extends Pw {
|
|
74802
74876
|
async generateStream() {
|
74803
74877
|
try {
|
74804
74878
|
this.stream = await navigator.mediaDevices.getDisplayMedia(), this.stream.getVideoTracks()[0].onended = () => {
|
74805
|
-
this.
|
74879
|
+
this.kill();
|
74806
74880
|
}, this.session._ua.emit("startScreenShare", {
|
74807
74881
|
stream: this.stream
|
74808
74882
|
});
|
74809
74883
|
} catch (e) {
|
74810
|
-
|
74884
|
+
this.kill(), console.error(e);
|
74811
74885
|
}
|
74812
74886
|
return this.stream;
|
74813
74887
|
}
|