@ikonai/sdk 1.0.11 → 1.0.12
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/assets/{audio-capture-worker-D0tD-mzj.js → audio-capture-worker-Ca53cEkv.js} +127 -121
- package/assets/{audio-playback-worker-CM2aCt54.js → audio-playback-worker-D0LDYB5W.js} +93 -83
- package/assets/{video-capture-worker-DZZ0ggvo.js → video-capture-worker-Odc_mLEl.js} +145 -141
- package/assets/{video-playback-worker-C7sQMgD-.js → video-playback-worker-OwSrJCnC.js} +220 -221
- package/index.js +1112 -1095
- package/media/ikon-audio-capture.d.ts +2 -0
- package/media/ikon-video-capture.d.ts +6 -4
- package/media/ikon-video-playback.d.ts +0 -1
- package/package.json +1 -1
- package/worker/video-capture-worker.d.ts +1 -0
- package/worker/video-playback-worker.d.ts +2 -0
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
function
|
|
1
|
+
function z(t) {
|
|
2
2
|
if (t.length < 8)
|
|
3
3
|
throw new Error("Protocol message too short");
|
|
4
4
|
return (t[4] | t[5] << 8 | t[6] << 16 | t[7] << 24) >>> 0;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
const e =
|
|
6
|
+
function J(t) {
|
|
7
|
+
const e = it(t), r = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
8
8
|
if (e.length < 27)
|
|
9
9
|
throw new Error("Protocol payload too short");
|
|
10
|
-
const i = r.getUint32(0, !0), n = r.getUint32(4, !0), E = r.getUint32(8, !0), a = r.getUint32(12, !0), s = r.getUint32(16, !0), I = r.getUint32(20, !0), C = r.getUint8(24),
|
|
10
|
+
const i = r.getUint32(0, !0), n = r.getUint32(4, !0), E = r.getUint32(8, !0), a = r.getUint32(12, !0), s = r.getUint32(16, !0), I = r.getUint32(20, !0), C = r.getUint8(24), h = r.getUint8(25), U = r.getUint8(26);
|
|
11
11
|
if (27 + I * 4 > e.length)
|
|
12
12
|
throw new Error("Protocol header exceeds payload length");
|
|
13
|
-
const
|
|
13
|
+
const T = [];
|
|
14
14
|
let R = 27;
|
|
15
|
-
for (let
|
|
16
|
-
|
|
15
|
+
for (let A = 0; A < I; A++)
|
|
16
|
+
T.push(r.getUint32(R, !0)), R += 4;
|
|
17
17
|
return {
|
|
18
18
|
length: i,
|
|
19
19
|
opcode: n,
|
|
20
20
|
senderId: E,
|
|
21
21
|
trackId: a,
|
|
22
22
|
sequenceId: s,
|
|
23
|
-
targetIds:
|
|
23
|
+
targetIds: T,
|
|
24
24
|
payloadVersion: C,
|
|
25
|
-
payloadType:
|
|
25
|
+
payloadType: h,
|
|
26
26
|
flags: U
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const E = n?.trackId ?? 0, a = n?.sequenceId ?? 0, s = n?.flags ?? 0, I = n?.targetIds ?? [], C = n?.payloadType ?? 8,
|
|
31
|
-
|
|
29
|
+
function m(t, e, r, i, n) {
|
|
30
|
+
const E = n?.trackId ?? 0, a = n?.sequenceId ?? 0, s = n?.flags ?? 0, I = n?.targetIds ?? [], C = n?.payloadType ?? 8, h = 27 + I.length * 4, U = h + e.length, u = new Uint8Array(U), T = new DataView(u.buffer);
|
|
31
|
+
T.setUint32(0, U, !0), T.setUint32(4, t >>> 0, !0), T.setUint32(8, i >>> 0, !0), T.setUint32(12, E >>> 0, !0), T.setUint32(16, a >>> 0, !0), T.setUint32(20, I.length >>> 0, !0), T.setUint8(24, r & 255), T.setUint8(25, C & 255), T.setUint8(26, s & 255);
|
|
32
32
|
let R = 27;
|
|
33
|
-
for (let
|
|
34
|
-
|
|
35
|
-
return u.set(e,
|
|
33
|
+
for (let A = 0; A < I.length; A++)
|
|
34
|
+
T.setUint32(R, I[A] >>> 0, !0), R += 4;
|
|
35
|
+
return u.set(e, h), u;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
38
|
-
const
|
|
37
|
+
var y = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(y || {});
|
|
38
|
+
const Z = 161, p = 162, P = new TextEncoder();
|
|
39
39
|
new TextDecoder("utf-8", { fatal: !0 });
|
|
40
40
|
class L {
|
|
41
41
|
constructor(e = 1) {
|
|
42
|
-
this.version = e, this.buffer.writeByte(
|
|
42
|
+
this.version = e, this.buffer.writeByte(Z), this.buffer.writeVarUInt(e >>> 0);
|
|
43
43
|
}
|
|
44
|
-
buffer = new
|
|
44
|
+
buffer = new w();
|
|
45
45
|
closed = !1;
|
|
46
46
|
cached;
|
|
47
47
|
writeInt32Field(e, r) {
|
|
@@ -72,7 +72,7 @@ class L {
|
|
|
72
72
|
this.writeFixedField(e, 14, () => this.buffer.writeBytes(i));
|
|
73
73
|
}
|
|
74
74
|
writeStringField(e, r) {
|
|
75
|
-
const i =
|
|
75
|
+
const i = P.encode(r ?? "");
|
|
76
76
|
this.writeVariableField(e, 12, i);
|
|
77
77
|
}
|
|
78
78
|
writeBinaryField(e, r) {
|
|
@@ -85,19 +85,19 @@ class L {
|
|
|
85
85
|
this.writeVariableField(e, 11, E);
|
|
86
86
|
}
|
|
87
87
|
writeArrayField(e, r, i) {
|
|
88
|
-
const n = new
|
|
88
|
+
const n = new g(r);
|
|
89
89
|
i(n);
|
|
90
90
|
const E = n.finish();
|
|
91
91
|
this.writeVariableField(e, 9, E);
|
|
92
92
|
}
|
|
93
93
|
writeDictionaryField(e, r, i, n) {
|
|
94
|
-
const E = new
|
|
94
|
+
const E = new b(r, i);
|
|
95
95
|
n(E);
|
|
96
96
|
const a = E.finish();
|
|
97
97
|
this.writeVariableField(e, 10, a);
|
|
98
98
|
}
|
|
99
99
|
finish() {
|
|
100
|
-
return this.closed || (this.buffer.writeByte(
|
|
100
|
+
return this.closed || (this.buffer.writeByte(p), this.closed = !0, this.cached = this.buffer.toUint8Array()), this.cached;
|
|
101
101
|
}
|
|
102
102
|
writeFixedField(e, r, i) {
|
|
103
103
|
this.writeFieldHeader(e, r, 0), i();
|
|
@@ -106,14 +106,14 @@ class L {
|
|
|
106
106
|
this.writeFieldHeader(e, r, i.length), this.buffer.writeBytes(i);
|
|
107
107
|
}
|
|
108
108
|
writeFieldHeader(e, r, i) {
|
|
109
|
-
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(
|
|
109
|
+
this.buffer.writeUInt32(e >>> 0), this.buffer.writeByte(F(r)), et(r) && this.buffer.writeVarUInt(i >>> 0);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
class
|
|
112
|
+
class g {
|
|
113
113
|
constructor(e) {
|
|
114
114
|
this.elementType = e;
|
|
115
115
|
}
|
|
116
|
-
payload = new
|
|
116
|
+
payload = new w();
|
|
117
117
|
count = 0;
|
|
118
118
|
writeInt32(e) {
|
|
119
119
|
this.ensureElementType(
|
|
@@ -172,7 +172,7 @@ class B {
|
|
|
172
172
|
12
|
|
173
173
|
/* String */
|
|
174
174
|
), this.count++;
|
|
175
|
-
const r =
|
|
175
|
+
const r = P.encode(e ?? "");
|
|
176
176
|
this.payload.writeVarUInt(r.length), this.payload.writeBytes(r);
|
|
177
177
|
}
|
|
178
178
|
writeBinary(e) {
|
|
@@ -196,7 +196,7 @@ class B {
|
|
|
196
196
|
9
|
|
197
197
|
/* Array */
|
|
198
198
|
), this.count++;
|
|
199
|
-
const i = new
|
|
199
|
+
const i = new g(e);
|
|
200
200
|
r(i);
|
|
201
201
|
const n = i.finish();
|
|
202
202
|
this.payload.writeBytes(n);
|
|
@@ -206,42 +206,42 @@ class B {
|
|
|
206
206
|
10
|
|
207
207
|
/* Dict */
|
|
208
208
|
), this.count++;
|
|
209
|
-
const n = new
|
|
209
|
+
const n = new b(e, r);
|
|
210
210
|
i(n);
|
|
211
211
|
const E = n.finish();
|
|
212
212
|
this.payload.writeBytes(E);
|
|
213
213
|
}
|
|
214
214
|
finish() {
|
|
215
|
-
const e = new
|
|
216
|
-
return e.writeByte(
|
|
215
|
+
const e = new w();
|
|
216
|
+
return e.writeByte(F(this.elementType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
217
217
|
}
|
|
218
218
|
ensureElementType(e) {
|
|
219
219
|
if (this.elementType !== e)
|
|
220
|
-
throw new Error(`Array element type is ${
|
|
220
|
+
throw new Error(`Array element type is ${y[this.elementType]}, expected ${y[e]}`);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
class
|
|
223
|
+
class b {
|
|
224
224
|
constructor(e, r) {
|
|
225
|
-
this.keyType = e, this.valueType = r,
|
|
225
|
+
this.keyType = e, this.valueType = r, rt(e);
|
|
226
226
|
}
|
|
227
|
-
payload = new
|
|
227
|
+
payload = new w();
|
|
228
228
|
count = 0;
|
|
229
229
|
entryOpen = !1;
|
|
230
230
|
beginEntry() {
|
|
231
231
|
if (this.entryOpen)
|
|
232
232
|
throw new Error("Previous dictionary entry not completed");
|
|
233
|
-
return this.count++, this.entryOpen = !0, new
|
|
233
|
+
return this.count++, this.entryOpen = !0, new tt(this.keyType, this.valueType, this.payload, () => {
|
|
234
234
|
this.entryOpen = !1;
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
finish() {
|
|
238
238
|
if (this.entryOpen)
|
|
239
239
|
throw new Error("Dictionary entry not completed");
|
|
240
|
-
const e = new
|
|
241
|
-
return e.writeByte(
|
|
240
|
+
const e = new w();
|
|
241
|
+
return e.writeByte(F(this.keyType)), e.writeByte(F(this.valueType)), e.writeVarUInt(this.count), e.writeBytes(this.payload.toUint8Array()), e.toUint8Array();
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
class
|
|
244
|
+
class tt {
|
|
245
245
|
constructor(e, r, i, n) {
|
|
246
246
|
this.keyType = e, this.valueType = r, this.payload = i, this.onComplete = n;
|
|
247
247
|
}
|
|
@@ -305,7 +305,7 @@ class et {
|
|
|
305
305
|
12
|
|
306
306
|
/* String */
|
|
307
307
|
);
|
|
308
|
-
const r =
|
|
308
|
+
const r = P.encode(e ?? "");
|
|
309
309
|
this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.keyWritten = !0;
|
|
310
310
|
}
|
|
311
311
|
writeKeyBinary(e) {
|
|
@@ -383,7 +383,7 @@ class et {
|
|
|
383
383
|
12
|
|
384
384
|
/* String */
|
|
385
385
|
);
|
|
386
|
-
const r =
|
|
386
|
+
const r = P.encode(e ?? "");
|
|
387
387
|
this.payload.writeVarUInt(r.length), this.payload.writeBytes(r), this.valueWritten = !0;
|
|
388
388
|
}
|
|
389
389
|
writeValueObject(e, r) {
|
|
@@ -401,7 +401,7 @@ class et {
|
|
|
401
401
|
9
|
|
402
402
|
/* Array */
|
|
403
403
|
);
|
|
404
|
-
const i = new
|
|
404
|
+
const i = new g(e);
|
|
405
405
|
r(i);
|
|
406
406
|
const n = i.finish();
|
|
407
407
|
this.payload.writeBytes(n), this.valueWritten = !0;
|
|
@@ -411,7 +411,7 @@ class et {
|
|
|
411
411
|
10
|
|
412
412
|
/* Dict */
|
|
413
413
|
);
|
|
414
|
-
const n = new
|
|
414
|
+
const n = new b(e, r);
|
|
415
415
|
i(n);
|
|
416
416
|
const E = n.finish();
|
|
417
417
|
this.payload.writeBytes(E), this.valueWritten = !0;
|
|
@@ -425,11 +425,11 @@ class et {
|
|
|
425
425
|
}
|
|
426
426
|
ensureKeyType(e) {
|
|
427
427
|
if (this.keyType !== e)
|
|
428
|
-
throw new Error(`Dictionary key type is ${
|
|
428
|
+
throw new Error(`Dictionary key type is ${y[this.keyType]}, expected ${y[e]}`);
|
|
429
429
|
}
|
|
430
430
|
ensureValueType(e) {
|
|
431
431
|
if (this.valueType !== e)
|
|
432
|
-
throw new Error(`Dictionary value type is ${
|
|
432
|
+
throw new Error(`Dictionary value type is ${y[this.valueType]}, expected ${y[e]}`);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
class _ {
|
|
@@ -502,13 +502,13 @@ class _ {
|
|
|
502
502
|
return (e >>> 0).toString(16).padStart(r, "0");
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
class
|
|
505
|
+
class w {
|
|
506
506
|
static INITIAL_CAPACITY = 256;
|
|
507
507
|
buffer;
|
|
508
508
|
dataView;
|
|
509
509
|
length = 0;
|
|
510
510
|
constructor() {
|
|
511
|
-
this.buffer = new Uint8Array(
|
|
511
|
+
this.buffer = new Uint8Array(w.INITIAL_CAPACITY), this.dataView = new DataView(this.buffer.buffer);
|
|
512
512
|
}
|
|
513
513
|
ensureCapacity(e) {
|
|
514
514
|
const r = this.length + e;
|
|
@@ -554,45 +554,45 @@ class y {
|
|
|
554
554
|
return this.buffer.slice(0, this.length);
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function F(t, e = 0) {
|
|
558
558
|
if ((e & 240) !== 0)
|
|
559
559
|
throw new Error("Teleport flags must fit into 4 bits");
|
|
560
560
|
return (t & 15) << 4 | e & 15;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function et(t) {
|
|
563
563
|
return t === 12 || t === 13 || t === 9 || t === 11 || t === 10;
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function rt(t) {
|
|
566
566
|
if (t === 9 || t === 11 || t === 10 || t === 1)
|
|
567
567
|
throw new Error("Dictionary keys must be primitive Teleport types");
|
|
568
568
|
}
|
|
569
569
|
function d(t) {
|
|
570
570
|
return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function it(t) {
|
|
573
573
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
574
574
|
}
|
|
575
|
-
var T = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(T || {}), v = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(v || {});
|
|
576
|
-
const
|
|
575
|
+
var N = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.H264 = 1] = "H264", t[t.Vp8 = 2] = "Vp8", t[t.Vp9 = 3] = "Vp9", t[t.Av1 = 4] = "Av1", t))(N || {}), K = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", t[t.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", t[t.GROUP_CORE = 65536] = "GROUP_CORE", t[t.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", t[t.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", t[t.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", t[t.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", t[t.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", t[t.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", t[t.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", t[t.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", t[t.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", t[t.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", t[t.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", t[t.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", t[t.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", t[t.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", t[t.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", t[t.CORE_SERVER_START = 65552] = "CORE_SERVER_START", t[t.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", t[t.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", t[t.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", t[t.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", t[t.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", t[t.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", t[t.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", t[t.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", t[t.GROUP_EVENTS = 262144] = "GROUP_EVENTS", t[t.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", t[t.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", t[t.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", t[t.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", t[t.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", t[t.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", t[t.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", t[t.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", t[t.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", t[t.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", t[t.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", t[t.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", t[t.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", t[t.ACTION_CALL = 1048577] = "ACTION_CALL", t[t.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", t[t.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", t[t.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", t[t.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", t[t.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", t[t.ACTION_TAP = 1048583] = "ACTION_TAP", t[t.ACTION_PAN = 1048584] = "ACTION_PAN", t[t.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", t[t.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", t[t.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", t[t.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", t[t.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", t[t.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", t[t.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", t[t.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", t[t.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", t[t.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", t[t.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", t[t.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", t[t.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", t[t.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", t[t.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", t[t.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", t[t.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", t[t.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", t[t.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", t[t.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", t[t.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", t[t.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", t[t.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", t[t.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", t[t.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", t[t.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", t[t.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", t[t.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", t[t.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", t[t.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", t[t.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", t[t.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", t[t.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", t[t.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", t[t.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", t[t.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", t[t.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", t[t.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", t[t.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", t[t.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", t[t.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", t[t.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", t[t.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", t[t.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", t[t.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", t[t.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", t[t.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", t[t.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", t[t.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", t[t.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", t[t.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", t[t.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", t[t.ACTION_CALL2 = 1048637] = "ACTION_CALL2", t[t.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", t[t.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", t[t.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", t[t.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", t[t.GROUP_UI = 2097152] = "GROUP_UI", t[t.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", t[t.UI_STREAM_END = 2097154] = "UI_STREAM_END", t[t.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", t[t.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", t[t.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", t[t.UI_SECTION_END = 2097158] = "UI_SECTION_END", t[t.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", t[t.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", t[t.UI_LIST_END = 2097161] = "UI_LIST_END", t[t.UI_TEXT = 2097162] = "UI_TEXT", t[t.UI_HEADER = 2097163] = "UI_HEADER", t[t.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", t[t.UI_BUTTON = 2097165] = "UI_BUTTON", t[t.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", t[t.UI_IMAGE = 2097167] = "UI_IMAGE", t[t.UI_FILE = 2097168] = "UI_FILE", t[t.UI_BADGE = 2097169] = "UI_BADGE", t[t.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", t[t.UI_MAP = 2097171] = "UI_MAP", t[t.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", t[t.UI_ICON = 2097173] = "UI_ICON", t[t.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", t[t.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", t[t.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", t[t.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", t[t.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", t[t.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", t[t.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", t[t.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", t[t.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", t[t.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", t[t.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", t[t.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", t[t.UI_QS = 2097186] = "UI_QS", t[t.UI_ELEMENT = 2097187] = "UI_ELEMENT", t[t.UI_STYLES = 2097188] = "UI_STYLES", t[t.UI_SVG = 2097189] = "UI_SVG", t[t.UI_UPDATE = 2097190] = "UI_UPDATE", t[t.UI_INIT = 2097191] = "UI_INIT", t[t.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", t[t.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", t[t.GROUP_COMMON = 4128768] = "GROUP_COMMON", t[t.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", t[t.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", t[t.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", t[t.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", t[t.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", t[t.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", t[t.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", t[t.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", t[t.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", t[t.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", t[t.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", t[t.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", t[t.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", t[t.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", t[t.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", t[t.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", t[t.GROUP_SCENE = 33554432] = "GROUP_SCENE", t[t.SCENE_MESH = 33554433] = "SCENE_MESH", t[t.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", t[t.GROUP_ALL = 67043328] = "GROUP_ALL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(K || {});
|
|
576
|
+
const v = 5, nt = 8388609, Et = 161083277, _t = 164808083, It = 1368629611, at = 2745379226, st = 2950031986, Tt = 3282782683, At = 3284746250, Nt = 4065070594;
|
|
577
577
|
function ht(t) {
|
|
578
578
|
const e = {};
|
|
579
579
|
return Ct(e), t && Object.assign(e, t), e;
|
|
580
580
|
}
|
|
581
581
|
function Ct(t) {
|
|
582
|
-
return t.Description = "", t.
|
|
582
|
+
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = N.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t;
|
|
583
583
|
}
|
|
584
584
|
function ut(t) {
|
|
585
|
-
const e = new L(
|
|
585
|
+
const e = new L(v);
|
|
586
586
|
return lt(t, e), e.finish();
|
|
587
587
|
}
|
|
588
588
|
function lt(t, e) {
|
|
589
|
-
e.
|
|
589
|
+
e.writeStringField(Et, t.StreamId), e.writeFloat64Field(_t, t.Framerate), e.writeStringField(It, t.Description), e.writeStringField(at, t.CodecDetails), e.writeInt32Field(st, t.Height | 0), e.writeStringField(Tt, t.SourceType), e.writeInt32Field(At, t.Codec), e.writeInt32Field(Nt, t.Width | 0);
|
|
590
590
|
}
|
|
591
591
|
function Ut(t, e, r) {
|
|
592
592
|
const i = ut(t);
|
|
593
|
-
return
|
|
593
|
+
return m(nt, i, v, e, r);
|
|
594
594
|
}
|
|
595
|
-
const
|
|
595
|
+
const k = 1, Rt = 8388611, ot = 271275304, St = 2541432218, ft = 2986785889, yt = 3105403172, wt = 3456383222;
|
|
596
596
|
function Lt(t) {
|
|
597
597
|
const e = {};
|
|
598
598
|
return Dt(e), t && Object.assign(e, t), e;
|
|
@@ -601,29 +601,29 @@ function Dt(t) {
|
|
|
601
601
|
return t.Data = new Uint8Array(0), t.FrameNumber = 0, t.IsKey = !1, t.TimestampInUs = 0n, t.DurationInUs = 0, t;
|
|
602
602
|
}
|
|
603
603
|
function ct(t) {
|
|
604
|
-
const e = new L(
|
|
604
|
+
const e = new L(k);
|
|
605
605
|
return Ot(t, e), e.finish();
|
|
606
606
|
}
|
|
607
607
|
function Ot(t, e) {
|
|
608
|
-
e.writeUInt64Field(ot, t.TimestampInUs), e.writeUInt32Field(St, t.DurationInUs >>> 0), e.writeBinaryField(ft, t.Data), e.writeBoolField(
|
|
608
|
+
e.writeUInt64Field(ot, t.TimestampInUs), e.writeUInt32Field(St, t.DurationInUs >>> 0), e.writeBinaryField(ft, t.Data), e.writeBoolField(yt, t.IsKey), e.writeInt32Field(wt, t.FrameNumber | 0);
|
|
609
609
|
}
|
|
610
610
|
function Pt(t, e, r) {
|
|
611
611
|
const i = ct(t);
|
|
612
|
-
return
|
|
612
|
+
return m(Rt, i, k, e, r);
|
|
613
613
|
}
|
|
614
|
-
const
|
|
614
|
+
const W = 1, Ft = 8388610;
|
|
615
615
|
function Vt(t) {
|
|
616
616
|
const e = {};
|
|
617
617
|
return t && Object.assign(e, t), e;
|
|
618
618
|
}
|
|
619
619
|
function gt(t) {
|
|
620
|
-
return new L(
|
|
620
|
+
return new L(W).finish();
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Mt(t, e, r) {
|
|
623
623
|
const i = gt();
|
|
624
|
-
return
|
|
624
|
+
return m(Ft, i, W, e, r);
|
|
625
625
|
}
|
|
626
|
-
const
|
|
626
|
+
const Y = 30, Bt = 30 * 3, x = [
|
|
627
627
|
"avc1.42001f",
|
|
628
628
|
// Baseline L3.1 (720p60, 1080p30)
|
|
629
629
|
"avc1.4d001f",
|
|
@@ -637,8 +637,8 @@ const x = 30, Mt = 30 * 3, X = [
|
|
|
637
637
|
"avc1.4d0028"
|
|
638
638
|
// Main L4.0 (1080p)
|
|
639
639
|
];
|
|
640
|
-
|
|
641
|
-
const Gt = "vp8",
|
|
640
|
+
x[0];
|
|
641
|
+
const Gt = "vp8", X = [
|
|
642
642
|
"vp09.00.10.08",
|
|
643
643
|
// Profile 0, Level 1.0, 8-bit (most compatible)
|
|
644
644
|
"vp09.00.20.08",
|
|
@@ -648,8 +648,8 @@ const Gt = "vp8", $ = [
|
|
|
648
648
|
"vp09.00.40.08"
|
|
649
649
|
// Profile 0, Level 4.0, 8-bit (1080p)
|
|
650
650
|
];
|
|
651
|
-
|
|
652
|
-
const
|
|
651
|
+
X[0];
|
|
652
|
+
const $ = [
|
|
653
653
|
"av01.0.04M.08",
|
|
654
654
|
// Main profile, Level 3.0, 8-bit (720p)
|
|
655
655
|
"av01.0.05M.08",
|
|
@@ -659,8 +659,8 @@ const j = [
|
|
|
659
659
|
"av01.0.01M.08"
|
|
660
660
|
// Main profile, Level 2.0, 8-bit (lower res fallback)
|
|
661
661
|
];
|
|
662
|
-
|
|
663
|
-
const
|
|
662
|
+
$[0];
|
|
663
|
+
const H = ["h264", "vp8", "vp9", "av1"], mt = [
|
|
664
664
|
{ width: 1920, height: 1080 },
|
|
665
665
|
// 1080p
|
|
666
666
|
{ width: 1280, height: 720 },
|
|
@@ -671,38 +671,38 @@ const K = ["h264", "vp8", "vp9", "av1"], mt = [
|
|
|
671
671
|
// 480p (VGA)
|
|
672
672
|
{ width: 640, height: 360 }
|
|
673
673
|
// 360p
|
|
674
|
-
], bt = 0.1,
|
|
674
|
+
], bt = 0.1, dt = 30, Ht = 5e4, Kt = 5e5, vt = 8e6, kt = 8, Wt = 3, V = (t) => self.postMessage(t);
|
|
675
675
|
let l = null, o = null;
|
|
676
676
|
function O(t, e) {
|
|
677
677
|
const r = t instanceof Error ? t : new Error(String(t));
|
|
678
|
-
|
|
678
|
+
V({ type: "error", captureId: e, error: { name: r.name, message: r.message, stack: r.stack } });
|
|
679
679
|
}
|
|
680
680
|
function Yt(t) {
|
|
681
681
|
if (!Array.isArray(t) || t.length === 0)
|
|
682
|
-
return
|
|
682
|
+
return H.slice();
|
|
683
683
|
const e = [];
|
|
684
684
|
for (const i of t)
|
|
685
685
|
(i === "h264" || i === "vp8" || i === "vp9" || i === "av1") && e.push(i);
|
|
686
686
|
if (e.length === 0)
|
|
687
|
-
return
|
|
687
|
+
return H.slice();
|
|
688
688
|
const r = /* @__PURE__ */ new Set();
|
|
689
689
|
for (const i of e)
|
|
690
690
|
r.add(i);
|
|
691
691
|
return Array.from(r);
|
|
692
692
|
}
|
|
693
693
|
function xt(t) {
|
|
694
|
-
return t === "h264" ?
|
|
694
|
+
return t === "h264" ? N.H264 : t === "vp8" ? N.Vp8 : t === "vp9" ? N.Vp9 : t === "av1" ? N.Av1 : N.Unknown;
|
|
695
695
|
}
|
|
696
696
|
const Xt = {
|
|
697
|
-
[
|
|
698
|
-
[
|
|
699
|
-
[
|
|
700
|
-
[
|
|
701
|
-
[
|
|
697
|
+
[N.Unknown]: [],
|
|
698
|
+
[N.H264]: x,
|
|
699
|
+
[N.Vp8]: [Gt],
|
|
700
|
+
[N.Vp9]: X,
|
|
701
|
+
[N.Av1]: $
|
|
702
702
|
};
|
|
703
703
|
function $t(t, e, r, i) {
|
|
704
|
-
const n = t * e, E = bt * (r /
|
|
705
|
-
return Math.max(
|
|
704
|
+
const n = t * e, E = bt * (r / dt), a = Math.floor(n * E);
|
|
705
|
+
return Math.max(Ht, Math.floor(i ?? Math.max(Kt, Math.min(a, vt))));
|
|
706
706
|
}
|
|
707
707
|
function jt(t, e) {
|
|
708
708
|
const r = [{ width: t, height: e }];
|
|
@@ -718,7 +718,7 @@ async function Qt(t, e, r, i, n, E, a) {
|
|
|
718
718
|
bitrate: n,
|
|
719
719
|
framerate: E,
|
|
720
720
|
latencyMode: "realtime",
|
|
721
|
-
...t ===
|
|
721
|
+
...t === N.H264 ? { avc: { format: "annexb" } } : {}
|
|
722
722
|
};
|
|
723
723
|
if (typeof VideoEncoder?.isConfigSupported != "function")
|
|
724
724
|
return null;
|
|
@@ -727,8 +727,8 @@ async function Qt(t, e, r, i, n, E, a) {
|
|
|
727
727
|
try {
|
|
728
728
|
const C = await VideoEncoder.isConfigSupported(I);
|
|
729
729
|
if (C.supported) {
|
|
730
|
-
const
|
|
731
|
-
return { config:
|
|
730
|
+
const h = C.config ?? I;
|
|
731
|
+
return { config: h, isHardwareAccelerated: h.hardwareAcceleration === "prefer-hardware" };
|
|
732
732
|
}
|
|
733
733
|
} catch {
|
|
734
734
|
}
|
|
@@ -742,16 +742,16 @@ async function Qt(t, e, r, i, n, E, a) {
|
|
|
742
742
|
return null;
|
|
743
743
|
}
|
|
744
744
|
async function qt(t, e, r) {
|
|
745
|
-
const i = Math.max(1, Math.floor(r?.framerate ??
|
|
745
|
+
const i = Math.max(1, Math.floor(r?.framerate ?? Y)), n = Yt(r?.preferredCodecs), a = r?.hardwareAcceleration === "preferSoftware" ? ["prefer-software", "prefer-hardware", void 0] : ["prefer-hardware", "prefer-software", void 0], s = jt(t, e);
|
|
746
746
|
for (const I of s) {
|
|
747
747
|
const C = $t(I.width, I.height, i, r?.bitrate);
|
|
748
|
-
for (const
|
|
748
|
+
for (const h of a)
|
|
749
749
|
for (const U of n) {
|
|
750
|
-
const u = xt(U),
|
|
751
|
-
for (const R of
|
|
752
|
-
const
|
|
753
|
-
if (
|
|
754
|
-
return { codec: u, config:
|
|
750
|
+
const u = xt(U), T = Xt[u] ?? [];
|
|
751
|
+
for (const R of T) {
|
|
752
|
+
const A = await Qt(u, R, I.width, I.height, C, i, h);
|
|
753
|
+
if (A)
|
|
754
|
+
return { codec: u, config: A.config, isHardwareAccelerated: A.isHardwareAccelerated };
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
}
|
|
@@ -760,23 +760,23 @@ async function qt(t, e, r) {
|
|
|
760
760
|
function zt(t) {
|
|
761
761
|
return t.byteOffset === 0 && t.byteLength === t.buffer.byteLength ? t.buffer : t.slice().buffer;
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function G(t) {
|
|
764
764
|
if (!l)
|
|
765
765
|
return;
|
|
766
766
|
const e = zt(t);
|
|
767
767
|
l.postMessage({ type: "send", message: e }, [e]);
|
|
768
768
|
}
|
|
769
|
-
const S = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(),
|
|
769
|
+
const S = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), c = [];
|
|
770
770
|
function Jt(t) {
|
|
771
|
-
for (let e = 0; e <
|
|
772
|
-
if (
|
|
773
|
-
const r =
|
|
774
|
-
return
|
|
771
|
+
for (let e = 0; e < c.length; e++)
|
|
772
|
+
if (c[e].length >= t) {
|
|
773
|
+
const r = c[e];
|
|
774
|
+
return c.splice(e, 1), r.length === t ? r : new Uint8Array(r.buffer, 0, t);
|
|
775
775
|
}
|
|
776
776
|
return new Uint8Array(t);
|
|
777
777
|
}
|
|
778
778
|
function Zt(t) {
|
|
779
|
-
|
|
779
|
+
c.length < kt && t.buffer.byteLength > 0 && c.push(new Uint8Array(t.buffer));
|
|
780
780
|
}
|
|
781
781
|
function pt(t) {
|
|
782
782
|
try {
|
|
@@ -816,68 +816,72 @@ async function ee(t) {
|
|
|
816
816
|
async function re(t) {
|
|
817
817
|
if (!l)
|
|
818
818
|
throw new Error("Video capture worker missing send port");
|
|
819
|
-
if (S.
|
|
819
|
+
if (S.has(t.captureId))
|
|
820
820
|
return;
|
|
821
|
-
const
|
|
821
|
+
const e = Math.max(1, Math.floor(t.width)), r = Math.max(1, Math.floor(t.height)), i = await qt(e, r, t.options), n = Math.max(1, Math.floor(t.options?.keyFrameIntervalFrames ?? Bt)), E = i.config.width ?? e, a = i.config.height ?? r, s = i.config.framerate ?? Y, I = i.config.bitrate ?? 0, C = t.trackSettings?.frameRate, h = C ?? s, U = new VideoEncoder({
|
|
822
822
|
output: (f) => {
|
|
823
|
-
const
|
|
824
|
-
if (!
|
|
823
|
+
const D = S.get(t.captureId);
|
|
824
|
+
if (!D || D.stopped)
|
|
825
825
|
return;
|
|
826
|
-
const
|
|
827
|
-
f.copyTo(
|
|
828
|
-
const
|
|
829
|
-
Data:
|
|
830
|
-
FrameNumber:
|
|
826
|
+
const B = Jt(f.byteLength);
|
|
827
|
+
f.copyTo(B);
|
|
828
|
+
const Q = Lt({
|
|
829
|
+
Data: B,
|
|
830
|
+
FrameNumber: D.frameCounter,
|
|
831
831
|
IsKey: f.type === "key",
|
|
832
832
|
TimestampInUs: BigInt(Math.max(0, Math.round(f.timestamp ?? 0))),
|
|
833
833
|
DurationInUs: Math.max(0, Math.round(f.duration ?? 0))
|
|
834
|
-
}),
|
|
835
|
-
Zt(
|
|
834
|
+
}), q = Pt(Q, D.senderId, { trackId: D.trackId, targetIds: D.targetIds });
|
|
835
|
+
Zt(B), G(q);
|
|
836
836
|
},
|
|
837
837
|
error: (f) => {
|
|
838
838
|
O(f, t.captureId);
|
|
839
839
|
}
|
|
840
840
|
});
|
|
841
|
-
|
|
842
|
-
const
|
|
843
|
-
|
|
841
|
+
U.configure(i.config);
|
|
842
|
+
const u = i.isHardwareAccelerated ? "hardware" : "software", T = C !== void 0 ? `${Math.round(h)}fps (track)` : `${Math.round(s)}fps (configured)`;
|
|
843
|
+
V({
|
|
844
844
|
type: "log",
|
|
845
|
-
message: `Encoder configured: codec=${
|
|
845
|
+
message: `Encoder configured: codec=${i.config.codec}, ${E}x${a}@${T}, bitrate=${I}bps, hw=${u}`
|
|
846
846
|
});
|
|
847
|
-
const
|
|
847
|
+
const R = t.readable.getReader(), A = {
|
|
848
848
|
captureId: t.captureId,
|
|
849
|
+
streamId: t.streamId,
|
|
850
|
+
sourceType: t.sourceType,
|
|
849
851
|
kind: t.kind,
|
|
850
852
|
senderId: t.senderId,
|
|
851
853
|
trackId: t.trackId,
|
|
852
|
-
width:
|
|
853
|
-
height:
|
|
854
|
-
codec:
|
|
855
|
-
encoder:
|
|
856
|
-
encoderConfig:
|
|
857
|
-
reader:
|
|
854
|
+
width: E,
|
|
855
|
+
height: a,
|
|
856
|
+
codec: i.codec,
|
|
857
|
+
encoder: U,
|
|
858
|
+
encoderConfig: i.config,
|
|
859
|
+
reader: R,
|
|
858
860
|
frameCounter: 0,
|
|
859
|
-
keyFrameIntervalFrames:
|
|
861
|
+
keyFrameIntervalFrames: n,
|
|
860
862
|
forceKeyframe: !0,
|
|
861
863
|
stopped: !1,
|
|
862
|
-
isHardwareAccelerated:
|
|
864
|
+
isHardwareAccelerated: i.isHardwareAccelerated,
|
|
865
|
+
targetIds: t.options?.targetIds
|
|
863
866
|
};
|
|
864
|
-
S.set(t.captureId,
|
|
867
|
+
S.set(t.captureId, A), M.set(t.trackId, t.captureId), G(
|
|
865
868
|
Ut(
|
|
866
869
|
ht({
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
870
|
+
StreamId: t.streamId,
|
|
871
|
+
Description: `${t.kind}:${t.streamId}`,
|
|
872
|
+
SourceType: t.sourceType,
|
|
873
|
+
Codec: A.codec,
|
|
874
|
+
CodecDetails: i.config.codec,
|
|
875
|
+
Width: E,
|
|
876
|
+
Height: a,
|
|
877
|
+
Framerate: h
|
|
874
878
|
}),
|
|
875
879
|
t.senderId,
|
|
876
|
-
{ trackId: t.trackId }
|
|
880
|
+
{ trackId: t.trackId, targetIds: A.targetIds }
|
|
877
881
|
)
|
|
878
|
-
),
|
|
882
|
+
), V({ type: "started", captureId: t.captureId, codec: A.codec, width: E, height: a }), ee(A);
|
|
879
883
|
}
|
|
880
|
-
async function
|
|
884
|
+
async function j(t) {
|
|
881
885
|
const e = S.get(t);
|
|
882
886
|
if (e) {
|
|
883
887
|
e.stopped = !0, S.delete(t), M.delete(e.trackId);
|
|
@@ -889,14 +893,14 @@ async function Q(t) {
|
|
|
889
893
|
await e.encoder.flush();
|
|
890
894
|
} catch {
|
|
891
895
|
}
|
|
892
|
-
pt(e),
|
|
896
|
+
pt(e), G(Mt(Vt({}), e.senderId, { trackId: e.trackId, targetIds: e.targetIds })), V({ type: "stopped", captureId: e.captureId });
|
|
893
897
|
}
|
|
894
898
|
}
|
|
895
899
|
function ie(t) {
|
|
896
900
|
const e = new Uint8Array(t);
|
|
897
|
-
if (
|
|
901
|
+
if (z(e) !== K.VIDEO_REQUEST_IDR_FRAME)
|
|
898
902
|
return;
|
|
899
|
-
const i =
|
|
903
|
+
const i = J(e), n = M.get(i.trackId);
|
|
900
904
|
if (!n)
|
|
901
905
|
return;
|
|
902
906
|
const E = S.get(n);
|
|
@@ -904,7 +908,7 @@ function ie(t) {
|
|
|
904
908
|
}
|
|
905
909
|
function ne() {
|
|
906
910
|
for (const t of S.keys())
|
|
907
|
-
|
|
911
|
+
j(t);
|
|
908
912
|
if (S.clear(), M.clear(), o) {
|
|
909
913
|
try {
|
|
910
914
|
o.close();
|
|
@@ -956,7 +960,7 @@ self.addEventListener("message", (t) => {
|
|
|
956
960
|
return;
|
|
957
961
|
}
|
|
958
962
|
if (e.type === "stop") {
|
|
959
|
-
|
|
963
|
+
j(e.captureId).catch((r) => O(r, e.captureId));
|
|
960
964
|
return;
|
|
961
965
|
}
|
|
962
966
|
e.type === "dispose" && ne();
|