@vonage/media-processor 3.0.0-alpha.0 → 3.0.0-alpha.2
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/docs/assets/hierarchy.js +1 -0
- package/dist/docs/assets/highlight.css +12 -5
- package/dist/docs/assets/icons.js +18 -0
- package/dist/docs/assets/icons.svg +1 -0
- package/dist/docs/assets/main.js +60 -52
- package/dist/docs/assets/navigation.js +1 -0
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/assets/style.css +1496 -1277
- package/dist/docs/classes/MediaProcessor.html +109 -95
- package/dist/docs/classes/MediaProcessorConnector.html +11 -7
- package/dist/docs/enums/ErrorFunction.html +8 -9
- package/dist/docs/enums/PipelineInfoData.html +14 -15
- package/dist/docs/enums/VonageSourceType.html +5 -5
- package/dist/docs/enums/WarningType.html +4 -5
- package/dist/docs/functions/isSupported.html +3 -0
- package/dist/docs/functions/setVonageMetadata.html +5 -0
- package/dist/docs/hierarchy.html +1 -0
- package/dist/docs/index.html +4 -13
- package/dist/docs/interfaces/MediaProcessorConnectorInterface.html +8 -3
- package/dist/docs/interfaces/MediaProcessorInterface.html +16 -13
- package/dist/docs/modules.html +1 -53
- package/dist/docs/types/DropInfo.html +6 -0
- package/dist/docs/types/ErrorData.html +8 -0
- package/dist/docs/types/EventDataMap.html +9 -0
- package/dist/docs/types/EventMetaData.html +4 -0
- package/dist/docs/types/VonageMetadata.html +8 -0
- package/dist/docs/types/WarnData.html +8 -0
- package/dist/media-processor.es.js +565 -386
- package/dist/media-processor.min.js +2 -1
- package/dist/media-processor.static.js +565 -386
- package/dist/media-processor.umd.js +2 -2
- package/dist/types/lib/main.d.ts +2 -0
- package/dist/types/lib/src/core/MediaProcessor.d.ts +12 -2
- package/dist/types/lib/src/core/MediaProcessorConnector.d.ts +1 -8
- package/dist/types/lib/src/core/MediaProcessorConnectorInterface.d.ts +0 -2
- package/dist/types/lib/src/core/MediaProcessorInterface.d.ts +8 -0
- package/dist/types/lib/src/core/pipeline.d.ts +5 -6
- package/dist/types/lib/src/utils/MediaStreamTrackGenerator.polyfill.d.ts +0 -0
- package/dist/types/lib/src/utils/MediaStreamTrackProcessor.polyfill.d.ts +0 -0
- package/dist/types/lib/src/utils/utils.d.ts +2 -0
- package/package.json +19 -21
- package/dist/docs/assets/icons.css +0 -1043
- package/dist/docs/assets/icons.png +0 -0
- package/dist/docs/assets/icons@2x.png +0 -0
- package/dist/docs/assets/widgets.png +0 -0
- package/dist/docs/assets/widgets@2x.png +0 -0
|
@@ -1,73 +1,220 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var T;
|
|
2
|
+
self.MediaStreamTrackProcessor || (self.MediaStreamTrackProcessor = (T = class {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
const t = e.track ?? e;
|
|
5
|
+
t.kind == "video" ? this.readable = new ReadableStream({
|
|
6
|
+
async start(s) {
|
|
7
|
+
t.addEventListener(
|
|
8
|
+
"ended",
|
|
9
|
+
() => s.close(),
|
|
10
|
+
{ once: !0 }
|
|
11
|
+
), this.video = document.createElement("video"), this.video.srcObject = new MediaStream([t]), await Promise.all([
|
|
12
|
+
this.video.play(),
|
|
13
|
+
new Promise(
|
|
14
|
+
(i) => this.video.onloadedmetadata = i
|
|
15
|
+
)
|
|
16
|
+
]), this.track = t, this.canvas = new OffscreenCanvas(
|
|
17
|
+
this.video.videoWidth,
|
|
18
|
+
this.video.videoHeight
|
|
19
|
+
), this.ctx = this.canvas.getContext("2d", {
|
|
20
|
+
desynchronized: !0
|
|
21
|
+
}), this.t1 = performance.now();
|
|
22
|
+
},
|
|
23
|
+
async pull(s) {
|
|
24
|
+
if (t.readyState == "ended")
|
|
25
|
+
return s.close();
|
|
26
|
+
const i = t.getSettings().frameRate || 30;
|
|
27
|
+
for (; performance.now() - this.t1 < 1e3 / i; )
|
|
28
|
+
if (await new Promise((n) => requestAnimationFrame(n)), t.readyState == "ended")
|
|
29
|
+
return s.close();
|
|
30
|
+
this.canvas.width = this.video.videoWidth, this.canvas.height = this.video.videoHeight, this.t1 = performance.now(), this.ctx.drawImage(this.video, 0, 0), s.enqueue(
|
|
31
|
+
new VideoFrame(this.canvas, {
|
|
32
|
+
timestamp: this.t1
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}) : t.kind == "audio" && (this.readable = new ReadableStream({
|
|
37
|
+
async start(s) {
|
|
38
|
+
t.addEventListener(
|
|
39
|
+
"ended",
|
|
40
|
+
() => s.close(),
|
|
41
|
+
{ once: !0 }
|
|
42
|
+
), this.ac = new AudioContext(), this.arrays = [];
|
|
43
|
+
function i() {
|
|
44
|
+
registerProcessor(
|
|
45
|
+
"mstp-shim",
|
|
46
|
+
class extends AudioWorkletProcessor {
|
|
47
|
+
process(o) {
|
|
48
|
+
return this.port.postMessage(o), !0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
await this.ac.audioWorklet.addModule(
|
|
54
|
+
`data:text/javascript,(${i.toString()})()`
|
|
55
|
+
), this.node = new AudioWorkletNode(this.ac, "mstp-shim"), this.ac.createMediaStreamSource(new MediaStream([t])).connect(this.node), this.node.port.addEventListener(
|
|
56
|
+
"message",
|
|
57
|
+
({ data: n }) => n[0][0] && this.arrays.push(n)
|
|
58
|
+
);
|
|
59
|
+
},
|
|
60
|
+
async pull(s) {
|
|
61
|
+
if (t.readyState == "ended")
|
|
62
|
+
return s.close();
|
|
63
|
+
for (; !this.arrays.length; )
|
|
64
|
+
if (await new Promise(
|
|
65
|
+
(o) => this.node.port.onmessage = o
|
|
66
|
+
), t.readyState == "ended")
|
|
67
|
+
return s.close();
|
|
68
|
+
const [i] = this.arrays.shift(), n = new Float32Array(
|
|
69
|
+
i.reduce((o, a) => o + a.length, 0)
|
|
70
|
+
);
|
|
71
|
+
i.reduce(
|
|
72
|
+
(o, a) => (n.set(a, o), o + a.length),
|
|
73
|
+
0
|
|
74
|
+
), s.enqueue(
|
|
75
|
+
new AudioData({
|
|
76
|
+
format: "f32-planar",
|
|
77
|
+
sampleRate: this.ac.sampleRate,
|
|
78
|
+
numberOfFrames: i[0].length,
|
|
79
|
+
numberOfChannels: i.length,
|
|
80
|
+
timestamp: this.ac.currentTime * 1e6 | 0,
|
|
81
|
+
data: n,
|
|
82
|
+
transfer: [n.buffer]
|
|
83
|
+
})
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
}, T.__POLYFILLED = !0, T));
|
|
89
|
+
var S;
|
|
90
|
+
self.MediaStreamTrackGenerator || (self.MediaStreamTrackGenerator = (S = class {
|
|
91
|
+
constructor({ kind: e }) {
|
|
92
|
+
if (e == "video") {
|
|
93
|
+
const t = document.createElement("canvas"), s = t.getContext("2d", {
|
|
94
|
+
desynchronized: !0
|
|
95
|
+
}), i = t.captureStream().getVideoTracks()[0];
|
|
96
|
+
return i.writable = new WritableStream({
|
|
97
|
+
write(n) {
|
|
98
|
+
t.width = n.displayWidth, t.height = n.displayHeight, s.drawImage(n, 0, 0, t.width, t.height), n.close();
|
|
99
|
+
}
|
|
100
|
+
}), i;
|
|
101
|
+
} else if (e == "audio") {
|
|
102
|
+
const t = new AudioContext(), s = t.createMediaStreamDestination(), [i] = s.stream.getAudioTracks();
|
|
103
|
+
return i.writable = new WritableStream({
|
|
104
|
+
async start(n) {
|
|
105
|
+
this.arrays = [];
|
|
106
|
+
function o() {
|
|
107
|
+
registerProcessor(
|
|
108
|
+
"mstg-shim",
|
|
109
|
+
class extends AudioWorkletProcessor {
|
|
110
|
+
constructor() {
|
|
111
|
+
super(), this.arrays = [], this.arrayOffset = 0, this.port.onmessage = ({ data: l }) => this.arrays.push(l), this.emptyArray = new Float32Array(0);
|
|
112
|
+
}
|
|
113
|
+
process(l, [[w]]) {
|
|
114
|
+
for (let F = 0; F < w.length; F++)
|
|
115
|
+
(!this.array || this.arrayOffset >= this.array.length) && (this.array = this.arrays.shift() || this.emptyArray, this.arrayOffset = 0), w[F] = this.array[this.arrayOffset++] || 0;
|
|
116
|
+
return !0;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
return await t.audioWorklet.addModule(
|
|
122
|
+
`data:text/javascript,(${o.toString()})()`
|
|
123
|
+
), this.node = new AudioWorkletNode(t, "mstg-shim"), this.node.connect(s), i;
|
|
124
|
+
},
|
|
125
|
+
write(n) {
|
|
126
|
+
const o = new Float32Array(
|
|
127
|
+
n.numberOfFrames * n.numberOfChannels
|
|
128
|
+
);
|
|
129
|
+
n.copyTo(o, { planeIndex: 0 }), this.node.port.postMessage(o, [o.buffer]), n.close();
|
|
130
|
+
}
|
|
131
|
+
}), i;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, S.__POLYFILLED = !0, S));
|
|
135
|
+
async function $e() {
|
|
136
|
+
return new Promise(async (r, e) => {
|
|
137
|
+
await X() || J() ? r() : e(
|
|
4
138
|
"Your browser does not support the MediaStreamTrack API for Insertable Streams of Media."
|
|
5
|
-
)
|
|
139
|
+
);
|
|
6
140
|
});
|
|
7
141
|
}
|
|
8
|
-
|
|
142
|
+
function J() {
|
|
143
|
+
return self.MediaStreamTrackProcessor !== void 0 && self.MediaStreamTrackGenerator !== void 0 && (!(self.MediaStreamTrackProcessor.hasOwnProperty("__POLYFILLED") || self.MediaStreamTrackGenerator.hasOwnProperty("__POLYFILLED")) || N());
|
|
9
144
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
145
|
+
function N() {
|
|
146
|
+
return [
|
|
147
|
+
self.ReadableStream,
|
|
148
|
+
self.WritableStream,
|
|
149
|
+
self.MediaStream,
|
|
150
|
+
self.OffscreenCanvas,
|
|
151
|
+
self.VideoFrame,
|
|
152
|
+
self.AudioContext,
|
|
153
|
+
self.AudioWorkletNode
|
|
154
|
+
].filter((r) => r === void 0).length === 0;
|
|
155
|
+
}
|
|
156
|
+
function X() {
|
|
157
|
+
return new Promise((r) => {
|
|
158
|
+
function e() {
|
|
159
|
+
self.postMessage(
|
|
160
|
+
typeof MediaStreamTrackProcessor < "u" && typeof VideoTrackGenerator < "u"
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
const t = new Worker(`data:text/javascript,(${e.toString()})()`);
|
|
164
|
+
t.onmessage = ({ data: s }) => r(s);
|
|
165
|
+
});
|
|
24
166
|
}
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
167
|
+
const u = /* @__PURE__ */ new WeakMap(), m = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ Symbol("anyProducer"), j = Promise.resolve(), I = /* @__PURE__ */ Symbol("listenerAdded"), x = /* @__PURE__ */ Symbol("listenerRemoved");
|
|
168
|
+
let C = !1, G = !1;
|
|
169
|
+
const O = (r) => typeof r == "string" || typeof r == "symbol" || typeof r == "number";
|
|
170
|
+
function y(r) {
|
|
171
|
+
if (!O(r))
|
|
172
|
+
throw new TypeError("`eventName` must be a string, symbol, or number");
|
|
30
173
|
}
|
|
31
|
-
function
|
|
32
|
-
if (typeof
|
|
174
|
+
function v(r) {
|
|
175
|
+
if (typeof r != "function")
|
|
33
176
|
throw new TypeError("listener must be a function");
|
|
34
177
|
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
|
|
178
|
+
function _(r, e) {
|
|
179
|
+
const t = m.get(r);
|
|
180
|
+
if (t.has(e))
|
|
181
|
+
return t.get(e);
|
|
38
182
|
}
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
|
|
183
|
+
function E(r, e) {
|
|
184
|
+
const t = O(e) ? e : R, s = d.get(r);
|
|
185
|
+
if (s.has(t))
|
|
186
|
+
return s.get(t);
|
|
42
187
|
}
|
|
43
|
-
function
|
|
44
|
-
const s =
|
|
188
|
+
function ee(r, e, t) {
|
|
189
|
+
const s = d.get(r);
|
|
45
190
|
if (s.has(e))
|
|
46
191
|
for (const i of s.get(e))
|
|
47
|
-
i.enqueue(
|
|
48
|
-
if (s.has(
|
|
49
|
-
const i = Promise.all([e,
|
|
50
|
-
for (const n of s.get(
|
|
192
|
+
i.enqueue(t);
|
|
193
|
+
if (s.has(R)) {
|
|
194
|
+
const i = Promise.all([e, t]);
|
|
195
|
+
for (const n of s.get(R))
|
|
51
196
|
n.enqueue(i);
|
|
52
197
|
}
|
|
53
198
|
}
|
|
54
|
-
function
|
|
199
|
+
function H(r, e) {
|
|
55
200
|
e = Array.isArray(e) ? e : [e];
|
|
56
|
-
let
|
|
201
|
+
let t = !1, s = () => {
|
|
57
202
|
}, i = [];
|
|
58
203
|
const n = {
|
|
59
204
|
enqueue(o) {
|
|
60
205
|
i.push(o), s();
|
|
61
206
|
},
|
|
62
207
|
finish() {
|
|
63
|
-
|
|
208
|
+
t = !0, s();
|
|
64
209
|
}
|
|
65
210
|
};
|
|
66
|
-
for (const o of e)
|
|
67
|
-
|
|
211
|
+
for (const o of e) {
|
|
212
|
+
let a = E(r, o);
|
|
213
|
+
a || (a = /* @__PURE__ */ new Set(), d.get(r).set(o, a)), a.add(n);
|
|
214
|
+
}
|
|
68
215
|
return {
|
|
69
216
|
async next() {
|
|
70
|
-
return i ? i.length === 0 ?
|
|
217
|
+
return i ? i.length === 0 ? t ? (i = void 0, this.next()) : (await new Promise((o) => {
|
|
71
218
|
s = o;
|
|
72
219
|
}), this.next()) : {
|
|
73
220
|
done: !1,
|
|
@@ -76,8 +223,10 @@ function D(t, e) {
|
|
|
76
223
|
},
|
|
77
224
|
async return(o) {
|
|
78
225
|
i = void 0;
|
|
79
|
-
for (const a of e)
|
|
80
|
-
|
|
226
|
+
for (const a of e) {
|
|
227
|
+
const l = E(r, a);
|
|
228
|
+
l && (l.delete(n), l.size === 0 && d.get(r).delete(a));
|
|
229
|
+
}
|
|
81
230
|
return s(), arguments.length > 0 ? { done: !0, value: await o } : { done: !0 };
|
|
82
231
|
},
|
|
83
232
|
[Symbol.asyncIterator]() {
|
|
@@ -85,29 +234,37 @@ function D(t, e) {
|
|
|
85
234
|
}
|
|
86
235
|
};
|
|
87
236
|
}
|
|
88
|
-
function
|
|
89
|
-
if (
|
|
90
|
-
return
|
|
91
|
-
if (!Array.isArray(
|
|
237
|
+
function Q(r) {
|
|
238
|
+
if (r === void 0)
|
|
239
|
+
return Y;
|
|
240
|
+
if (!Array.isArray(r))
|
|
92
241
|
throw new TypeError("`methodNames` must be an array of strings");
|
|
93
|
-
for (const e of
|
|
94
|
-
if (!
|
|
242
|
+
for (const e of r)
|
|
243
|
+
if (!Y.includes(e))
|
|
95
244
|
throw typeof e != "string" ? new TypeError("`methodNames` element must be a string") : new Error(`${e} is not Emittery method`);
|
|
96
|
-
return
|
|
245
|
+
return r;
|
|
246
|
+
}
|
|
247
|
+
const b = (r) => r === I || r === x;
|
|
248
|
+
function P(r, e, t) {
|
|
249
|
+
if (b(e))
|
|
250
|
+
try {
|
|
251
|
+
C = !0, r.emit(e, t);
|
|
252
|
+
} finally {
|
|
253
|
+
C = !1;
|
|
254
|
+
}
|
|
97
255
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return r = $(r), (s) => {
|
|
256
|
+
class h {
|
|
257
|
+
static mixin(e, t) {
|
|
258
|
+
return t = Q(t), (s) => {
|
|
102
259
|
if (typeof s != "function")
|
|
103
260
|
throw new TypeError("`target` must be function");
|
|
104
|
-
for (const o of
|
|
261
|
+
for (const o of t)
|
|
105
262
|
if (s.prototype[o] !== void 0)
|
|
106
263
|
throw new Error(`The property \`${o}\` already exists on \`target\``);
|
|
107
264
|
function i() {
|
|
108
265
|
return Object.defineProperty(this, e, {
|
|
109
266
|
enumerable: !1,
|
|
110
|
-
value: new
|
|
267
|
+
value: new h()
|
|
111
268
|
}), this[e];
|
|
112
269
|
}
|
|
113
270
|
Object.defineProperty(s.prototype, e, {
|
|
@@ -117,7 +274,7 @@ class d {
|
|
|
117
274
|
const n = (o) => function(...a) {
|
|
118
275
|
return this[e][o](...a);
|
|
119
276
|
};
|
|
120
|
-
for (const o of
|
|
277
|
+
for (const o of t)
|
|
121
278
|
Object.defineProperty(s.prototype, o, {
|
|
122
279
|
enumerable: !1,
|
|
123
280
|
value: n(o)
|
|
@@ -126,127 +283,151 @@ class d {
|
|
|
126
283
|
};
|
|
127
284
|
}
|
|
128
285
|
static get isDebugEnabled() {
|
|
129
|
-
if (typeof process != "object")
|
|
130
|
-
return
|
|
131
|
-
const { env: e } = process
|
|
132
|
-
return e.DEBUG === "emittery" || e.DEBUG === "*" ||
|
|
286
|
+
if (typeof globalThis.process?.env != "object")
|
|
287
|
+
return G;
|
|
288
|
+
const { env: e } = globalThis.process ?? { env: {} };
|
|
289
|
+
return e.DEBUG === "emittery" || e.DEBUG === "*" || G;
|
|
133
290
|
}
|
|
134
291
|
static set isDebugEnabled(e) {
|
|
135
|
-
|
|
292
|
+
G = e;
|
|
136
293
|
}
|
|
137
294
|
constructor(e = {}) {
|
|
138
|
-
|
|
295
|
+
u.set(this, /* @__PURE__ */ new Set()), m.set(this, /* @__PURE__ */ new Map()), d.set(this, /* @__PURE__ */ new Map()), d.get(this).set(R, /* @__PURE__ */ new Set()), this.debug = e.debug ?? {}, this.debug.enabled === void 0 && (this.debug.enabled = !1), this.debug.logger || (this.debug.logger = (t, s, i, n) => {
|
|
139
296
|
try {
|
|
140
297
|
n = JSON.stringify(n);
|
|
141
298
|
} catch {
|
|
142
299
|
n = `Object with the following keys failed to stringify: ${Object.keys(n).join(",")}`;
|
|
143
300
|
}
|
|
144
|
-
typeof i == "symbol" && (i = i.toString());
|
|
301
|
+
(typeof i == "symbol" || typeof i == "number") && (i = i.toString());
|
|
145
302
|
const o = /* @__PURE__ */ new Date(), a = `${o.getHours()}:${o.getMinutes()}:${o.getSeconds()}.${o.getMilliseconds()}`;
|
|
146
|
-
console.log(`[${a}][emittery:${
|
|
303
|
+
console.log(`[${a}][emittery:${t}][${s}] Event Name: ${i}
|
|
147
304
|
data: ${n}`);
|
|
148
305
|
});
|
|
149
306
|
}
|
|
150
|
-
logIfDebugEnabled(e,
|
|
151
|
-
(
|
|
307
|
+
logIfDebugEnabled(e, t, s) {
|
|
308
|
+
(h.isDebugEnabled || this.debug.enabled) && this.debug.logger(e, this.debug.name, t, s);
|
|
152
309
|
}
|
|
153
|
-
on(e,
|
|
154
|
-
|
|
155
|
-
for (const
|
|
156
|
-
|
|
157
|
-
|
|
310
|
+
on(e, t, { signal: s } = {}) {
|
|
311
|
+
v(t), e = Array.isArray(e) ? e : [e];
|
|
312
|
+
for (const n of e) {
|
|
313
|
+
y(n);
|
|
314
|
+
let o = _(this, n);
|
|
315
|
+
o || (o = /* @__PURE__ */ new Set(), m.get(this).set(n, o)), o.add(t), this.logIfDebugEnabled("subscribe", n, void 0), b(n) || P(this, I, { eventName: n, listener: t });
|
|
316
|
+
}
|
|
317
|
+
const i = () => {
|
|
318
|
+
this.off(e, t), s?.removeEventListener("abort", i);
|
|
319
|
+
};
|
|
320
|
+
return s?.addEventListener("abort", i, { once: !0 }), s?.aborted && i(), i;
|
|
158
321
|
}
|
|
159
|
-
off(e,
|
|
160
|
-
|
|
161
|
-
for (const s of e)
|
|
162
|
-
|
|
322
|
+
off(e, t) {
|
|
323
|
+
v(t), e = Array.isArray(e) ? e : [e];
|
|
324
|
+
for (const s of e) {
|
|
325
|
+
y(s);
|
|
326
|
+
const i = _(this, s);
|
|
327
|
+
i && (i.delete(t), i.size === 0 && m.get(this).delete(s)), this.logIfDebugEnabled("unsubscribe", s, void 0), b(s) || P(this, x, { eventName: s, listener: t });
|
|
328
|
+
}
|
|
163
329
|
}
|
|
164
|
-
once(e) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
330
|
+
once(e, t) {
|
|
331
|
+
if (t !== void 0 && typeof t != "function")
|
|
332
|
+
throw new TypeError("predicate must be a function");
|
|
333
|
+
let s;
|
|
334
|
+
const i = new Promise((n) => {
|
|
335
|
+
s = this.on(e, (o) => {
|
|
336
|
+
t && !t(o) || (s(), n(o));
|
|
168
337
|
});
|
|
169
338
|
});
|
|
339
|
+
return i.off = s, i;
|
|
170
340
|
}
|
|
171
341
|
events(e) {
|
|
172
342
|
e = Array.isArray(e) ? e : [e];
|
|
173
|
-
for (const
|
|
174
|
-
|
|
175
|
-
return
|
|
176
|
-
}
|
|
177
|
-
async emit(e,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
343
|
+
for (const t of e)
|
|
344
|
+
y(t);
|
|
345
|
+
return H(this, e);
|
|
346
|
+
}
|
|
347
|
+
async emit(e, t) {
|
|
348
|
+
if (y(e), b(e) && !C)
|
|
349
|
+
throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");
|
|
350
|
+
this.logIfDebugEnabled("emit", e, t), ee(this, e, t);
|
|
351
|
+
const s = _(this, e) ?? /* @__PURE__ */ new Set(), i = u.get(this), n = [...s], o = b(e) ? [] : [...i];
|
|
352
|
+
await j, await Promise.all([
|
|
181
353
|
...n.map(async (a) => {
|
|
182
354
|
if (s.has(a))
|
|
183
|
-
return a(
|
|
355
|
+
return a(t);
|
|
184
356
|
}),
|
|
185
357
|
...o.map(async (a) => {
|
|
186
358
|
if (i.has(a))
|
|
187
|
-
return a(e,
|
|
359
|
+
return a(e, t);
|
|
188
360
|
})
|
|
189
361
|
]);
|
|
190
362
|
}
|
|
191
|
-
async emitSerial(e,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
363
|
+
async emitSerial(e, t) {
|
|
364
|
+
if (y(e), b(e) && !C)
|
|
365
|
+
throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");
|
|
366
|
+
this.logIfDebugEnabled("emitSerial", e, t);
|
|
367
|
+
const s = _(this, e) ?? /* @__PURE__ */ new Set(), i = u.get(this), n = [...s], o = [...i];
|
|
368
|
+
await j;
|
|
195
369
|
for (const a of n)
|
|
196
|
-
s.has(a) && await a(
|
|
370
|
+
s.has(a) && await a(t);
|
|
197
371
|
for (const a of o)
|
|
198
|
-
i.has(a) && await a(e,
|
|
372
|
+
i.has(a) && await a(e, t);
|
|
199
373
|
}
|
|
200
|
-
onAny(e) {
|
|
201
|
-
|
|
374
|
+
onAny(e, { signal: t } = {}) {
|
|
375
|
+
v(e), this.logIfDebugEnabled("subscribeAny", void 0, void 0), u.get(this).add(e), P(this, I, { listener: e });
|
|
376
|
+
const s = () => {
|
|
377
|
+
this.offAny(e), t?.removeEventListener("abort", s);
|
|
378
|
+
};
|
|
379
|
+
return t?.addEventListener("abort", s, { once: !0 }), t?.aborted && s(), s;
|
|
202
380
|
}
|
|
203
381
|
anyEvent() {
|
|
204
|
-
return
|
|
382
|
+
return H(this);
|
|
205
383
|
}
|
|
206
384
|
offAny(e) {
|
|
207
|
-
|
|
385
|
+
v(e), this.logIfDebugEnabled("unsubscribeAny", void 0, void 0), P(this, x, { listener: e }), u.get(this).delete(e);
|
|
208
386
|
}
|
|
209
387
|
clearListeners(e) {
|
|
210
388
|
e = Array.isArray(e) ? e : [e];
|
|
211
|
-
for (const
|
|
212
|
-
if (this.logIfDebugEnabled("clear",
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
389
|
+
for (const t of e)
|
|
390
|
+
if (this.logIfDebugEnabled("clear", t, void 0), O(t)) {
|
|
391
|
+
const s = _(this, t);
|
|
392
|
+
s && s.clear();
|
|
393
|
+
const i = E(this, t);
|
|
394
|
+
if (i) {
|
|
395
|
+
for (const n of i)
|
|
396
|
+
n.finish();
|
|
397
|
+
i.clear();
|
|
398
|
+
}
|
|
218
399
|
} else {
|
|
219
|
-
|
|
220
|
-
for (const s of
|
|
221
|
-
|
|
222
|
-
for (const s of
|
|
223
|
-
for (const
|
|
224
|
-
|
|
225
|
-
|
|
400
|
+
u.get(this).clear();
|
|
401
|
+
for (const [s, i] of m.get(this).entries())
|
|
402
|
+
i.clear(), m.get(this).delete(s);
|
|
403
|
+
for (const [s, i] of d.get(this).entries()) {
|
|
404
|
+
for (const n of i)
|
|
405
|
+
n.finish();
|
|
406
|
+
i.clear(), d.get(this).delete(s);
|
|
226
407
|
}
|
|
227
408
|
}
|
|
228
409
|
}
|
|
229
410
|
listenerCount(e) {
|
|
230
411
|
e = Array.isArray(e) ? e : [e];
|
|
231
|
-
let
|
|
412
|
+
let t = 0;
|
|
232
413
|
for (const s of e) {
|
|
233
|
-
if (
|
|
234
|
-
|
|
414
|
+
if (O(s)) {
|
|
415
|
+
t += u.get(this).size + (_(this, s)?.size ?? 0) + (E(this, s)?.size ?? 0) + (E(this)?.size ?? 0);
|
|
235
416
|
continue;
|
|
236
417
|
}
|
|
237
|
-
|
|
238
|
-
for (const i of
|
|
239
|
-
|
|
240
|
-
for (const i of
|
|
241
|
-
|
|
418
|
+
s !== void 0 && y(s), t += u.get(this).size;
|
|
419
|
+
for (const i of m.get(this).values())
|
|
420
|
+
t += i.size;
|
|
421
|
+
for (const i of d.get(this).values())
|
|
422
|
+
t += i.size;
|
|
242
423
|
}
|
|
243
|
-
return
|
|
424
|
+
return t;
|
|
244
425
|
}
|
|
245
|
-
bindMethods(e,
|
|
426
|
+
bindMethods(e, t) {
|
|
246
427
|
if (typeof e != "object" || e === null)
|
|
247
428
|
throw new TypeError("`target` must be an object");
|
|
248
|
-
|
|
249
|
-
for (const s of
|
|
429
|
+
t = Q(t);
|
|
430
|
+
for (const s of t) {
|
|
250
431
|
if (e[s] !== void 0)
|
|
251
432
|
throw new Error(`The property \`${s}\` already exists on \`target\``);
|
|
252
433
|
Object.defineProperty(e, s, {
|
|
@@ -256,232 +437,209 @@ class d {
|
|
|
256
437
|
}
|
|
257
438
|
}
|
|
258
439
|
}
|
|
259
|
-
const
|
|
260
|
-
Object.defineProperty(
|
|
261
|
-
value:
|
|
440
|
+
const Y = Object.getOwnPropertyNames(h.prototype).filter((r) => r !== "constructor");
|
|
441
|
+
Object.defineProperty(h, "listenerAdded", {
|
|
442
|
+
value: I,
|
|
262
443
|
writable: !1,
|
|
263
444
|
enumerable: !0,
|
|
264
445
|
configurable: !1
|
|
265
446
|
});
|
|
266
|
-
Object.defineProperty(
|
|
267
|
-
value:
|
|
447
|
+
Object.defineProperty(h, "listenerRemoved", {
|
|
448
|
+
value: x,
|
|
268
449
|
writable: !1,
|
|
269
450
|
enumerable: !0,
|
|
270
451
|
configurable: !1
|
|
271
452
|
});
|
|
272
|
-
var
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
if (q(t))
|
|
279
|
-
return t;
|
|
280
|
-
try {
|
|
281
|
-
return new Error(JSON.stringify(t));
|
|
282
|
-
} catch {
|
|
283
|
-
return new Error(String(t));
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
function I(t) {
|
|
287
|
-
return J(t).message;
|
|
288
|
-
}
|
|
289
|
-
var K = Object.defineProperty, X = (t, e, r) => e in t ? K(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Z = (t, e, r) => (X(t, typeof e != "symbol" ? e + "" : e, r), r), N = /* @__PURE__ */ ((t) => (t.automation = "automation", t.test = "test", t.vbc = "vbc", t.video = "video", t.voice = "voice", t))(N || {});
|
|
290
|
-
const ee = "hlg.tokbox.com/prod/logging/vcp_webrtc", re = "https://", te = 1e4;
|
|
291
|
-
let w;
|
|
292
|
-
const se = new Uint8Array(16);
|
|
293
|
-
function ie() {
|
|
294
|
-
if (!w && (w = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !w))
|
|
453
|
+
var te = Object.defineProperty, re = (r, e, t) => e in r ? te(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, se = (r, e, t) => (re(r, e + "", t), t), ie = /* @__PURE__ */ ((r) => (r.automation = "automation", r.test = "test", r.vbc = "vbc", r.video = "video", r.voice = "voice", r))(ie || {});
|
|
454
|
+
const ne = "hlg.tokbox.com/prod/logging/vcp_webrtc", oe = "https://", ae = 1e4;
|
|
455
|
+
let M;
|
|
456
|
+
const ce = new Uint8Array(16);
|
|
457
|
+
function le() {
|
|
458
|
+
if (!M && (M = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !M))
|
|
295
459
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
296
|
-
return
|
|
460
|
+
return M(ce);
|
|
297
461
|
}
|
|
298
462
|
const c = [];
|
|
299
|
-
for (let
|
|
300
|
-
c.push((
|
|
301
|
-
function
|
|
302
|
-
return (c[
|
|
463
|
+
for (let r = 0; r < 256; ++r)
|
|
464
|
+
c.push((r + 256).toString(16).slice(1));
|
|
465
|
+
function de(r, e = 0) {
|
|
466
|
+
return (c[r[e + 0]] + c[r[e + 1]] + c[r[e + 2]] + c[r[e + 3]] + "-" + c[r[e + 4]] + c[r[e + 5]] + "-" + c[r[e + 6]] + c[r[e + 7]] + "-" + c[r[e + 8]] + c[r[e + 9]] + "-" + c[r[e + 10]] + c[r[e + 11]] + c[r[e + 12]] + c[r[e + 13]] + c[r[e + 14]] + c[r[e + 15]]).toLowerCase();
|
|
303
467
|
}
|
|
304
|
-
const
|
|
305
|
-
randomUUID:
|
|
468
|
+
const fe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), q = {
|
|
469
|
+
randomUUID: fe
|
|
306
470
|
};
|
|
307
|
-
function
|
|
308
|
-
if (
|
|
309
|
-
return
|
|
310
|
-
|
|
311
|
-
const s =
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
e[r + i] = s[i];
|
|
316
|
-
return e;
|
|
317
|
-
}
|
|
318
|
-
return ne(s);
|
|
319
|
-
}
|
|
320
|
-
function F(t, e) {
|
|
471
|
+
function he(r, e, t) {
|
|
472
|
+
if (q.randomUUID && !r)
|
|
473
|
+
return q.randomUUID();
|
|
474
|
+
r = r || {};
|
|
475
|
+
const s = r.random || (r.rng || le)();
|
|
476
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, de(s);
|
|
477
|
+
}
|
|
478
|
+
function z(r, e) {
|
|
321
479
|
globalThis.vonage || (globalThis.vonage = {}), globalThis.vonage.workerizer || (globalThis.vonage.workerizer = {});
|
|
322
|
-
let
|
|
323
|
-
return r
|
|
480
|
+
let t = globalThis.vonage.workerizer;
|
|
481
|
+
return t[r] || (t[r] = e), t[r];
|
|
324
482
|
}
|
|
325
|
-
const
|
|
483
|
+
const p = z(
|
|
326
484
|
"globals",
|
|
327
485
|
{}
|
|
328
486
|
);
|
|
329
|
-
var
|
|
330
|
-
function
|
|
331
|
-
return [ImageBitmap, ReadableStream, WritableStream].some((
|
|
332
|
-
}
|
|
333
|
-
let
|
|
334
|
-
function
|
|
335
|
-
const n =
|
|
336
|
-
return
|
|
487
|
+
var g = /* @__PURE__ */ ((r) => (r.INIT = "INIT", r.FORWARD = "FORWARD", r.TERMINATE = "TERMINATE", r.GLOBALS_SYNC = "GLOBALS_SYNC", r))(g || {});
|
|
488
|
+
function Z(r) {
|
|
489
|
+
return [ImageBitmap, ReadableStream, WritableStream].some((t) => r instanceof t);
|
|
490
|
+
}
|
|
491
|
+
let ue = 0;
|
|
492
|
+
function pe(r, e, t, s, i) {
|
|
493
|
+
const n = ue++;
|
|
494
|
+
return r.postMessage(
|
|
337
495
|
{
|
|
338
496
|
id: n,
|
|
339
497
|
type: e,
|
|
340
|
-
functionName:
|
|
498
|
+
functionName: t,
|
|
341
499
|
args: s
|
|
342
500
|
},
|
|
343
|
-
s.filter((a) =>
|
|
501
|
+
s.filter((a) => Z(a))
|
|
344
502
|
), new Promise((a) => {
|
|
345
|
-
i
|
|
503
|
+
i?.set(n, a);
|
|
346
504
|
});
|
|
347
505
|
}
|
|
348
|
-
function
|
|
349
|
-
const { id:
|
|
506
|
+
function k(r, e) {
|
|
507
|
+
const { id: t, type: s } = r, i = Array.isArray(e) ? e : [e];
|
|
350
508
|
postMessage(
|
|
351
509
|
{
|
|
352
|
-
id:
|
|
510
|
+
id: t,
|
|
353
511
|
type: s,
|
|
354
512
|
result: e
|
|
355
513
|
},
|
|
356
|
-
i.filter((n) =>
|
|
514
|
+
i.filter((n) => Z(n))
|
|
357
515
|
);
|
|
358
516
|
}
|
|
359
|
-
const
|
|
360
|
-
function
|
|
517
|
+
const B = z("workerized", {});
|
|
518
|
+
function K() {
|
|
361
519
|
return typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope;
|
|
362
520
|
}
|
|
363
|
-
async function
|
|
364
|
-
if (
|
|
365
|
-
|
|
521
|
+
async function me() {
|
|
522
|
+
if (K())
|
|
523
|
+
k({ type: g.GLOBALS_SYNC }, p);
|
|
366
524
|
else {
|
|
367
|
-
const
|
|
368
|
-
for (const e in
|
|
369
|
-
const { worker:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
525
|
+
const r = [];
|
|
526
|
+
for (const e in B) {
|
|
527
|
+
const { worker: t, resolvers: s } = B[e].workerContext;
|
|
528
|
+
t && r.push(
|
|
529
|
+
pe(
|
|
530
|
+
t,
|
|
531
|
+
g.GLOBALS_SYNC,
|
|
374
532
|
"",
|
|
375
|
-
[
|
|
533
|
+
[p],
|
|
376
534
|
s
|
|
377
535
|
)
|
|
378
536
|
);
|
|
379
537
|
}
|
|
380
|
-
await Promise.all(
|
|
538
|
+
await Promise.all(r);
|
|
381
539
|
}
|
|
382
540
|
}
|
|
383
|
-
function
|
|
541
|
+
function L(r, e) {
|
|
384
542
|
if (Array.isArray(e))
|
|
385
543
|
e.splice(0, e.length);
|
|
386
544
|
else if (typeof e == "object")
|
|
387
|
-
for (const
|
|
388
|
-
delete e[
|
|
389
|
-
for (const
|
|
390
|
-
Array.isArray(t
|
|
545
|
+
for (const t in e)
|
|
546
|
+
delete e[t];
|
|
547
|
+
for (const t in r)
|
|
548
|
+
Array.isArray(r[t]) ? (e[t] = [], L(r[t], e[t])) : typeof r[t] == "object" ? (e[t] = {}, L(r[t], e[t])) : e[t] = r[t];
|
|
391
549
|
}
|
|
392
|
-
async function
|
|
393
|
-
const { functionName:
|
|
550
|
+
async function ge(r, e) {
|
|
551
|
+
const { functionName: t, args: s } = r;
|
|
394
552
|
if (!e.instance)
|
|
395
553
|
throw "instance not initialized";
|
|
396
|
-
if (!
|
|
554
|
+
if (!t)
|
|
397
555
|
throw "missing function name to call";
|
|
398
|
-
if (!e.instance[
|
|
399
|
-
throw `undefined function [${
|
|
400
|
-
|
|
556
|
+
if (!e.instance[t])
|
|
557
|
+
throw `undefined function [${t}] in class ${e.instance.constructor.workerId}`;
|
|
558
|
+
k(r, await e.instance[t](...s ?? []));
|
|
401
559
|
}
|
|
402
|
-
const
|
|
403
|
-
function
|
|
404
|
-
if (!
|
|
560
|
+
const we = z("registeredWorkers", {});
|
|
561
|
+
function ye(r, e) {
|
|
562
|
+
if (!r.args)
|
|
405
563
|
throw "Missing className while initializing worker";
|
|
406
|
-
const [
|
|
564
|
+
const [t, s] = r.args, i = we[t];
|
|
407
565
|
if (i)
|
|
408
|
-
e.instance = new i(
|
|
566
|
+
e.instance = new i(r.args.slice(1));
|
|
409
567
|
else
|
|
410
|
-
throw `unknown worker class ${
|
|
411
|
-
|
|
568
|
+
throw `unknown worker class ${t}`;
|
|
569
|
+
L(s, p), k(r, typeof e.instance !== void 0);
|
|
412
570
|
}
|
|
413
|
-
async function
|
|
414
|
-
const { args:
|
|
571
|
+
async function _e(r, e) {
|
|
572
|
+
const { args: t } = r;
|
|
415
573
|
if (!e.instance)
|
|
416
574
|
throw "instance not initialized";
|
|
417
575
|
let s;
|
|
418
|
-
e.instance.terminate && (s = await e.instance.terminate(...
|
|
576
|
+
e.instance.terminate && (s = await e.instance.terminate(...t ?? [])), k(r, s);
|
|
419
577
|
}
|
|
420
|
-
function
|
|
421
|
-
if (!
|
|
578
|
+
function be(r) {
|
|
579
|
+
if (!r.args)
|
|
422
580
|
throw "Missing globals while syncing";
|
|
423
|
-
|
|
581
|
+
L(r.args[0], p), k(r, {});
|
|
424
582
|
}
|
|
425
|
-
function
|
|
426
|
-
const
|
|
583
|
+
function Te() {
|
|
584
|
+
const r = {};
|
|
427
585
|
onmessage = async (e) => {
|
|
428
|
-
const
|
|
429
|
-
switch (
|
|
430
|
-
case
|
|
431
|
-
|
|
586
|
+
const t = e.data;
|
|
587
|
+
switch (t.type) {
|
|
588
|
+
case g.INIT:
|
|
589
|
+
ye(t, r);
|
|
432
590
|
break;
|
|
433
|
-
case
|
|
434
|
-
|
|
591
|
+
case g.FORWARD:
|
|
592
|
+
ge(t, r);
|
|
435
593
|
break;
|
|
436
|
-
case
|
|
437
|
-
|
|
594
|
+
case g.TERMINATE:
|
|
595
|
+
_e(t, r);
|
|
438
596
|
break;
|
|
439
|
-
case
|
|
440
|
-
|
|
597
|
+
case g.GLOBALS_SYNC:
|
|
598
|
+
be(t);
|
|
441
599
|
break;
|
|
442
600
|
}
|
|
443
601
|
};
|
|
444
602
|
}
|
|
445
|
-
|
|
446
|
-
function
|
|
447
|
-
return
|
|
448
|
-
() =>
|
|
449
|
-
async (
|
|
450
|
-
|
|
603
|
+
K() && Te();
|
|
604
|
+
function Se(r, e) {
|
|
605
|
+
return p[r] || (p[r] = e), [
|
|
606
|
+
() => p[r],
|
|
607
|
+
async (t) => {
|
|
608
|
+
p[r] = t, await me();
|
|
451
609
|
}
|
|
452
610
|
];
|
|
453
611
|
}
|
|
454
|
-
function
|
|
455
|
-
return
|
|
612
|
+
function Ee(r, e) {
|
|
613
|
+
return Se(r, e);
|
|
456
614
|
}
|
|
457
|
-
const [
|
|
458
|
-
function
|
|
459
|
-
|
|
615
|
+
const [ke, ve] = Ee("metadata");
|
|
616
|
+
function Ue(r) {
|
|
617
|
+
ve(r);
|
|
460
618
|
}
|
|
461
|
-
function
|
|
462
|
-
return
|
|
619
|
+
function D() {
|
|
620
|
+
return ke();
|
|
463
621
|
}
|
|
464
|
-
class
|
|
465
|
-
constructor(e,
|
|
466
|
-
|
|
622
|
+
class V {
|
|
623
|
+
constructor(e, t) {
|
|
624
|
+
se(this, "uuid"), this.config = e, this.uuid = t ?? he();
|
|
467
625
|
}
|
|
468
626
|
async send(e) {
|
|
469
|
-
var
|
|
470
|
-
const { appId: n, sourceType: o } = (
|
|
627
|
+
var t, s, i;
|
|
628
|
+
const { appId: n, sourceType: o } = (t = D()) != null ? t : {};
|
|
471
629
|
if (!n || !o)
|
|
472
630
|
return "metadata missing";
|
|
473
|
-
const a = new AbortController(),
|
|
631
|
+
const a = new AbortController(), l = setTimeout(() => a.abort(), ae);
|
|
474
632
|
return await ((i = (s = this.config) == null ? void 0 : s.fetch) != null ? i : fetch)(this.getUrl(), {
|
|
475
633
|
method: "POST",
|
|
476
634
|
headers: this.getHeaders(),
|
|
477
635
|
body: JSON.stringify(this.buildReport(e)),
|
|
478
636
|
signal: a.signal
|
|
479
|
-
}), clearTimeout(
|
|
637
|
+
}), clearTimeout(l), "success";
|
|
480
638
|
}
|
|
481
639
|
getUrl() {
|
|
482
640
|
var e;
|
|
483
|
-
let
|
|
484
|
-
return
|
|
641
|
+
let t = (e = D().proxyUrl) != null ? e : oe;
|
|
642
|
+
return t += (t.at(-1) === "/" ? "" : "/") + ne, t;
|
|
485
643
|
}
|
|
486
644
|
getHeaders() {
|
|
487
645
|
return {
|
|
@@ -489,52 +647,79 @@ class L {
|
|
|
489
647
|
};
|
|
490
648
|
}
|
|
491
649
|
buildReport(e) {
|
|
492
|
-
const
|
|
650
|
+
const t = D();
|
|
493
651
|
return {
|
|
494
652
|
guid: this.uuid,
|
|
495
653
|
...e,
|
|
496
|
-
applicationId:
|
|
654
|
+
applicationId: t.appId,
|
|
497
655
|
timestamp: Date.now(),
|
|
498
|
-
proxyUrl:
|
|
499
|
-
source:
|
|
656
|
+
proxyUrl: t.proxyUrl,
|
|
657
|
+
source: t.sourceType
|
|
500
658
|
};
|
|
501
659
|
}
|
|
502
660
|
}
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
661
|
+
const A = "3.0.0-alpha.2", W = class W {
|
|
662
|
+
};
|
|
663
|
+
W.updates = {
|
|
664
|
+
transformer_new: "New transformer",
|
|
665
|
+
transformer_null: "Null transformer"
|
|
666
|
+
}, W.errors = {
|
|
667
|
+
transformer_none: "No transformers provided",
|
|
668
|
+
transformer_start: "Cannot start transformer",
|
|
669
|
+
transformer_transform: "Cannot transform frame",
|
|
670
|
+
transformer_flush: "Cannot flush transformer",
|
|
671
|
+
readable_null: "Readable is null",
|
|
672
|
+
writable_null: "Writable is null"
|
|
673
|
+
};
|
|
674
|
+
let f = W;
|
|
675
|
+
function Pe(r) {
|
|
676
|
+
return typeof r == "object" && r !== null && "message" in r && typeof r.message == "string";
|
|
677
|
+
}
|
|
678
|
+
function Me(r) {
|
|
679
|
+
if (Pe(r)) return r;
|
|
680
|
+
try {
|
|
681
|
+
return new Error(JSON.stringify(r));
|
|
682
|
+
} catch {
|
|
683
|
+
return new Error(String(r));
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
function $(r) {
|
|
687
|
+
return Me(r).message;
|
|
688
|
+
}
|
|
689
|
+
class Ae {
|
|
690
|
+
constructor(e, t) {
|
|
691
|
+
this.config = e, this.frameTransformedCount = 0, this.frameFromSourceCount = 0, this.startAt = 0, this.reporter = new V(e, t);
|
|
507
692
|
}
|
|
508
693
|
async onFrameFromSource() {
|
|
509
694
|
this.frameFromSourceCount++;
|
|
510
695
|
}
|
|
511
696
|
get fps() {
|
|
512
|
-
const { startAt: e, frameFromSourceCount:
|
|
513
|
-
return
|
|
697
|
+
const { startAt: e, frameFromSourceCount: t } = this, i = (Date.now() - e) / 1e3;
|
|
698
|
+
return t / i;
|
|
514
699
|
}
|
|
515
|
-
async onFrameTransformed(e = {},
|
|
700
|
+
async onFrameTransformed(e = {}, t = !1) {
|
|
516
701
|
this.startAt === 0 && (this.startAt = Date.now()), this.frameTransformedCount++;
|
|
517
|
-
const { startAt: s, frameTransformedCount: i, frameFromSourceCount: n } = this, o = Date.now(), a = (o - s) / 1e3,
|
|
518
|
-
return
|
|
702
|
+
const { startAt: s, frameTransformedCount: i, frameFromSourceCount: n } = this, o = Date.now(), a = (o - s) / 1e3, l = i / a, w = n / a;
|
|
703
|
+
return t || this.frameTransformedCount >= this.config.loggingIntervalFrameCount ? (this.frameFromSourceCount = 0, this.frameTransformedCount = 0, this.startAt = o, this.reporter.config = this.config, this.reporter.send({
|
|
519
704
|
...this.config.report,
|
|
520
705
|
variation: "QoS",
|
|
521
|
-
fps:
|
|
522
|
-
transformedFps:
|
|
706
|
+
fps: w,
|
|
707
|
+
transformedFps: l,
|
|
523
708
|
framesTransformed: i,
|
|
524
709
|
...e
|
|
525
710
|
})) : "success";
|
|
526
711
|
}
|
|
527
712
|
}
|
|
528
|
-
var
|
|
529
|
-
const
|
|
530
|
-
class
|
|
531
|
-
constructor(e,
|
|
532
|
-
super(), this.reporter_ = new
|
|
533
|
-
loggingIntervalFrameCount:
|
|
713
|
+
var Re = /* @__PURE__ */ ((r) => (r.FPS_DROP = "fps_drop", r))(Re || {}), Ie = /* @__PURE__ */ ((r) => (r.start = "start", r.transform = "transform", r.flush = "flush", r))(Ie || {}), U = /* @__PURE__ */ ((r) => (r.pipeline_ended = "pipeline_ended", r.pipeline_ended_with_error = "pipeline_ended_with_error", r.pipeline_started = "pipeline_started", r.pipeline_started_with_error = "pipeline_started_with_error", r.pipeline_restarted = "pipeline_restarted", r.pipeline_restarted_with_error = "pipeline_restarted_with_error", r))(U || {});
|
|
714
|
+
const xe = 500, Ce = 0.8;
|
|
715
|
+
class Oe extends h {
|
|
716
|
+
constructor(e, t) {
|
|
717
|
+
super(), this.reporter_ = new V(), this.reporterQos_ = new Ae({
|
|
718
|
+
loggingIntervalFrameCount: xe,
|
|
534
719
|
report: {
|
|
535
|
-
version:
|
|
720
|
+
version: A
|
|
536
721
|
}
|
|
537
|
-
}), this.index_ =
|
|
722
|
+
}), this.index_ = t, this.transformer_ = e, this.shouldStop_ = !1, this.isFlashed_ = !1, this.mediaTransformerQosReportStartTimestamp_ = 0, this.videoHeight_ = 0, this.videoWidth_ = 0, this.trackExpectedRate_ = -1, this.transformerType_ = "Custom", "getTransformerType" in e && (this.transformerType_ = e.getTransformerType()), this.report({
|
|
538
723
|
variation: "Create"
|
|
539
724
|
});
|
|
540
725
|
}
|
|
@@ -545,45 +730,44 @@ class ke extends v {
|
|
|
545
730
|
if (this.controller_ = e, this.transformer_ && typeof this.transformer_.start == "function")
|
|
546
731
|
try {
|
|
547
732
|
await this.transformer_.start(e);
|
|
548
|
-
} catch (
|
|
733
|
+
} catch (t) {
|
|
549
734
|
this.report({
|
|
550
|
-
message:
|
|
735
|
+
message: f.errors.transformer_start,
|
|
551
736
|
variation: "Error",
|
|
552
|
-
error:
|
|
737
|
+
error: $(t)
|
|
553
738
|
});
|
|
554
739
|
const s = {
|
|
555
740
|
eventMetaData: { transformerIndex: this.index_ },
|
|
556
|
-
error:
|
|
741
|
+
error: t,
|
|
557
742
|
function: "start"
|
|
558
743
|
/* start */
|
|
559
744
|
};
|
|
560
745
|
this.emit("error", s);
|
|
561
746
|
}
|
|
562
747
|
}
|
|
563
|
-
async transform(e,
|
|
564
|
-
|
|
565
|
-
if (this.mediaTransformerQosReportStartTimestamp_ === 0 && (this.mediaTransformerQosReportStartTimestamp_ = Date.now()), e instanceof VideoFrame && (this.videoHeight_ = (e == null ? void 0 : e.displayHeight) ?? 0, this.videoWidth_ = (e == null ? void 0 : e.displayWidth) ?? 0), this.reporterQos_.onFrameFromSource(), this.transformer_)
|
|
748
|
+
async transform(e, t) {
|
|
749
|
+
if (this.mediaTransformerQosReportStartTimestamp_ === 0 && (this.mediaTransformerQosReportStartTimestamp_ = Date.now()), e instanceof VideoFrame && (this.videoHeight_ = e?.displayHeight ?? 0, this.videoWidth_ = e?.displayWidth ?? 0), this.reporterQos_.onFrameFromSource(), this.transformer_)
|
|
566
750
|
if (this.shouldStop_)
|
|
567
|
-
console.warn("[Pipeline] flush from transform"), e.close(), this.flush(
|
|
751
|
+
console.warn("[Pipeline] flush from transform"), e.close(), this.flush(t), t.terminate();
|
|
568
752
|
else {
|
|
569
753
|
try {
|
|
570
|
-
await
|
|
571
|
-
} catch (
|
|
754
|
+
await this.transformer_.transform?.(e, t), this.reportQos();
|
|
755
|
+
} catch (s) {
|
|
572
756
|
this.report({
|
|
573
|
-
message:
|
|
757
|
+
message: f.errors.transformer_transform,
|
|
574
758
|
variation: "Error",
|
|
575
|
-
error:
|
|
759
|
+
error: $(s)
|
|
576
760
|
});
|
|
577
|
-
const
|
|
761
|
+
const i = {
|
|
578
762
|
eventMetaData: { transformerIndex: this.index_ },
|
|
579
|
-
error:
|
|
763
|
+
error: s,
|
|
580
764
|
function: "transform"
|
|
581
765
|
/* transform */
|
|
582
766
|
};
|
|
583
|
-
this.emit("error",
|
|
767
|
+
this.emit("error", i);
|
|
584
768
|
}
|
|
585
|
-
if (this.trackExpectedRate_ != -1 && this.trackExpectedRate_ *
|
|
586
|
-
const
|
|
769
|
+
if (this.trackExpectedRate_ != -1 && this.trackExpectedRate_ * Ce > this.reporterQos_.fps) {
|
|
770
|
+
const s = {
|
|
587
771
|
eventMetaData: {
|
|
588
772
|
transformerIndex: this.index_
|
|
589
773
|
},
|
|
@@ -593,7 +777,7 @@ class ke extends v {
|
|
|
593
777
|
current: this.reporterQos_.fps
|
|
594
778
|
}
|
|
595
779
|
};
|
|
596
|
-
this.emit("warn",
|
|
780
|
+
this.emit("warn", s);
|
|
597
781
|
}
|
|
598
782
|
}
|
|
599
783
|
}
|
|
@@ -602,15 +786,15 @@ class ke extends v {
|
|
|
602
786
|
this.isFlashed_ = !0;
|
|
603
787
|
try {
|
|
604
788
|
await this.transformer_.flush(e);
|
|
605
|
-
} catch (
|
|
789
|
+
} catch (t) {
|
|
606
790
|
this.report({
|
|
607
|
-
message:
|
|
791
|
+
message: f.errors.transformer_flush,
|
|
608
792
|
variation: "Error",
|
|
609
|
-
error:
|
|
793
|
+
error: $(t)
|
|
610
794
|
});
|
|
611
795
|
const s = {
|
|
612
796
|
eventMetaData: { transformerIndex: this.index_ },
|
|
613
|
-
error:
|
|
797
|
+
error: t,
|
|
614
798
|
function: "flush"
|
|
615
799
|
/* flush */
|
|
616
800
|
};
|
|
@@ -626,7 +810,7 @@ class ke extends v {
|
|
|
626
810
|
}
|
|
627
811
|
report(e) {
|
|
628
812
|
this.reporter_.send({
|
|
629
|
-
version:
|
|
813
|
+
version: A,
|
|
630
814
|
action: "MediaTransformer",
|
|
631
815
|
transformerType: this.transformerType_,
|
|
632
816
|
...e
|
|
@@ -637,7 +821,7 @@ class ke extends v {
|
|
|
637
821
|
...this.reporterQos_.config
|
|
638
822
|
}, this.reporterQos_.onFrameTransformed(
|
|
639
823
|
{
|
|
640
|
-
version:
|
|
824
|
+
version: A,
|
|
641
825
|
action: "MediaTransformer",
|
|
642
826
|
transformerType: this.transformerType_,
|
|
643
827
|
videoWidth: this.videoWidth_,
|
|
@@ -647,11 +831,11 @@ class ke extends v {
|
|
|
647
831
|
);
|
|
648
832
|
}
|
|
649
833
|
}
|
|
650
|
-
class
|
|
834
|
+
class Le extends h {
|
|
651
835
|
constructor(e) {
|
|
652
836
|
super(), this.transformers_ = [], this.trackExpectedRate_ = -1;
|
|
653
|
-
for (let
|
|
654
|
-
let s = new
|
|
837
|
+
for (let t = 0; t < e.length; t++) {
|
|
838
|
+
let s = new Oe(e[t], t);
|
|
655
839
|
s.on("error", (i) => {
|
|
656
840
|
this.emit("error", i);
|
|
657
841
|
}), s.on("warn", (i) => {
|
|
@@ -661,10 +845,10 @@ class Ae extends v {
|
|
|
661
845
|
}
|
|
662
846
|
setTrackExpectedRate(e) {
|
|
663
847
|
this.trackExpectedRate_ = e;
|
|
664
|
-
for (let
|
|
665
|
-
|
|
848
|
+
for (let t of this.transformers_)
|
|
849
|
+
t.setTrackExpectedRate(this.trackExpectedRate_);
|
|
666
850
|
}
|
|
667
|
-
async start(e,
|
|
851
|
+
async start(e, t) {
|
|
668
852
|
if (!this.transformers_ || this.transformers_.length === 0) {
|
|
669
853
|
console.log("[Pipeline] No transformers.");
|
|
670
854
|
return;
|
|
@@ -675,8 +859,8 @@ class Ae extends v {
|
|
|
675
859
|
e = e.pipeThrough(
|
|
676
860
|
new TransformStream(i)
|
|
677
861
|
);
|
|
678
|
-
e.pipeTo(
|
|
679
|
-
console.log("[Pipeline] Setup."), await
|
|
862
|
+
e.pipeTo(t).then(async () => {
|
|
863
|
+
console.log("[Pipeline] Setup."), await t.abort(), await s.cancel(), this.emit(
|
|
680
864
|
"pipelineInfo",
|
|
681
865
|
"pipeline_ended"
|
|
682
866
|
/* pipeline_ended */
|
|
@@ -691,7 +875,7 @@ class Ae extends v {
|
|
|
691
875
|
"[Pipeline] Error from stream transform:",
|
|
692
876
|
n
|
|
693
877
|
);
|
|
694
|
-
}), await
|
|
878
|
+
}), await t.abort(i), await s.cancel(i), this.emit(
|
|
695
879
|
"pipelineInfo",
|
|
696
880
|
"pipeline_ended_with_error"
|
|
697
881
|
/* pipeline_ended_with_error */
|
|
@@ -717,9 +901,9 @@ class Ae extends v {
|
|
|
717
901
|
e.stop();
|
|
718
902
|
}
|
|
719
903
|
}
|
|
720
|
-
class
|
|
904
|
+
class We extends h {
|
|
721
905
|
constructor() {
|
|
722
|
-
super(), this.reporter_ = new
|
|
906
|
+
super(), this.reporter_ = new V(), this.trackExpectedRate_ = -1, this.report({
|
|
723
907
|
variation: "Create"
|
|
724
908
|
});
|
|
725
909
|
}
|
|
@@ -738,56 +922,53 @@ class Ce extends v {
|
|
|
738
922
|
setTrackExpectedRate(e) {
|
|
739
923
|
this.trackExpectedRate_ = e, this.pipeline_ && this.pipeline_.setTrackExpectedRate(this.trackExpectedRate_);
|
|
740
924
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
*/
|
|
751
|
-
transform(e, r) {
|
|
752
|
-
return this.readable_ = e, this.writable_ = r, this.transformInternal();
|
|
925
|
+
async transform(e, t) {
|
|
926
|
+
if (this.isTrack(e)) {
|
|
927
|
+
if (e.kind === "video") {
|
|
928
|
+
const s = new MediaStreamTrackProcessor({ track: e }), i = new VideoTrackGenerator();
|
|
929
|
+
return this.readable_ = s.readable, this.writable_ = i.writable, await this.transformInternal(), i.track;
|
|
930
|
+
}
|
|
931
|
+
throw Error("Cannot process audio tracks inside a web worker when passing a track to transform");
|
|
932
|
+
} else
|
|
933
|
+
return this.readable_ = e, this.writable_ = t, this.transformInternal();
|
|
753
934
|
}
|
|
754
935
|
/**
|
|
755
936
|
* @private
|
|
756
937
|
*/
|
|
757
938
|
transformInternal() {
|
|
758
|
-
return new Promise(async (e,
|
|
939
|
+
return new Promise(async (e, t) => {
|
|
759
940
|
if (!this.transformers_ || this.transformers_.length === 0) {
|
|
760
941
|
this.report({
|
|
761
|
-
message:
|
|
942
|
+
message: f.errors.transformer_none,
|
|
762
943
|
variation: "Error"
|
|
763
|
-
}),
|
|
944
|
+
}), t("[MediaProcessor] Need to set transformers.");
|
|
764
945
|
return;
|
|
765
946
|
}
|
|
766
947
|
if (!this.readable_) {
|
|
767
948
|
this.report({
|
|
768
949
|
variation: "Error",
|
|
769
|
-
message:
|
|
770
|
-
}),
|
|
950
|
+
message: f.errors.readable_null
|
|
951
|
+
}), t("[MediaProcessor] Readable is null.");
|
|
771
952
|
return;
|
|
772
953
|
}
|
|
773
954
|
if (!this.writable_) {
|
|
774
955
|
this.report({
|
|
775
956
|
variation: "Error",
|
|
776
|
-
message:
|
|
777
|
-
}),
|
|
957
|
+
message: f.errors.writable_null
|
|
958
|
+
}), t("[MediaProcessor] Writable is null.");
|
|
778
959
|
return;
|
|
779
960
|
}
|
|
780
961
|
let s = !1;
|
|
781
|
-
this.pipeline_ && (s = !0, this.pipeline_.clearListeners(), this.pipeline_.destroy()), this.pipeline_ = new
|
|
962
|
+
this.pipeline_ && (s = !0, this.pipeline_.clearListeners(), this.pipeline_.destroy()), this.pipeline_ = new Le(this.transformers_), this.pipeline_.on("warn", (i) => {
|
|
782
963
|
this.emit("warn", i);
|
|
783
964
|
}), this.pipeline_.on("error", (i) => {
|
|
784
965
|
this.emit("error", i);
|
|
785
966
|
}), this.pipeline_.on("pipelineInfo", (i) => {
|
|
786
|
-
s && (i === "pipeline_started" ? i =
|
|
967
|
+
s && (i === "pipeline_started" ? i = U.pipeline_restarted : i === "pipeline_started_with_error" && (i = U.pipeline_restarted_with_error)), this.emit("pipelineInfo", i);
|
|
787
968
|
}), this.trackExpectedRate_ != -1 && this.pipeline_.setTrackExpectedRate(this.trackExpectedRate_), this.pipeline_.start(this.readable_, this.writable_).then(() => {
|
|
788
969
|
e();
|
|
789
970
|
}).catch((i) => {
|
|
790
|
-
|
|
971
|
+
t(i);
|
|
791
972
|
});
|
|
792
973
|
});
|
|
793
974
|
}
|
|
@@ -802,7 +983,7 @@ class Ce extends v {
|
|
|
802
983
|
setTransformers(e) {
|
|
803
984
|
return this.report({
|
|
804
985
|
variation: "Update",
|
|
805
|
-
message:
|
|
986
|
+
message: f.updates.transformer_new
|
|
806
987
|
}), this.transformers_ = e, this.readable_ && this.writable_ ? this.transformInternal() : Promise.resolve();
|
|
807
988
|
}
|
|
808
989
|
/**
|
|
@@ -816,18 +997,21 @@ class Ce extends v {
|
|
|
816
997
|
}
|
|
817
998
|
report(e) {
|
|
818
999
|
this.reporter_.send({
|
|
819
|
-
version:
|
|
1000
|
+
version: A,
|
|
820
1001
|
action: "MediaProcessor",
|
|
821
1002
|
...e
|
|
822
1003
|
});
|
|
823
1004
|
}
|
|
1005
|
+
isTrack(e) {
|
|
1006
|
+
return "kind" in e;
|
|
1007
|
+
}
|
|
824
1008
|
}
|
|
825
|
-
class
|
|
1009
|
+
class Fe {
|
|
826
1010
|
constructor() {
|
|
827
1011
|
this.processor_ = null, this.generator_ = null;
|
|
828
1012
|
}
|
|
829
1013
|
init(e) {
|
|
830
|
-
return new Promise((
|
|
1014
|
+
return new Promise((t, s) => {
|
|
831
1015
|
try {
|
|
832
1016
|
this.processor_ = new MediaStreamTrackProcessor(e);
|
|
833
1017
|
} catch (i) {
|
|
@@ -846,7 +1030,7 @@ class Me {
|
|
|
846
1030
|
`[InsertableStreamHelper] MediaStreamTrackGenerator failed: ${i}`
|
|
847
1031
|
), s(i);
|
|
848
1032
|
}
|
|
849
|
-
|
|
1033
|
+
t();
|
|
850
1034
|
});
|
|
851
1035
|
}
|
|
852
1036
|
getReadable() {
|
|
@@ -859,63 +1043,58 @@ class Me {
|
|
|
859
1043
|
return this.generator_;
|
|
860
1044
|
}
|
|
861
1045
|
}
|
|
862
|
-
class
|
|
1046
|
+
class ze {
|
|
863
1047
|
/**
|
|
864
1048
|
* - When running insertable streams on the main `MediaProcessorInterface` should be instance of `MediaProcessor` class.
|
|
865
1049
|
* - When running insertable streams on WebWorker `MediaProcessorInterface` should be instance of bridge calss created by the user. Example can be found [here](/docs/intro.md#using-the-transformer-on-webworker)
|
|
866
1050
|
* @param vonageMediaProcessor - MediaProcessorInterface.
|
|
867
1051
|
*/
|
|
868
1052
|
constructor(e) {
|
|
869
|
-
this.
|
|
1053
|
+
this.mediaProcessor_ = e;
|
|
870
1054
|
}
|
|
871
1055
|
/**
|
|
872
|
-
* @private
|
|
873
1056
|
* Sets the media stream track instance to be processed.
|
|
874
1057
|
*
|
|
875
1058
|
* @param track MediaStreamTrack (audio or video) to be processed.
|
|
876
1059
|
*
|
|
877
1060
|
* @returns New track to be used.
|
|
878
1061
|
*/
|
|
879
|
-
setTrack(e) {
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
s(i);
|
|
894
|
-
});
|
|
895
|
-
});
|
|
1062
|
+
async setTrack(e) {
|
|
1063
|
+
if (!(this.mediaProcessor_ instanceof We) && await X()) {
|
|
1064
|
+
if (e.kind === "audio")
|
|
1065
|
+
throw Error("Cannot process audio tracks inside a web worker when passing a track to transform");
|
|
1066
|
+
return await this.mediaProcessor_.transform(e);
|
|
1067
|
+
}
|
|
1068
|
+
if (J()) {
|
|
1069
|
+
const t = new Fe();
|
|
1070
|
+
return await t.init(e), await this.mediaProcessor_.transform(
|
|
1071
|
+
t.getReadable(),
|
|
1072
|
+
t.getWriteable()
|
|
1073
|
+
), t.getProccesorTrack();
|
|
1074
|
+
}
|
|
1075
|
+
throw Error("MediaStreamTrack API for Insertable Streams of Media is not supported");
|
|
896
1076
|
}
|
|
897
1077
|
/**
|
|
898
|
-
* @private
|
|
899
1078
|
* Stops the media processing being performed.
|
|
900
1079
|
*/
|
|
901
1080
|
destroy() {
|
|
902
|
-
return new Promise((e,
|
|
1081
|
+
return new Promise((e, t) => {
|
|
903
1082
|
this.mediaProcessor_ ? this.mediaProcessor_.destroy().then(() => {
|
|
904
1083
|
e();
|
|
905
1084
|
}).catch((s) => {
|
|
906
|
-
|
|
907
|
-
}) :
|
|
1085
|
+
t(s);
|
|
1086
|
+
}) : t("no processor");
|
|
908
1087
|
});
|
|
909
1088
|
}
|
|
910
1089
|
}
|
|
911
1090
|
export {
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
1091
|
+
Ie as ErrorFunction,
|
|
1092
|
+
We as MediaProcessor,
|
|
1093
|
+
ze as MediaProcessorConnector,
|
|
1094
|
+
U as PipelineInfoData,
|
|
1095
|
+
ie as VonageSourceType,
|
|
1096
|
+
Re as WarningType,
|
|
1097
|
+
D as getVonageMetadata,
|
|
1098
|
+
$e as isSupported,
|
|
1099
|
+
Ue as setVonageMetadata
|
|
921
1100
|
};
|