@ikonai/sdk 1.0.59 → 1.0.61
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-playback-worker-DQyx1JwZ.js → audio-playback-worker-BhikbMvg.js} +147 -147
- package/assets/{protocol-worker-BuKXaXdD.js → protocol-worker-C1bzc65g.js} +161 -161
- package/assets/{video-capture-worker-CmIFJfiB.js → video-capture-worker-aMgUqmMd.js} +76 -76
- package/assets/{video-playback-worker-DVJEnC1l.js → video-playback-worker-Cfg2cyD1.js} +53 -53
- package/client/ikon-client-config.d.ts +3 -9
- package/client/ikon-client.d.ts +22 -0
- package/connection/authenticator.d.ts +1 -0
- package/connection/urls.d.ts +7 -0
- package/errors/index.d.ts +17 -0
- package/functions/browser-functions.d.ts +4 -0
- package/functions/function-registry.d.ts +2 -1
- package/index.d.ts +6 -3
- package/index.js +3286 -2629
- package/package.json +1 -1
- package/storage.d.ts +1 -1
- package/utils/abort-signal.d.ts +20 -0
- package/utils/browser-support.d.ts +26 -0
- package/utils/query-params.d.ts +16 -0
- package/utils/uuid.d.ts +12 -0
|
@@ -4,16 +4,16 @@ function It(t) {
|
|
|
4
4
|
return (t[4] | t[5] << 8 | t[6] << 16 | t[7] << 24) >>> 0;
|
|
5
5
|
}
|
|
6
6
|
function st(t) {
|
|
7
|
-
const e =
|
|
7
|
+
const e = ht(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
10
|
const i = r.getUint32(0, !0), n = r.getUint32(4, !0), _ = r.getUint32(8, !0), I = r.getUint32(12, !0), s = r.getUint32(16, !0), A = r.getUint32(20, !0), C = r.getUint8(24), E = r.getUint8(25), a = r.getUint8(26);
|
|
11
11
|
if (27 + A * 4 > e.length)
|
|
12
12
|
throw new Error("Protocol header exceeds payload length");
|
|
13
13
|
const T = [];
|
|
14
|
-
let
|
|
15
|
-
for (let
|
|
16
|
-
T.push(r.getUint32(
|
|
14
|
+
let o = 27;
|
|
15
|
+
for (let R = 0; R < A; R++)
|
|
16
|
+
T.push(r.getUint32(o, !0)), o += 4;
|
|
17
17
|
return {
|
|
18
18
|
length: i,
|
|
19
19
|
opcode: n,
|
|
@@ -27,12 +27,12 @@ function st(t) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
function K(t, e, r, i, n) {
|
|
30
|
-
const _ = n?.trackId ?? 0, I = n?.sequenceId ?? 0, s = n?.flags ?? 0, A = n?.targetIds ?? [], C = n?.payloadType ?? 8, E = 27 + A.length * 4, a = E + e.length,
|
|
30
|
+
const _ = n?.trackId ?? 0, I = n?.sequenceId ?? 0, s = n?.flags ?? 0, A = n?.targetIds ?? [], C = n?.payloadType ?? 8, E = 27 + A.length * 4, a = E + e.length, h = new Uint8Array(a), T = new DataView(h.buffer);
|
|
31
31
|
T.setUint32(0, a, !0), T.setUint32(4, t >>> 0, !0), T.setUint32(8, i >>> 0, !0), T.setUint32(12, _ >>> 0, !0), T.setUint32(16, I >>> 0, !0), T.setUint32(20, A.length >>> 0, !0), T.setUint8(24, r & 255), T.setUint8(25, C & 255), T.setUint8(26, s & 255);
|
|
32
|
-
let
|
|
33
|
-
for (let
|
|
34
|
-
T.setUint32(
|
|
35
|
-
return
|
|
32
|
+
let o = 27;
|
|
33
|
+
for (let R = 0; R < A.length; R++)
|
|
34
|
+
T.setUint32(o, A[R] >>> 0, !0), o += 4;
|
|
35
|
+
return h.set(e, E), h;
|
|
36
36
|
}
|
|
37
37
|
var w = /* @__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))(w || {});
|
|
38
38
|
const At = 161, Tt = 162, V = new TextEncoder();
|
|
@@ -222,7 +222,7 @@ class M {
|
|
|
222
222
|
}
|
|
223
223
|
class v {
|
|
224
224
|
constructor(e, r) {
|
|
225
|
-
this.keyType = e, this.valueType = r,
|
|
225
|
+
this.keyType = e, this.valueType = r, Rt(e);
|
|
226
226
|
}
|
|
227
227
|
payload = new P();
|
|
228
228
|
count = 0;
|
|
@@ -562,18 +562,18 @@ function d(t, e = 0) {
|
|
|
562
562
|
function Ct(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 J(t) {
|
|
570
570
|
return Array.from(t).map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function ht(t) {
|
|
573
573
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
574
574
|
}
|
|
575
|
-
var o = /* @__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))(o || {}), Z = /* @__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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_ON_CLIENT_LEFT_AFTER_GRACE_PERIOD = 65560] = "CORE_ON_CLIENT_LEFT_AFTER_GRACE_PERIOD", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", t[t.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", t[t.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", t[t.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", t[t.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", t[t.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", t[t.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", t[t.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", t[t.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", t[t.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", t[t.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", t[t.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", 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.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", t[t.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_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_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.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", t[t.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", 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.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", 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.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(Z || {});
|
|
576
|
-
const p = 1,
|
|
575
|
+
var u = /* @__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))(u || {}), Z = /* @__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.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", t[t.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", t[t.CORE_RESET_IDLE = 65560] = "CORE_RESET_IDLE", t[t.CORE_CLIENT_DISCONNECTING = 65561] = "CORE_CLIENT_DISCONNECTING", t[t.CORE_ON_APP_READY = 65562] = "CORE_ON_APP_READY", t[t.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", t[t.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", t[t.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", t[t.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", t[t.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", t[t.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", t[t.CORE_WEBRTC_VIDEO_CAPTURE = 65572] = "CORE_WEBRTC_VIDEO_CAPTURE", t[t.CORE_RELAY_AGENT_AUTH = 65576] = "CORE_RELAY_AGENT_AUTH", t[t.CORE_RELAY_AGENT_AUTH_RESULT = 65577] = "CORE_RELAY_AGENT_AUTH_RESULT", t[t.CORE_RELAY_HEARTBEAT = 65578] = "CORE_RELAY_HEARTBEAT", t[t.CORE_RELAY_TCP_CONNECTION_OPENED = 65579] = "CORE_RELAY_TCP_CONNECTION_OPENED", t[t.CORE_RELAY_TCP_CONNECTION_CLOSED = 65580] = "CORE_RELAY_TCP_CONNECTION_CLOSED", t[t.CORE_RELAY_TCP_DATA = 65581] = "CORE_RELAY_TCP_DATA", t[t.CORE_RELAY_UDP_DATA = 65582] = "CORE_RELAY_UDP_DATA", t[t.CORE_RELAY_ADD_TUNNEL = 65583] = "CORE_RELAY_ADD_TUNNEL", t[t.CORE_RELAY_TUNNEL_ADDED = 65584] = "CORE_RELAY_TUNNEL_ADDED", t[t.CORE_RELAY_REMOVE_TUNNEL = 65585] = "CORE_RELAY_REMOVE_TUNNEL", t[t.CORE_IKON_SERVER_ENDPOINT_HOST_INFO = 65586] = "CORE_IKON_SERVER_ENDPOINT_HOST_INFO", t[t.CORE_CLIENT_INITIALIZATION = 65587] = "CORE_CLIENT_INITIALIZATION", t[t.CORE_CLIENT_LIFECYCLE_BATCH = 65588] = "CORE_CLIENT_LIFECYCLE_BATCH", t[t.CORE_APP_CONFIG = 65589] = "CORE_APP_CONFIG", 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.ANALYTICS_IKON_RELAY_SERVER_STATS = 524297] = "ANALYTICS_IKON_RELAY_SERVER_STATS", t[t.ANALYTICS_IKON_TURN_SERVER_STATS = 524298] = "ANALYTICS_IKON_TURN_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_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.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", t[t.ACTION_FILE_UPLOAD_PRE_START2 = 1048643] = "ACTION_FILE_UPLOAD_PRE_START2", t[t.ACTION_FILE_UPLOAD_PRE_START_RESPONSE2 = 1048644] = "ACTION_FILE_UPLOAD_PRE_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_START2 = 1048645] = "ACTION_FILE_UPLOAD_START2", t[t.ACTION_FILE_UPLOAD_START_RESPONSE2 = 1048646] = "ACTION_FILE_UPLOAD_START_RESPONSE2", t[t.ACTION_FILE_UPLOAD_DATA2 = 1048647] = "ACTION_FILE_UPLOAD_DATA2", t[t.ACTION_FILE_UPLOAD_ACK2 = 1048648] = "ACTION_FILE_UPLOAD_ACK2", t[t.ACTION_FILE_UPLOAD_END2 = 1048649] = "ACTION_FILE_UPLOAD_END2", t[t.ACTION_FILE_UPLOAD_COMPLETE2 = 1048650] = "ACTION_FILE_UPLOAD_COMPLETE2", t[t.ACTION_FUNCTION_ENUMERATION_ITEM_BATCH = 1048651] = "ACTION_FUNCTION_ENUMERATION_ITEM_BATCH", t[t.ACTION_CALL_ACK = 1048652] = "ACTION_CALL_ACK", t[t.ACTION_TRIGGER_CRON = 1048653] = "ACTION_TRIGGER_CRON", 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.AUDIO_SHAPE_FRAME = 4194310] = "AUDIO_SHAPE_FRAME", 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.GROUP_APP_LOCAL = 1073741824] = "GROUP_APP_LOCAL", t[t.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", t))(Z || {});
|
|
576
|
+
const p = 1, ut = 8388611, ot = 271275304, lt = 2541432218, Ut = 2986785889, ft = 3105403172, St = 3456383222;
|
|
577
577
|
function Y(t) {
|
|
578
578
|
const e = {};
|
|
579
579
|
return Lt(e), t && Object.assign(e, t), e;
|
|
@@ -583,22 +583,22 @@ function Lt(t) {
|
|
|
583
583
|
}
|
|
584
584
|
function yt(t) {
|
|
585
585
|
const e = new F(p);
|
|
586
|
-
return
|
|
586
|
+
return Dt(t, e), e.finish();
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
e.writeUInt64Field(
|
|
588
|
+
function Dt(t, e) {
|
|
589
|
+
e.writeUInt64Field(ot, t.TimestampInUs), e.writeUInt32Field(lt, t.DurationInUs >>> 0), e.writeBinaryField(Ut, t.Data), e.writeBoolField(ft, t.IsKey), e.writeInt32Field(St, t.FrameNumber | 0);
|
|
590
590
|
}
|
|
591
591
|
function k(t, e, r) {
|
|
592
592
|
const i = yt(t);
|
|
593
|
-
return K(
|
|
593
|
+
return K(ut, i, p, e, r);
|
|
594
594
|
}
|
|
595
|
-
const tt = 6,
|
|
595
|
+
const tt = 6, ct = 8388609, wt = 161083277, Pt = 164808083, Ot = 1368629611, Ft = 2514959030, gt = 2745379226, mt = 2950031986, Vt = 3282782683, dt = 3284746250, Mt = 4065070594;
|
|
596
596
|
function W(t) {
|
|
597
597
|
const e = {};
|
|
598
598
|
return Bt(e), t && Object.assign(e, t), e;
|
|
599
599
|
}
|
|
600
600
|
function Bt(t) {
|
|
601
|
-
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec =
|
|
601
|
+
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = u.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t.CorrelationId = void 0, t;
|
|
602
602
|
}
|
|
603
603
|
function Gt(t) {
|
|
604
604
|
const e = new F(tt);
|
|
@@ -611,7 +611,7 @@ function bt(t, e) {
|
|
|
611
611
|
}
|
|
612
612
|
function $(t, e, r) {
|
|
613
613
|
const i = Gt(t);
|
|
614
|
-
return K(
|
|
614
|
+
return K(ct, i, tt, e, r);
|
|
615
615
|
}
|
|
616
616
|
const et = 1, Ht = 8388610;
|
|
617
617
|
function Kt(t) {
|
|
@@ -673,11 +673,11 @@ const q = ["h264", "vp8", "vp9", "av1"], $t = [
|
|
|
673
673
|
// 480p (VGA)
|
|
674
674
|
{ width: 640, height: 360 }
|
|
675
675
|
// 360p
|
|
676
|
-
], xt = 0.1, Xt = 30, jt = 5e4, Qt = 5e5, zt = 8e6, Jt = 8, qt = 3,
|
|
677
|
-
let S = null,
|
|
676
|
+
], xt = 0.1, Xt = 30, jt = 5e4, Qt = 5e5, zt = 8e6, Jt = 8, qt = 3, c = (t) => self.postMessage(t);
|
|
677
|
+
let S = null, D = null;
|
|
678
678
|
function y(t, e) {
|
|
679
679
|
const r = t instanceof Error ? t : new Error(String(t));
|
|
680
|
-
|
|
680
|
+
c({ type: "error", captureId: e, error: { name: r.name, message: r.message, stack: r.stack } });
|
|
681
681
|
}
|
|
682
682
|
function H(t) {
|
|
683
683
|
if (!Array.isArray(t) || t.length === 0)
|
|
@@ -693,14 +693,14 @@ function H(t) {
|
|
|
693
693
|
return Array.from(r);
|
|
694
694
|
}
|
|
695
695
|
function Zt(t) {
|
|
696
|
-
return t === "h264" ?
|
|
696
|
+
return t === "h264" ? u.H264 : t === "vp8" ? u.Vp8 : t === "vp9" ? u.Vp9 : t === "av1" ? u.Av1 : u.Unknown;
|
|
697
697
|
}
|
|
698
698
|
const pt = {
|
|
699
|
-
[
|
|
700
|
-
[
|
|
701
|
-
[
|
|
702
|
-
[
|
|
703
|
-
[
|
|
699
|
+
[u.Unknown]: [],
|
|
700
|
+
[u.H264]: rt,
|
|
701
|
+
[u.Vp8]: [Wt],
|
|
702
|
+
[u.Vp9]: it,
|
|
703
|
+
[u.Av1]: nt
|
|
704
704
|
};
|
|
705
705
|
function te(t, e, r, i) {
|
|
706
706
|
const n = t * e, _ = xt * (r / Xt), I = Math.floor(n * _);
|
|
@@ -720,7 +720,7 @@ async function re(t, e, r, i, n, _, I) {
|
|
|
720
720
|
bitrate: n,
|
|
721
721
|
framerate: _,
|
|
722
722
|
latencyMode: "realtime",
|
|
723
|
-
...t ===
|
|
723
|
+
...t === u.H264 ? { avc: { format: "annexb" } } : {}
|
|
724
724
|
};
|
|
725
725
|
if (typeof VideoEncoder?.isConfigSupported != "function")
|
|
726
726
|
return null;
|
|
@@ -748,22 +748,22 @@ async function x(t, e, r, i) {
|
|
|
748
748
|
let C = _;
|
|
749
749
|
if (i) {
|
|
750
750
|
const a = {
|
|
751
|
-
[
|
|
752
|
-
[
|
|
753
|
-
[
|
|
754
|
-
[
|
|
751
|
+
[u.H264]: "h264",
|
|
752
|
+
[u.Vp8]: "vp8",
|
|
753
|
+
[u.Vp9]: "vp9",
|
|
754
|
+
[u.Av1]: "av1"
|
|
755
755
|
}[i];
|
|
756
|
-
a && !_.includes(a) ? C = [a, ..._] : a && (C = [a, ..._.filter((
|
|
756
|
+
a && !_.includes(a) ? C = [a, ..._] : a && (C = [a, ..._.filter((h) => h !== a)]);
|
|
757
757
|
}
|
|
758
758
|
for (const E of A) {
|
|
759
759
|
const a = te(E.width, E.height, n, r?.bitrate);
|
|
760
|
-
for (const
|
|
760
|
+
for (const h of s)
|
|
761
761
|
for (const T of C) {
|
|
762
|
-
const
|
|
763
|
-
for (const f of
|
|
764
|
-
const l = await re(
|
|
762
|
+
const o = Zt(T), R = pt[o] ?? [];
|
|
763
|
+
for (const f of R) {
|
|
764
|
+
const l = await re(o, f, E.width, E.height, a, n, h);
|
|
765
765
|
if (l)
|
|
766
|
-
return { codec:
|
|
766
|
+
return { codec: o, config: l.config, isHardwareAccelerated: l.isHardwareAccelerated };
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
}
|
|
@@ -838,7 +838,7 @@ async function Ee(t) {
|
|
|
838
838
|
throw new Error("Video capture worker missing send port");
|
|
839
839
|
if (U.has(t.captureId))
|
|
840
840
|
return;
|
|
841
|
-
const e = Math.max(1, Math.floor(t.width)), r = Math.max(1, Math.floor(t.height)), i = await x(e, r, t.options), n = Math.max(1, Math.floor(t.options?.keyFrameIntervalFrames ?? kt)), _ = i.config.width ?? e, I = i.config.height ?? r, s = i.config.framerate ?? b, A = i.config.bitrate ?? 0, C = t.trackSettings?.frameRate, E = C ?? s, a = t.options?.framerate ?? b,
|
|
841
|
+
const e = Math.max(1, Math.floor(t.width)), r = Math.max(1, Math.floor(t.height)), i = await x(e, r, t.options), n = Math.max(1, Math.floor(t.options?.keyFrameIntervalFrames ?? kt)), _ = i.config.width ?? e, I = i.config.height ?? r, s = i.config.framerate ?? b, A = i.config.bitrate ?? 0, C = t.trackSettings?.frameRate, E = C ?? s, a = t.options?.framerate ?? b, h = t.kind === "screen" ? Math.floor(1e6 / a) : 0, T = new VideoEncoder({
|
|
842
842
|
output: (L) => {
|
|
843
843
|
const g = U.get(t.captureId);
|
|
844
844
|
if (!g || g.stopped)
|
|
@@ -859,10 +859,10 @@ async function Ee(t) {
|
|
|
859
859
|
}
|
|
860
860
|
});
|
|
861
861
|
T.configure(i.config);
|
|
862
|
-
const
|
|
863
|
-
|
|
862
|
+
const o = i.isHardwareAccelerated ? "hardware" : "software", R = t.kind === "screen" ? `${Math.round(a)}fps (throttled from ${C !== void 0 ? Math.round(C) : "?"}fps)` : C !== void 0 ? `${Math.round(E)}fps (track)` : `${Math.round(s)}fps (configured)`;
|
|
863
|
+
c({
|
|
864
864
|
type: "debug",
|
|
865
|
-
message: `Encoder configured: codec=${i.config.codec}, ${_}x${I}@${
|
|
865
|
+
message: `Encoder configured: codec=${i.config.codec}, ${_}x${I}@${R}, bitrate=${A}bps, hw=${o}`
|
|
866
866
|
});
|
|
867
867
|
const f = t.readable.getReader(), l = {
|
|
868
868
|
captureId: t.captureId,
|
|
@@ -889,7 +889,7 @@ async function Ee(t) {
|
|
|
889
889
|
targetIds: t.options?.targetIds,
|
|
890
890
|
targetFramerate: a,
|
|
891
891
|
lastEncodedTimestamp: 0,
|
|
892
|
-
minFrameIntervalUs:
|
|
892
|
+
minFrameIntervalUs: h
|
|
893
893
|
};
|
|
894
894
|
U.set(t.captureId, l), X.set(t.trackId, t.captureId);
|
|
895
895
|
const B = t.kind === "screen" ? a : E;
|
|
@@ -909,7 +909,7 @@ async function Ee(t) {
|
|
|
909
909
|
t.senderId,
|
|
910
910
|
{ trackId: t.trackId, targetIds: l.targetIds }
|
|
911
911
|
)
|
|
912
|
-
),
|
|
912
|
+
), c({ type: "started", captureId: t.captureId, codec: l.codec, width: _, height: I }), _e(l);
|
|
913
913
|
}
|
|
914
914
|
async function _t(t) {
|
|
915
915
|
const e = U.get(t);
|
|
@@ -923,14 +923,14 @@ async function _t(t) {
|
|
|
923
923
|
await e.encoder.flush();
|
|
924
924
|
} catch {
|
|
925
925
|
}
|
|
926
|
-
z(e), O(Yt(Kt({}), e.senderId, { trackId: e.trackId, targetIds: e.targetIds })),
|
|
926
|
+
z(e), O(Yt(Kt({}), e.senderId, { trackId: e.trackId, targetIds: e.targetIds })), c({ type: "stopped", captureId: e.captureId });
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
929
|
async function ae(t, e, r) {
|
|
930
930
|
const i = U.get(t);
|
|
931
931
|
if (!i || i.stopped || i.width === e && i.height === r)
|
|
932
932
|
return;
|
|
933
|
-
i.isReconfiguring = !0,
|
|
933
|
+
i.isReconfiguring = !0, c({
|
|
934
934
|
type: "debug",
|
|
935
935
|
message: `Window resize detected: ${i.width}x${i.height} -> ${e}x${r}`
|
|
936
936
|
});
|
|
@@ -945,16 +945,16 @@ async function ae(t, e, r) {
|
|
|
945
945
|
const a = U.get(t);
|
|
946
946
|
if (!a || a.stopped)
|
|
947
947
|
return;
|
|
948
|
-
const
|
|
949
|
-
E.copyTo(
|
|
948
|
+
const h = j(E.byteLength);
|
|
949
|
+
E.copyTo(h);
|
|
950
950
|
const T = Y({
|
|
951
|
-
Data:
|
|
951
|
+
Data: h,
|
|
952
952
|
FrameNumber: a.frameCounter,
|
|
953
953
|
IsKey: E.type === "key",
|
|
954
954
|
TimestampInUs: BigInt(Math.max(0, Math.round(E.timestamp ?? 0))),
|
|
955
955
|
DurationInUs: Math.max(0, Math.round(E.duration ?? 0))
|
|
956
|
-
}),
|
|
957
|
-
Q(
|
|
956
|
+
}), o = k(T, a.senderId, { trackId: a.trackId, targetIds: a.targetIds });
|
|
957
|
+
Q(h), O(o);
|
|
958
958
|
},
|
|
959
959
|
error: (E) => {
|
|
960
960
|
y(E, t);
|
|
@@ -979,7 +979,7 @@ async function ae(t, e, r) {
|
|
|
979
979
|
)
|
|
980
980
|
), i.isReconfiguring = !1;
|
|
981
981
|
const A = n.isHardwareAccelerated ? "hardware" : "software", C = i.kind === "screen" ? `${Math.round(i.targetFramerate)}fps (throttled)` : `${Math.round(i.framerate)}fps`;
|
|
982
|
-
|
|
982
|
+
c({
|
|
983
983
|
type: "debug",
|
|
984
984
|
message: `Encoder reconfigured: codec=${n.config.codec}, ${_}x${I}@${C}, bitrate=${n.config.bitrate ?? 0}bps, hw=${A}`
|
|
985
985
|
});
|
|
@@ -991,7 +991,7 @@ async function Ie(t, e) {
|
|
|
991
991
|
const i = H(r.options?.preferredCodecs), n = H(e.preferredCodecs), _ = JSON.stringify(i) !== JSON.stringify(n), I = r.options?.bitrate !== e.bitrate, s = r.options?.framerate !== e.framerate, A = e.width !== void 0 && r.options?.width !== e.width, C = e.height !== void 0 && r.options?.height !== e.height;
|
|
992
992
|
if (!_ && !I && !s && !A && !C)
|
|
993
993
|
return;
|
|
994
|
-
r.isReconfiguring = !0,
|
|
994
|
+
r.isReconfiguring = !0, c({
|
|
995
995
|
type: "debug",
|
|
996
996
|
message: `Options update: codec=${_}, bitrate=${I}, framerate=${s}, width=${A}, height=${C}`
|
|
997
997
|
}), r.options = e, r.kind === "camera" && (A && e.width !== void 0 && (r.width = e.width), C && e.height !== void 0 && (r.height = e.height));
|
|
@@ -1001,26 +1001,26 @@ async function Ie(t, e) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
const E = await x(r.width, r.height, e);
|
|
1003
1003
|
z(r), r.codec = E.codec, r.encoderConfig = E.config, r.isHardwareAccelerated = E.isHardwareAccelerated, r.framerate = E.config.framerate ?? r.framerate, r.encoder = new VideoEncoder({
|
|
1004
|
-
output: (
|
|
1004
|
+
output: (R) => {
|
|
1005
1005
|
const f = U.get(t);
|
|
1006
1006
|
if (!f || f.stopped)
|
|
1007
1007
|
return;
|
|
1008
|
-
const l = j(
|
|
1009
|
-
|
|
1008
|
+
const l = j(R.byteLength);
|
|
1009
|
+
R.copyTo(l);
|
|
1010
1010
|
const B = Y({
|
|
1011
1011
|
Data: l,
|
|
1012
1012
|
FrameNumber: f.frameCounter,
|
|
1013
|
-
IsKey:
|
|
1014
|
-
TimestampInUs: BigInt(Math.max(0, Math.round(
|
|
1015
|
-
DurationInUs: Math.max(0, Math.round(
|
|
1013
|
+
IsKey: R.type === "key",
|
|
1014
|
+
TimestampInUs: BigInt(Math.max(0, Math.round(R.timestamp ?? 0))),
|
|
1015
|
+
DurationInUs: Math.max(0, Math.round(R.duration ?? 0))
|
|
1016
1016
|
}), L = k(B, f.senderId, { trackId: f.trackId, targetIds: f.targetIds });
|
|
1017
1017
|
Q(l), O(L);
|
|
1018
1018
|
},
|
|
1019
|
-
error: (
|
|
1020
|
-
y(
|
|
1019
|
+
error: (R) => {
|
|
1020
|
+
y(R, t);
|
|
1021
1021
|
}
|
|
1022
1022
|
}), r.encoder.configure(E.config), r.forceKeyframe = !0, r.kind === "screen" && s && e.framerate !== void 0 && (r.targetFramerate = e.framerate, r.minFrameIntervalUs = Math.floor(1e6 / e.framerate), r.lastEncodedTimestamp = 0);
|
|
1023
|
-
const a = E.config.width ?? r.width,
|
|
1023
|
+
const a = E.config.width ?? r.width, h = E.config.height ?? r.height;
|
|
1024
1024
|
O(
|
|
1025
1025
|
$(
|
|
1026
1026
|
W({
|
|
@@ -1030,7 +1030,7 @@ async function Ie(t, e) {
|
|
|
1030
1030
|
Codec: r.codec,
|
|
1031
1031
|
CodecDetails: E.config.codec,
|
|
1032
1032
|
Width: a,
|
|
1033
|
-
Height:
|
|
1033
|
+
Height: h,
|
|
1034
1034
|
Framerate: r.kind === "screen" ? r.targetFramerate : r.framerate,
|
|
1035
1035
|
CorrelationId: r.correlationId
|
|
1036
1036
|
}),
|
|
@@ -1038,10 +1038,10 @@ async function Ie(t, e) {
|
|
|
1038
1038
|
{ trackId: r.trackId, targetIds: r.targetIds }
|
|
1039
1039
|
)
|
|
1040
1040
|
), r.isReconfiguring = !1;
|
|
1041
|
-
const T = E.isHardwareAccelerated ? "hardware" : "software",
|
|
1042
|
-
|
|
1041
|
+
const T = E.isHardwareAccelerated ? "hardware" : "software", o = r.kind === "screen" ? `${Math.round(r.targetFramerate)}fps (throttled)` : `${Math.round(r.framerate)}fps`;
|
|
1042
|
+
c({
|
|
1043
1043
|
type: "debug",
|
|
1044
|
-
message: `Encoder reconfigured (options): codec=${E.config.codec}, ${a}x${
|
|
1044
|
+
message: `Encoder reconfigured (options): codec=${E.config.codec}, ${a}x${h}@${o}, bitrate=${E.config.bitrate ?? 0}bps, hw=${T}`
|
|
1045
1045
|
});
|
|
1046
1046
|
}
|
|
1047
1047
|
function se(t) {
|
|
@@ -1059,12 +1059,12 @@ async function Ae() {
|
|
|
1059
1059
|
(e) => _t(e).catch(() => {
|
|
1060
1060
|
})
|
|
1061
1061
|
);
|
|
1062
|
-
if (await Promise.all(t),
|
|
1062
|
+
if (await Promise.all(t), D) {
|
|
1063
1063
|
try {
|
|
1064
|
-
|
|
1064
|
+
D.close();
|
|
1065
1065
|
} catch {
|
|
1066
1066
|
}
|
|
1067
|
-
|
|
1067
|
+
D = null;
|
|
1068
1068
|
}
|
|
1069
1069
|
if (S) {
|
|
1070
1070
|
try {
|
|
@@ -1090,17 +1090,17 @@ self.addEventListener("message", (t) => {
|
|
|
1090
1090
|
return;
|
|
1091
1091
|
}
|
|
1092
1092
|
if (e.type === "attachProtocolPort") {
|
|
1093
|
-
if (
|
|
1093
|
+
if (D)
|
|
1094
1094
|
try {
|
|
1095
|
-
|
|
1095
|
+
D.close();
|
|
1096
1096
|
} catch {
|
|
1097
1097
|
}
|
|
1098
|
-
|
|
1098
|
+
D = e.port, D.addEventListener("message", (r) => {
|
|
1099
1099
|
const i = r.data;
|
|
1100
1100
|
i?.type === "protocol" && i.message instanceof ArrayBuffer && se(i.message);
|
|
1101
1101
|
});
|
|
1102
1102
|
try {
|
|
1103
|
-
|
|
1103
|
+
D.start?.();
|
|
1104
1104
|
} catch {
|
|
1105
1105
|
}
|
|
1106
1106
|
return;
|