@ikonai/sdk 1.0.24 → 1.0.27
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/client/ikon-client-config.d.ts +10 -2
- package/client/ikon-client.d.ts +11 -0
- package/index.js +110 -93
- package/package.json +1 -1
|
@@ -202,11 +202,15 @@ export interface MediaSessionConfig {
|
|
|
202
202
|
/**
|
|
203
203
|
* Audio playback pipeline configuration.
|
|
204
204
|
*
|
|
205
|
-
* Audio is
|
|
205
|
+
* Audio is enabled by default. The SDK prepares the audio pipeline and starts
|
|
206
206
|
* decoding as soon as possible. Audio output still depends on browser autoplay policies.
|
|
207
207
|
* The SDK automatically resumes the AudioContext on the first user gesture (click, touch, keypress, etc.).
|
|
208
208
|
*/
|
|
209
209
|
export interface AudioConfig {
|
|
210
|
+
/**
|
|
211
|
+
* Enable audio playback pipeline. Default: true
|
|
212
|
+
*/
|
|
213
|
+
enabled?: boolean;
|
|
210
214
|
/**
|
|
211
215
|
* Performance preferences for audio processing.
|
|
212
216
|
*/
|
|
@@ -223,10 +227,14 @@ export interface AudioConfig {
|
|
|
223
227
|
/**
|
|
224
228
|
* Video playback pipeline configuration.
|
|
225
229
|
*
|
|
226
|
-
* Video is
|
|
230
|
+
* Video is enabled by default. Video rendering requires an explicit surface (canvas)
|
|
227
231
|
* provided by the app. The SDK prepares worker/decoder plumbing to reduce time-to-first-frame.
|
|
228
232
|
*/
|
|
229
233
|
export interface VideoConfig {
|
|
234
|
+
/**
|
|
235
|
+
* Enable video playback pipeline. Default: true
|
|
236
|
+
*/
|
|
237
|
+
enabled?: boolean;
|
|
230
238
|
performance?: IkonVideoPlaybackConfig['performance'];
|
|
231
239
|
}
|
|
232
240
|
/**
|
package/client/ikon-client.d.ts
CHANGED
|
@@ -119,6 +119,8 @@ export declare class IkonClient {
|
|
|
119
119
|
private unregisterSoundFunctions;
|
|
120
120
|
private nextProtocolPortId;
|
|
121
121
|
private nextProtocolSendPortId;
|
|
122
|
+
private readonly _audioEnabled;
|
|
123
|
+
private readonly _videoEnabled;
|
|
122
124
|
private readonly _media;
|
|
123
125
|
private _mediaCapture;
|
|
124
126
|
private _webRtcSignaling;
|
|
@@ -141,8 +143,17 @@ export declare class IkonClient {
|
|
|
141
143
|
* These are only available in browser environments.
|
|
142
144
|
*/
|
|
143
145
|
get mediaCapture(): IkonMediaCapture | null;
|
|
146
|
+
/**
|
|
147
|
+
* Whether audio playback is enabled.
|
|
148
|
+
*/
|
|
149
|
+
get isAudioEnabled(): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Whether video playback is enabled.
|
|
152
|
+
*/
|
|
153
|
+
get isVideoEnabled(): boolean;
|
|
144
154
|
/**
|
|
145
155
|
* Whether WebRTC is enabled for audio/video transport.
|
|
156
|
+
* Returns false if both audio and video are disabled, even if webRtc.enabled is true.
|
|
146
157
|
*/
|
|
147
158
|
get isWebRtcEnabled(): boolean;
|
|
148
159
|
/**
|
package/index.js
CHANGED
|
@@ -1014,7 +1014,7 @@ function vt(t) {
|
|
|
1014
1014
|
function ce(t) {
|
|
1015
1015
|
return t instanceof Uint8Array ? t : new Uint8Array(t);
|
|
1016
1016
|
}
|
|
1017
|
-
var qt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(qt || {}), te = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(te || {}), le = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(le || {}), U = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t[t.WebRTC = 128] = "WebRTC", t[t.TcpTls = 256] = "TcpTls", t))(U || {}), en = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.SendBackToSender = 1] = "SendBackToSender", t[t.Delayable = 2] = "Delayable", t[t.SendToUser = 4] = "SendToUser", t[t.Compressed = 8] = "Compressed", t[t.Unreliable = 16] = "Unreliable", t))(en || {}), ue = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(ue || {}), tn = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(tn || {}), de = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(de || {}), nn = /* @__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))(nn || {}), It = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(It || {}), rn = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(rn || {}), sn = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(sn || {}), S = /* @__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_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.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.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", 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))(S || {});
|
|
1017
|
+
var qt = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Opus = 1] = "Opus", t[t.Mp3 = 2] = "Mp3", t[t.RawPcm16 = 3] = "RawPcm16", t))(qt || {}), te = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MobileWeb = 1] = "MobileWeb", t[t.MobileApp = 2] = "MobileApp", t[t.DesktopWeb = 3] = "DesktopWeb", t[t.DesktopApp = 4] = "DesktopApp", t))(te || {}), le = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Backend = 2] = "Backend", t[t.Server = 4] = "Server", t[t.Plugin = 8] = "Plugin", t[t.Browser = 16] = "Browser", t))(le || {}), U = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.WebSocket = 1] = "WebSocket", t[t.WebSocketProxy = 2] = "WebSocketProxy", t[t.WebTransport = 4] = "WebTransport", t[t.WebTransportProxy = 8] = "WebTransportProxy", t[t.Tcp = 16] = "Tcp", t[t.TcpProxy = 32] = "TcpProxy", t[t.Https = 64] = "Https", t[t.WebRTC = 128] = "WebRTC", t[t.TcpTls = 256] = "TcpTls", t))(U || {}), en = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.SendBackToSender = 1] = "SendBackToSender", t[t.Delayable = 2] = "Delayable", t[t.SendToUser = 4] = "SendToUser", t[t.Compressed = 8] = "Compressed", t[t.Unreliable = 16] = "Unreliable", t))(en || {}), ue = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.MessagePack = 1] = "MessagePack", t[t.MemoryPack = 2] = "MemoryPack", t[t.Json = 4] = "Json", t[t.Teleport = 8] = "Teleport", t[t.All = 15] = "All", t))(ue || {}), tn = /* @__PURE__ */ ((t) => (t[t.Face = 0] = "Face", t[t.Hands = 1] = "Hands", t[t.Pose = 2] = "Pose", t[t.All = 3] = "All", t))(tn || {}), de = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.Machine = 1] = "Machine", t[t.Human = 2] = "Human", t))(de || {}), nn = /* @__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))(nn || {}), It = /* @__PURE__ */ ((t) => (t[t.Unknown = 0] = "Unknown", t[t.DotNet = 1] = "DotNet", t[t.TypeScript = 2] = "TypeScript", t[t.Cpp = 3] = "Cpp", t))(It || {}), rn = /* @__PURE__ */ ((t) => (t[t.Local = 0] = "Local", t[t.Cloud = 1] = "Cloud", t))(rn || {}), sn = /* @__PURE__ */ ((t) => (t[t.Bundle = 0] = "Bundle", t[t.GitSource = 1] = "GitSource", t))(sn || {}), g = /* @__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_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.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.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", 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))(g || {});
|
|
1018
1018
|
const on = 1, xs = 1048637, Ws = 727023925, Gs = 3395085689;
|
|
1019
1019
|
function Vs(t) {
|
|
1020
1020
|
const e = new v(on);
|
|
@@ -1393,7 +1393,7 @@ function oo(t) {
|
|
|
1393
1393
|
return Sn(e), e;
|
|
1394
1394
|
}
|
|
1395
1395
|
function Sn(t) {
|
|
1396
|
-
return t.Type = U.None, t.Uri = "", t.OpcodeGroupsFromServer =
|
|
1396
|
+
return t.Type = U.None, t.Uri = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t.IsUnreliable = !1, t;
|
|
1397
1397
|
}
|
|
1398
1398
|
function ao(t, e) {
|
|
1399
1399
|
const n = e ?? oo();
|
|
@@ -1537,7 +1537,7 @@ function bo(t) {
|
|
|
1537
1537
|
return No(e), t && Object.assign(e, t), e;
|
|
1538
1538
|
}
|
|
1539
1539
|
function No(t) {
|
|
1540
|
-
return t.ServerSessionId = "", t.ContextType = le.Unknown, t.UserType = de.Unknown, t.PayloadType = ue.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer =
|
|
1540
|
+
return t.ServerSessionId = "", t.ContextType = le.Unknown, t.UserType = de.Unknown, t.PayloadType = ue.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = te.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = It.Unknown, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t;
|
|
1541
1541
|
}
|
|
1542
1542
|
const Cn = 1, ko = 1048632, Do = 3748161056, vo = 4289118421;
|
|
1543
1543
|
function Uo(t) {
|
|
@@ -2630,7 +2630,7 @@ function Yl(t) {
|
|
|
2630
2630
|
return jl(e), t && Object.assign(e, t), e;
|
|
2631
2631
|
}
|
|
2632
2632
|
function jl(t) {
|
|
2633
|
-
return t.Sdp = "", t.OpcodeGroupsFromServer =
|
|
2633
|
+
return t.Sdp = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.UseAudioTrack = !1, t.UseVideoTrack = !1, t.UseDataChannel = !1, t;
|
|
2634
2634
|
}
|
|
2635
2635
|
function zl(t) {
|
|
2636
2636
|
const e = new v(qr);
|
|
@@ -2943,7 +2943,7 @@ class gu {
|
|
|
2943
2943
|
}
|
|
2944
2944
|
handleProtocolMessage(e) {
|
|
2945
2945
|
try {
|
|
2946
|
-
if (oe(e).opcode ===
|
|
2946
|
+
if (oe(e).opcode === g.KEEPALIVE_REQUEST) {
|
|
2947
2947
|
this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
|
|
2948
2948
|
return;
|
|
2949
2949
|
}
|
|
@@ -3085,7 +3085,7 @@ class yu {
|
|
|
3085
3085
|
*/
|
|
3086
3086
|
handleProtocolMessage(e) {
|
|
3087
3087
|
try {
|
|
3088
|
-
if (oe(e).opcode ===
|
|
3088
|
+
if (oe(e).opcode === g.KEEPALIVE_REQUEST) {
|
|
3089
3089
|
this.send(this.getKeepaliveResponse()), this.resetKeepaliveTimeout();
|
|
3090
3090
|
return;
|
|
3091
3091
|
}
|
|
@@ -3224,7 +3224,7 @@ class Au {
|
|
|
3224
3224
|
handleProtocolMessage(e) {
|
|
3225
3225
|
try {
|
|
3226
3226
|
const n = e;
|
|
3227
|
-
if (we(n) ===
|
|
3227
|
+
if (we(n) === g.CORE_ON_SERVER_STOPPING) {
|
|
3228
3228
|
pe.debug("Received server stopping message"), this.setState("stopped"), this.transport?.close();
|
|
3229
3229
|
return;
|
|
3230
3230
|
}
|
|
@@ -3323,7 +3323,7 @@ class Ru {
|
|
|
3323
3323
|
B.debug(`WebRTC enabled, filtering entrypoints (total: ${this.entrypoints.length})`);
|
|
3324
3324
|
for (const o of this.entrypoints)
|
|
3325
3325
|
B.debug(` Entrypoint: type=${o.Type} fromServer=0x${o.OpcodeGroupsFromServer.toString(16)} toServer=0x${o.OpcodeGroupsToServer.toString(16)} uri=${o.Uri}`);
|
|
3326
|
-
const i =
|
|
3326
|
+
const i = g.GROUP_AUDIO | g.GROUP_VIDEO;
|
|
3327
3327
|
n = this.entrypoints.filter((o) => {
|
|
3328
3328
|
if (o.Type === U.WebRTC)
|
|
3329
3329
|
return B.debug(` Filtered out WebRTC entrypoint (type=${o.Type})`), !1;
|
|
@@ -4224,7 +4224,7 @@ function If() {
|
|
|
4224
4224
|
window.history.replaceState(null, "", r + window.location.search);
|
|
4225
4225
|
}
|
|
4226
4226
|
}
|
|
4227
|
-
const ee = L("Authenticator"), se =
|
|
4227
|
+
const ee = L("Authenticator"), se = g.GROUP_CORE | g.GROUP_KEEPALIVE | g.GROUP_EVENTS | g.GROUP_ACTIONS | g.GROUP_UI | g.GROUP_AUDIO | g.GROUP_VIDEO | g.GROUP_ANALYTICS, Nd = 1e3, kd = 5e3;
|
|
4228
4228
|
async function Dd(t, e, n, r) {
|
|
4229
4229
|
if (t)
|
|
4230
4230
|
try {
|
|
@@ -4819,13 +4819,13 @@ class Hd {
|
|
|
4819
4819
|
* Returns true if the message was handled.
|
|
4820
4820
|
*/
|
|
4821
4821
|
handleProtocolMessage(e, n) {
|
|
4822
|
-
if (n ===
|
|
4822
|
+
if (n === g.ACTION_FUNCTION_CALL) {
|
|
4823
4823
|
const r = oe(e);
|
|
4824
4824
|
return this.handleFunctionCall(e, r.senderId).catch((s) => {
|
|
4825
4825
|
Ee.error("Failed to handle function call:", s);
|
|
4826
4826
|
}), !0;
|
|
4827
4827
|
}
|
|
4828
|
-
return n ===
|
|
4828
|
+
return n === g.ACTION_FUNCTION_RESULT ? (this.handleFunctionResult(e), !0) : n === g.ACTION_FUNCTION_ERROR ? (this.handleFunctionError(e), !0) : !1;
|
|
4829
4829
|
}
|
|
4830
4830
|
handleFunctionResult(e) {
|
|
4831
4831
|
const n = Da(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
|
|
@@ -6874,7 +6874,7 @@ class kt {
|
|
|
6874
6874
|
b.warn("Audio decode worker unavailable (Workers not supported)");
|
|
6875
6875
|
return;
|
|
6876
6876
|
}
|
|
6877
|
-
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
6877
|
+
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: g.GROUP_AUDIO });
|
|
6878
6878
|
if (!e) {
|
|
6879
6879
|
this.enabled && b.debug("Audio pipeline waiting for client connection");
|
|
6880
6880
|
return;
|
|
@@ -7280,7 +7280,7 @@ class gh {
|
|
|
7280
7280
|
ensureProtocolPort() {
|
|
7281
7281
|
if (!this.worker || this.protocolPort)
|
|
7282
7282
|
return;
|
|
7283
|
-
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
7283
|
+
const e = this.client.createProtocolMessagePort({ opcodeGroupsMask: g.GROUP_VIDEO });
|
|
7284
7284
|
if (e) {
|
|
7285
7285
|
this.protocolPort = e;
|
|
7286
7286
|
try {
|
|
@@ -7896,7 +7896,7 @@ class Oh {
|
|
|
7896
7896
|
throw new Error("Cannot start audio capture before client is connected");
|
|
7897
7897
|
const n = this.ensureWorker();
|
|
7898
7898
|
if (!this.sendPort) {
|
|
7899
|
-
const r = this.client.createProtocolSendPort({ opcodeGroupsMask:
|
|
7899
|
+
const r = this.client.createProtocolSendPort({ opcodeGroupsMask: g.GROUP_AUDIO });
|
|
7900
7900
|
if (!r)
|
|
7901
7901
|
throw new Error("Failed to create protocol send port for audio capture");
|
|
7902
7902
|
this.sendPort = r, n.postMessage({ type: "attachSendPort", port: r.port }, [r.port]);
|
|
@@ -8541,13 +8541,13 @@ class Gh {
|
|
|
8541
8541
|
throw new Error("Cannot start video capture before client is connected");
|
|
8542
8542
|
const n = this.ensureWorker();
|
|
8543
8543
|
if (!this.sendPort) {
|
|
8544
|
-
const r = this.client.createProtocolSendPort({ opcodeGroupsMask:
|
|
8544
|
+
const r = this.client.createProtocolSendPort({ opcodeGroupsMask: g.GROUP_VIDEO });
|
|
8545
8545
|
if (!r)
|
|
8546
8546
|
throw new Error("Failed to create protocol send port for video capture");
|
|
8547
8547
|
this.sendPort = r, n.postMessage({ type: "attachSendPort", port: r.port }, [r.port]);
|
|
8548
8548
|
}
|
|
8549
8549
|
if (!this.protocolPort) {
|
|
8550
|
-
const r = this.client.createProtocolMessagePort({ opcodeGroupsMask:
|
|
8550
|
+
const r = this.client.createProtocolMessagePort({ opcodeGroupsMask: g.GROUP_VIDEO });
|
|
8551
8551
|
r && (this.protocolPort = r, n.postMessage({ type: "attachProtocolPort", port: r.port }, [r.port]));
|
|
8552
8552
|
}
|
|
8553
8553
|
}
|
|
@@ -8902,7 +8902,7 @@ class zh {
|
|
|
8902
8902
|
}
|
|
8903
8903
|
}
|
|
8904
8904
|
}
|
|
8905
|
-
const
|
|
8905
|
+
const S = L("IkonClient");
|
|
8906
8906
|
function Xh() {
|
|
8907
8907
|
return typeof __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__ < "u" && __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__;
|
|
8908
8908
|
}
|
|
@@ -8943,6 +8943,8 @@ class _f {
|
|
|
8943
8943
|
unregisterSoundFunctions = null;
|
|
8944
8944
|
nextProtocolPortId = 1;
|
|
8945
8945
|
nextProtocolSendPortId = 1;
|
|
8946
|
+
_audioEnabled;
|
|
8947
|
+
_videoEnabled;
|
|
8946
8948
|
_media;
|
|
8947
8949
|
_mediaCapture = null;
|
|
8948
8950
|
// WebRTC
|
|
@@ -8971,11 +8973,24 @@ class _f {
|
|
|
8971
8973
|
get mediaCapture() {
|
|
8972
8974
|
return this._mediaCapture;
|
|
8973
8975
|
}
|
|
8976
|
+
/**
|
|
8977
|
+
* Whether audio playback is enabled.
|
|
8978
|
+
*/
|
|
8979
|
+
get isAudioEnabled() {
|
|
8980
|
+
return this._audioEnabled;
|
|
8981
|
+
}
|
|
8982
|
+
/**
|
|
8983
|
+
* Whether video playback is enabled.
|
|
8984
|
+
*/
|
|
8985
|
+
get isVideoEnabled() {
|
|
8986
|
+
return this._videoEnabled;
|
|
8987
|
+
}
|
|
8974
8988
|
/**
|
|
8975
8989
|
* Whether WebRTC is enabled for audio/video transport.
|
|
8990
|
+
* Returns false if both audio and video are disabled, even if webRtc.enabled is true.
|
|
8976
8991
|
*/
|
|
8977
8992
|
get isWebRtcEnabled() {
|
|
8978
|
-
return this.config.webRtc?.enabled ?? !1;
|
|
8993
|
+
return (this.config.webRtc?.enabled ?? !1) && (this._audioEnabled || this._videoEnabled);
|
|
8979
8994
|
}
|
|
8980
8995
|
/**
|
|
8981
8996
|
* All WebRTC video streams keyed by track index.
|
|
@@ -9022,13 +9037,13 @@ class _f {
|
|
|
9022
9037
|
this.endpointSelector = new zh({
|
|
9023
9038
|
local: e.local,
|
|
9024
9039
|
proxyMode: s
|
|
9025
|
-
}), s !== "auto" ?
|
|
9040
|
+
}), s !== "auto" ? S.info(`Proxy mode: ${s}`) : this.endpointSelector.proxyPreferred && S.info("Proxy preferred (from previous session)"), this._functionRegistry = new Hd(), Ye() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = wd(this._functionRegistry), this.unregisterSoundFunctions = rh(this._functionRegistry)), this._audioEnabled = e.audio?.enabled ?? !0, this._videoEnabled = e.video?.enabled ?? !0;
|
|
9026
9041
|
const i = e.audio ? {
|
|
9027
9042
|
performance: e.audio.performance,
|
|
9028
9043
|
background: e.audio.background,
|
|
9029
9044
|
diagnostics: e.audio.diagnostics
|
|
9030
9045
|
} : void 0, o = e.video ? { performance: e.video.performance } : void 0;
|
|
9031
|
-
this._media = new Ch(this, { audio: i, video: o, mediaSession: e.mediaSession }), e.webRtc?.enabled || (this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0)), Ye() && (this._mediaCapture = new Vh(this, {
|
|
9046
|
+
this._media = new Ch(this, { audio: i, video: o, mediaSession: e.mediaSession }), e.webRtc?.enabled || (this._audioEnabled && this._media.audio.setEnabled(!0), this._videoEnabled && this._media.video.setEnabled(!0)), Ye() && (this._mediaCapture = new Vh(this, {
|
|
9032
9047
|
audio: {
|
|
9033
9048
|
performance: {
|
|
9034
9049
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
@@ -9081,14 +9096,14 @@ class _f {
|
|
|
9081
9096
|
this.setupLifecycleHandlers();
|
|
9082
9097
|
const e = bd();
|
|
9083
9098
|
if (e) {
|
|
9084
|
-
|
|
9099
|
+
S.info("Found external connect URL in query parameter"), await this.executeConnection(() => xe(e, this.abortController.signal));
|
|
9085
9100
|
return;
|
|
9086
9101
|
}
|
|
9087
9102
|
if (this._waitForExternalConnectUrl) {
|
|
9088
|
-
|
|
9103
|
+
S.info("Waiting for external connect URL from parent window"), this.setState("waitingForExternalConnectUrl"), this._externalConnectUrlCleanup = this.setupExternalConnectUrlListener();
|
|
9089
9104
|
return;
|
|
9090
9105
|
}
|
|
9091
|
-
|
|
9106
|
+
S.info("Connecting to Ikon server"), await this.executeConnection(() => this.authenticate());
|
|
9092
9107
|
}
|
|
9093
9108
|
/**
|
|
9094
9109
|
* Execute the connection flow with the provided authentication function.
|
|
@@ -9097,22 +9112,22 @@ class _f {
|
|
|
9097
9112
|
this._lastError = void 0, this.abortController = new AbortController(), this.setState("connecting"), this.slowConnectionTimer = setTimeout(() => {
|
|
9098
9113
|
this.currentState === "connecting" && this.setState("connectingSlow");
|
|
9099
9114
|
}, this.slowConnectionThresholdMs), this.connectionTimer = setTimeout(() => {
|
|
9100
|
-
(this.currentState === "connecting" || this.currentState === "connectingSlow") && (
|
|
9115
|
+
(this.currentState === "connecting" || this.currentState === "connectingSlow") && (S.error("Connection timeout"), this.abortController?.abort(), this.setState("offline"), this.config.onError?.(new Error("Connection timeout")));
|
|
9101
9116
|
}, this.connectionTimeoutMs);
|
|
9102
9117
|
try {
|
|
9103
9118
|
const n = await e();
|
|
9104
|
-
this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId,
|
|
9119
|
+
this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId, S.info("Authenticated to Ikon server"), await this.connectProtocol(this.authResponse.Entrypoints);
|
|
9105
9120
|
} catch (n) {
|
|
9106
9121
|
if (n instanceof DOMException && n.name === "AbortError")
|
|
9107
9122
|
return;
|
|
9108
|
-
throw
|
|
9123
|
+
throw S.error("Connection failed:", n), this.clearTimers(), this.setState("offline"), this.config.onError?.(n instanceof Error ? n : new Error(String(n))), n;
|
|
9109
9124
|
}
|
|
9110
9125
|
}
|
|
9111
9126
|
/**
|
|
9112
9127
|
* Disconnect from the server.
|
|
9113
9128
|
*/
|
|
9114
9129
|
disconnect() {
|
|
9115
|
-
|
|
9130
|
+
S.info("Disconnecting from Ikon server"), this.clearTimers(), this.cleanupLifecycleHandlers(), this._externalConnectUrlCleanup && (this._externalConnectUrlCleanup(), this._externalConnectUrlCleanup = null), this._mediaCapture?.dispose(), this.unregisterMediaCaptureFunctions && (this.unregisterMediaCaptureFunctions(), this.unregisterMediaCaptureFunctions = null), this.unregisterSoundFunctions && (this.unregisterSoundFunctions(), this.unregisterSoundFunctions = null), this.unregisterBrowserFunctions && (this.unregisterBrowserFunctions(), this.unregisterBrowserFunctions = null), this.abortController?.abort(), this.abortController = null, this.disconnectProtocol(), this.authResponse = null, this._sessionId = void 0, this._globalState = null, this._globalStateReceived = !1, this._channelsConnected = !1, this._joinedHandled = !1;
|
|
9116
9131
|
for (const e of this._webRtcAudioElements.values())
|
|
9117
9132
|
e.srcObject = null, e.remove();
|
|
9118
9133
|
this._webRtcAudioElements.clear(), this._webRtcAudioStreams.clear(), this._webRtcVideoStreams.clear(), this._webRtcTrackMap.clear(), this.removeWebRtcAudioUnlockHandler(), this._webRtcMediaSession.cleanup(), this._functionRegistry.detach(), this.setState("idle");
|
|
@@ -9146,7 +9161,7 @@ class _f {
|
|
|
9146
9161
|
this.channelManager.sendProtocolMessage(e);
|
|
9147
9162
|
return;
|
|
9148
9163
|
}
|
|
9149
|
-
|
|
9164
|
+
S.warn("Cannot send: not connected");
|
|
9150
9165
|
}
|
|
9151
9166
|
/**
|
|
9152
9167
|
* Send a client context update to the server.
|
|
@@ -9154,7 +9169,7 @@ class _f {
|
|
|
9154
9169
|
*/
|
|
9155
9170
|
sendUpdateClientContext(e) {
|
|
9156
9171
|
if (!this._sessionId) {
|
|
9157
|
-
|
|
9172
|
+
S.warn("Cannot send UpdateClientContext: not connected");
|
|
9158
9173
|
return;
|
|
9159
9174
|
}
|
|
9160
9175
|
const n = ml(
|
|
@@ -9263,7 +9278,7 @@ class _f {
|
|
|
9263
9278
|
return;
|
|
9264
9279
|
this.channelManager?.sendProtocolMessage(c);
|
|
9265
9280
|
} catch (c) {
|
|
9266
|
-
|
|
9281
|
+
S.warn(`Failed to forward protocol send port message: ${c}`);
|
|
9267
9282
|
}
|
|
9268
9283
|
};
|
|
9269
9284
|
try {
|
|
@@ -9341,10 +9356,10 @@ class _f {
|
|
|
9341
9356
|
this.notifyMessageSubscribers(e, n, r);
|
|
9342
9357
|
return;
|
|
9343
9358
|
}
|
|
9344
|
-
n ===
|
|
9359
|
+
n === g.CORE_GLOBAL_STATE && Cc(e).then((s) => {
|
|
9345
9360
|
this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && Yh(), Kh() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
9346
9361
|
}).catch((s) => {
|
|
9347
|
-
|
|
9362
|
+
S.error("Failed to parse GlobalState:", s);
|
|
9348
9363
|
}), this.notifyMessageSubscribers(e, n, r);
|
|
9349
9364
|
}
|
|
9350
9365
|
handleDataChannelMessage(e) {
|
|
@@ -9352,7 +9367,7 @@ class _f {
|
|
|
9352
9367
|
const n = new Uint8Array(e);
|
|
9353
9368
|
this.handleProtocolMessage(n);
|
|
9354
9369
|
} catch (n) {
|
|
9355
|
-
|
|
9370
|
+
S.warn("Failed to parse DataChannel message:", n);
|
|
9356
9371
|
}
|
|
9357
9372
|
}
|
|
9358
9373
|
/**
|
|
@@ -9376,7 +9391,7 @@ class _f {
|
|
|
9376
9391
|
}
|
|
9377
9392
|
s[a](e);
|
|
9378
9393
|
} catch (l) {
|
|
9379
|
-
|
|
9394
|
+
S.error("Message subscriber error:", l);
|
|
9380
9395
|
}
|
|
9381
9396
|
}
|
|
9382
9397
|
}
|
|
@@ -9393,7 +9408,7 @@ class _f {
|
|
|
9393
9408
|
this.currentState === "connected" && this.setState("reconnecting");
|
|
9394
9409
|
break;
|
|
9395
9410
|
case "stopped":
|
|
9396
|
-
|
|
9411
|
+
S.info("Ikon server has stopped"), this.clearTimers(), this.setState("offline");
|
|
9397
9412
|
break;
|
|
9398
9413
|
case "offline":
|
|
9399
9414
|
this.currentState !== "idle" && (this.clearTimers(), this.setState("offline"));
|
|
@@ -9418,7 +9433,7 @@ class _f {
|
|
|
9418
9433
|
try {
|
|
9419
9434
|
n(e);
|
|
9420
9435
|
} catch (r) {
|
|
9421
|
-
|
|
9436
|
+
S.error("State subscriber error:", r);
|
|
9422
9437
|
}
|
|
9423
9438
|
this.config.onConnectionStateChange?.(e);
|
|
9424
9439
|
}
|
|
@@ -9428,7 +9443,7 @@ class _f {
|
|
|
9428
9443
|
* Use this for unrecoverable SDK internal errors.
|
|
9429
9444
|
*/
|
|
9430
9445
|
setErrorState(e) {
|
|
9431
|
-
|
|
9446
|
+
S.error("SDK error, going offline:", e), this._lastError = e, this.clearTimers(), this.cleanupLifecycleHandlers(), this.disconnectProtocol(), this.currentState = "offlineError", this.config.onConnectionStateChange?.("offlineError"), this.config.onError?.(e);
|
|
9432
9447
|
}
|
|
9433
9448
|
async connectProtocol(e) {
|
|
9434
9449
|
if (typeof Worker > "u") {
|
|
@@ -9439,7 +9454,7 @@ class _f {
|
|
|
9439
9454
|
try {
|
|
9440
9455
|
n = new jh();
|
|
9441
9456
|
} catch (h) {
|
|
9442
|
-
|
|
9457
|
+
S.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e);
|
|
9443
9458
|
return;
|
|
9444
9459
|
}
|
|
9445
9460
|
this.channelManager = null, this.protocolWorker = n, this.workerManagerState = "idle";
|
|
@@ -9483,53 +9498,55 @@ class _f {
|
|
|
9483
9498
|
try {
|
|
9484
9499
|
await r;
|
|
9485
9500
|
} catch (h) {
|
|
9486
|
-
|
|
9501
|
+
S.warn(`Protocol worker connect failed, falling back to main thread: ${h}`), this.disconnectProtocol(), await this.connectProtocolOnMainThread(e);
|
|
9487
9502
|
}
|
|
9488
|
-
l && await this.setupWebRtcSignaling();
|
|
9503
|
+
l && (this._audioEnabled || this._videoEnabled) && await this.setupWebRtcSignaling();
|
|
9489
9504
|
}
|
|
9490
9505
|
async setupWebRtcSignaling() {
|
|
9491
|
-
|
|
9506
|
+
let e = g.GROUP_TRACKING;
|
|
9507
|
+
this._audioEnabled && (e |= g.GROUP_AUDIO), this._videoEnabled && (e |= g.GROUP_VIDEO);
|
|
9508
|
+
const n = {
|
|
9492
9509
|
sessionId: this._sessionId,
|
|
9493
|
-
opcodeGroupsFromServer:
|
|
9494
|
-
opcodeGroupsToServer:
|
|
9495
|
-
useAudioTrack:
|
|
9496
|
-
useVideoTrack:
|
|
9510
|
+
opcodeGroupsFromServer: e,
|
|
9511
|
+
opcodeGroupsToServer: e,
|
|
9512
|
+
useAudioTrack: this._audioEnabled,
|
|
9513
|
+
useVideoTrack: this._videoEnabled,
|
|
9497
9514
|
useDataChannel: !0,
|
|
9498
|
-
onDataChannelMessage: (
|
|
9499
|
-
this.handleDataChannelMessage(
|
|
9500
|
-
},
|
|
9501
|
-
onAudioTrack: (n, r, s) => {
|
|
9502
|
-
this._webRtcAudioStreams.set(n, s);
|
|
9503
|
-
},
|
|
9504
|
-
onVideoTrack: (n, r, s) => {
|
|
9505
|
-
this._webRtcVideoStreams.set(n, s);
|
|
9515
|
+
onDataChannelMessage: (r) => {
|
|
9516
|
+
this.handleDataChannelMessage(r);
|
|
9506
9517
|
},
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9518
|
+
onAudioTrack: this._audioEnabled ? (r, s, i) => {
|
|
9519
|
+
this._webRtcAudioStreams.set(r, i);
|
|
9520
|
+
} : void 0,
|
|
9521
|
+
onVideoTrack: this._videoEnabled ? (r, s, i) => {
|
|
9522
|
+
this._webRtcVideoStreams.set(r, i);
|
|
9523
|
+
} : void 0,
|
|
9524
|
+
onTrackMap: (r) => {
|
|
9525
|
+
const s = {
|
|
9526
|
+
kind: r.Kind,
|
|
9527
|
+
trackIndex: r.TrackIndex,
|
|
9528
|
+
senderId: r.SenderId,
|
|
9529
|
+
senderTrackId: r.SenderTrackId,
|
|
9530
|
+
streamId: r.StreamId,
|
|
9531
|
+
sourceType: r.SourceType,
|
|
9532
|
+
active: r.Active
|
|
9533
|
+
}, i = `${r.Kind}:${r.TrackIndex}`;
|
|
9534
|
+
if (r.Active ? this._webRtcTrackMap.set(i, s) : this._webRtcTrackMap.delete(i), r.Kind === "audio" && this._audioEnabled)
|
|
9535
|
+
if (r.Active) {
|
|
9536
|
+
const o = this._webRtcAudioStreams.get(r.TrackIndex);
|
|
9537
|
+
o && this.playWebRtcAudioTrack(r.TrackIndex, o);
|
|
9521
9538
|
} else
|
|
9522
|
-
this.stopWebRtcAudioTrack(
|
|
9523
|
-
this.onWebRtcTrackMapChanged?.(
|
|
9539
|
+
this.stopWebRtcAudioTrack(r.TrackIndex);
|
|
9540
|
+
this.onWebRtcTrackMapChanged?.(s);
|
|
9524
9541
|
}
|
|
9525
9542
|
};
|
|
9526
|
-
this._webRtcSignaling = new xu(
|
|
9543
|
+
this._webRtcSignaling = new xu(n);
|
|
9527
9544
|
try {
|
|
9528
|
-
await this._webRtcSignaling.connect((
|
|
9529
|
-
this.sendProtocolMessage(
|
|
9530
|
-
}),
|
|
9531
|
-
} catch (
|
|
9532
|
-
|
|
9545
|
+
await this._webRtcSignaling.connect((r) => {
|
|
9546
|
+
this.sendProtocolMessage(r);
|
|
9547
|
+
}), S.debug("WebRTC signaling started");
|
|
9548
|
+
} catch (r) {
|
|
9549
|
+
S.error("Failed to setup WebRTC signaling:", r), this._webRtcSignaling = null;
|
|
9533
9550
|
}
|
|
9534
9551
|
}
|
|
9535
9552
|
_webRtcAudioUnlockHandler = null;
|
|
@@ -9541,14 +9558,14 @@ class _f {
|
|
|
9541
9558
|
r && (r.srcObject = null, r.remove());
|
|
9542
9559
|
const s = document.createElement("audio");
|
|
9543
9560
|
s.autoplay = !0, s.srcObject = n, this._webRtcAudioElements.set(e, s), s.play().then(() => {
|
|
9544
|
-
|
|
9561
|
+
S.debug(`WebRTC audio track ${e} playing`), e === 0 && this.setupWebRtcMediaSession();
|
|
9545
9562
|
}).catch(() => {
|
|
9546
|
-
if (
|
|
9563
|
+
if (S.debug(`WebRTC audio track ${e} autoplay blocked, waiting for user interaction`), !this._webRtcAudioUnlockHandler) {
|
|
9547
9564
|
const i = () => {
|
|
9548
9565
|
let o = !0;
|
|
9549
9566
|
for (const [a, c] of this._webRtcAudioElements)
|
|
9550
9567
|
c.play().then(() => {
|
|
9551
|
-
|
|
9568
|
+
S.debug(`WebRTC audio track ${a} playing (after user interaction)`);
|
|
9552
9569
|
}).catch(() => {
|
|
9553
9570
|
o = !1;
|
|
9554
9571
|
});
|
|
@@ -9582,7 +9599,7 @@ class _f {
|
|
|
9582
9599
|
async connectProtocolOnMainThread(e) {
|
|
9583
9600
|
this.workerManagerState = null, this.protocolWorker = null;
|
|
9584
9601
|
const n = this.config.webRtc?.enabled ?? !1;
|
|
9585
|
-
|
|
9602
|
+
S.info(`Connecting on main thread (webRtcEnabled=${n}, entrypoints=${e.length})`), this.channelManager = new Ru({
|
|
9586
9603
|
sessionId: this._sessionId,
|
|
9587
9604
|
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Pt,
|
|
9588
9605
|
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? Bt,
|
|
@@ -9625,7 +9642,7 @@ class _f {
|
|
|
9625
9642
|
this.protocolWorker.postMessage({ type: "setInterest", opcodeGroupsMask: void 0 });
|
|
9626
9643
|
return;
|
|
9627
9644
|
}
|
|
9628
|
-
let e =
|
|
9645
|
+
let e = g.GROUP_CORE | g.GROUP_ACTIONS;
|
|
9629
9646
|
for (const [, n] of this.messageSubscribers.entries()) {
|
|
9630
9647
|
if (!n || n.opcodeGroupsMask === void 0) {
|
|
9631
9648
|
this.protocolWorker.postMessage({ type: "setInterest", opcodeGroupsMask: void 0 });
|
|
@@ -9661,14 +9678,14 @@ class _f {
|
|
|
9661
9678
|
* Close connection cleanly to avoid orphaned connections on the server.
|
|
9662
9679
|
*/
|
|
9663
9680
|
handleBeforeUnload() {
|
|
9664
|
-
|
|
9681
|
+
S.debug("Page unloading, closing connection..."), this.disconnect();
|
|
9665
9682
|
}
|
|
9666
9683
|
/**
|
|
9667
9684
|
* Handle page hide event (mobile-friendly, bfcache compatible).
|
|
9668
9685
|
* Only disconnect if page is actually being unloaded (not persisted).
|
|
9669
9686
|
*/
|
|
9670
9687
|
handlePageHide(e) {
|
|
9671
|
-
e.persisted || (
|
|
9688
|
+
e.persisted || (S.debug("Page hidden (not persisted), closing connection..."), this.disconnect());
|
|
9672
9689
|
}
|
|
9673
9690
|
/**
|
|
9674
9691
|
* Handle visibility change event.
|
|
@@ -9697,10 +9714,10 @@ class _f {
|
|
|
9697
9714
|
*/
|
|
9698
9715
|
checkConnectionHealth() {
|
|
9699
9716
|
if (this.protocolWorker) {
|
|
9700
|
-
this.currentState === "connected" && this.workerManagerState !== "connected" && (
|
|
9717
|
+
this.currentState === "connected" && this.workerManagerState !== "connected" && (S.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
|
|
9701
9718
|
return;
|
|
9702
9719
|
}
|
|
9703
|
-
this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (
|
|
9720
|
+
this.channelManager && this.currentState === "connected" && this.channelManager.managerState !== "connected" && (S.warn("Connection lost while page was backgrounded, reconnecting..."), this.setState("reconnecting"));
|
|
9704
9721
|
}
|
|
9705
9722
|
/**
|
|
9706
9723
|
* Try to handle joined state - only proceeds if both channels are connected and GlobalState is received.
|
|
@@ -9721,7 +9738,7 @@ class _f {
|
|
|
9721
9738
|
const e = Ot(Ut(), this._sessionId ?? 0);
|
|
9722
9739
|
this.sendProtocolMessage(e);
|
|
9723
9740
|
} catch (e) {
|
|
9724
|
-
|
|
9741
|
+
S.error("onJoined callback error:", e);
|
|
9725
9742
|
const n = Ot(Ut(), this._sessionId ?? 0);
|
|
9726
9743
|
this.sendProtocolMessage(n);
|
|
9727
9744
|
}
|
|
@@ -9756,17 +9773,17 @@ class _f {
|
|
|
9756
9773
|
*/
|
|
9757
9774
|
setupExternalConnectUrlListener() {
|
|
9758
9775
|
const e = (n) => {
|
|
9759
|
-
n.data?.type === "IKON_EXTERNAL_CONNECT_URL" && typeof n.data.serverUrl == "string" && (
|
|
9760
|
-
|
|
9776
|
+
n.data?.type === "IKON_EXTERNAL_CONNECT_URL" && typeof n.data.serverUrl == "string" && (S.info("Received external connect URL from parent window"), this.handleExternalConnectUrl(n.data.serverUrl).catch((r) => {
|
|
9777
|
+
S.error("Failed to connect with external connect URL:", r), this.config.onError?.(r instanceof Error ? r : new Error(String(r))), this.setState("offlineError");
|
|
9761
9778
|
}));
|
|
9762
9779
|
};
|
|
9763
|
-
if (window.addEventListener("message", e),
|
|
9780
|
+
if (window.addEventListener("message", e), S.debug("External connect URL listener registered"), window.parent && window.parent !== window)
|
|
9764
9781
|
try {
|
|
9765
|
-
window.parent.postMessage({ type: "IKON_CLIENT_READY_FOR_CONNECT_URL" }, "*"),
|
|
9782
|
+
window.parent.postMessage({ type: "IKON_CLIENT_READY_FOR_CONNECT_URL" }, "*"), S.debug("Posted IKON_CLIENT_READY_FOR_CONNECT_URL to parent window");
|
|
9766
9783
|
} catch {
|
|
9767
9784
|
}
|
|
9768
9785
|
return () => {
|
|
9769
|
-
window.removeEventListener("message", e),
|
|
9786
|
+
window.removeEventListener("message", e), S.debug("External connect URL listener removed");
|
|
9770
9787
|
};
|
|
9771
9788
|
}
|
|
9772
9789
|
/**
|
|
@@ -9775,7 +9792,7 @@ class _f {
|
|
|
9775
9792
|
async handleExternalConnectUrl(e) {
|
|
9776
9793
|
if (this.currentState !== "waitingForExternalConnectUrl")
|
|
9777
9794
|
throw new Error(`Cannot connect with external connect URL: already in state ${this.currentState}`);
|
|
9778
|
-
|
|
9795
|
+
S.info("Connecting with external connect URL");
|
|
9779
9796
|
try {
|
|
9780
9797
|
await this.executeConnection(() => xe(e, this.abortController.signal));
|
|
9781
9798
|
} finally {
|
|
@@ -9796,7 +9813,7 @@ function gf(t) {
|
|
|
9796
9813
|
return t === "offlineError";
|
|
9797
9814
|
}
|
|
9798
9815
|
const ys = /* @__PURE__ */ new Map();
|
|
9799
|
-
for (const [t, e] of Object.entries(
|
|
9816
|
+
for (const [t, e] of Object.entries(g))
|
|
9800
9817
|
typeof e == "number" && ys.set(e, t);
|
|
9801
9818
|
function Cf(t) {
|
|
9802
9819
|
return ys.get(t) ?? `UNKNOWN_${t}`;
|
|
@@ -9861,7 +9878,7 @@ export {
|
|
|
9861
9878
|
Ve as LogLevel,
|
|
9862
9879
|
mu as MaxRetriesExceededError,
|
|
9863
9880
|
nf as NoChannelsError,
|
|
9864
|
-
|
|
9881
|
+
g as Opcode,
|
|
9865
9882
|
Iu as ProvisioningTimeoutError,
|
|
9866
9883
|
tf as SpaceNotFoundError,
|
|
9867
9884
|
Z as TransportError,
|