@ikonai/sdk 1.0.26 → 1.0.28
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/{protocol-worker-Cj8zX_U0.js → protocol-worker-Dx4ECerb.js} +205 -182
- package/channel/channel-manager.d.ts +10 -0
- package/client/endpoint-selector.d.ts +5 -0
- package/client/ikon-client-config.d.ts +12 -0
- package/client/ikon-client.d.ts +1 -0
- package/connection/urls.d.ts +0 -10
- package/index.d.ts +1 -0
- package/index.js +1569 -1492
- package/package.json +1 -1
- package/transport/web-socket-transport.d.ts +1 -0
- package/transport/web-transport-transport.d.ts +1 -0
- package/utils/debug-mode.d.ts +2 -2
- package/utils/query-params.d.ts +35 -0
|
@@ -71,6 +71,7 @@ export declare class ChannelManager {
|
|
|
71
71
|
private activeType;
|
|
72
72
|
private state;
|
|
73
73
|
private reconnectAttempts;
|
|
74
|
+
private stabilityTimer;
|
|
74
75
|
private shouldReconnect;
|
|
75
76
|
private entrypoints;
|
|
76
77
|
private abortController;
|
|
@@ -134,6 +135,15 @@ export declare class ChannelManager {
|
|
|
134
135
|
* Disconnect all channels.
|
|
135
136
|
*/
|
|
136
137
|
private disconnectAll;
|
|
138
|
+
/**
|
|
139
|
+
* Start stability timer that resets reconnect attempts after the connection
|
|
140
|
+
* survives one keepalive timeout period without dying.
|
|
141
|
+
*/
|
|
142
|
+
private startStabilityTimer;
|
|
143
|
+
/**
|
|
144
|
+
* Clear the stability timer.
|
|
145
|
+
*/
|
|
146
|
+
private clearStabilityTimer;
|
|
137
147
|
/**
|
|
138
148
|
* Update and notify state change.
|
|
139
149
|
*/
|
|
@@ -17,11 +17,15 @@ export type ProxyMode = 'force-proxy' | 'force-direct' | 'auto';
|
|
|
17
17
|
export declare class EndpointSelector {
|
|
18
18
|
private readonly isLocal;
|
|
19
19
|
private readonly _proxyMode;
|
|
20
|
+
private readonly _websocket;
|
|
21
|
+
private readonly _webtransport;
|
|
20
22
|
private _proxyPreferred;
|
|
21
23
|
private workingEndpointType;
|
|
22
24
|
constructor(config: {
|
|
23
25
|
local?: LocalConfig;
|
|
24
26
|
proxyMode?: ProxyMode;
|
|
27
|
+
websocket?: boolean;
|
|
28
|
+
webtransport?: boolean;
|
|
25
29
|
});
|
|
26
30
|
get proxyMode(): ProxyMode;
|
|
27
31
|
get proxyPreferred(): boolean;
|
|
@@ -44,6 +48,7 @@ export declare class EndpointSelector {
|
|
|
44
48
|
* Clear the remembered endpoint type.
|
|
45
49
|
*/
|
|
46
50
|
clearRememberedType(): void;
|
|
51
|
+
private filterByTransport;
|
|
47
52
|
private loadRememberedType;
|
|
48
53
|
private loadProxyPreference;
|
|
49
54
|
}
|
|
@@ -320,6 +320,18 @@ export interface IkonClientConfig {
|
|
|
320
320
|
* Default: false
|
|
321
321
|
*/
|
|
322
322
|
disableBrowserFunctions?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Force WebSocket transport only. When true, only WebSocket (and WebSocketProxy)
|
|
325
|
+
* endpoint types are used. When false, WebSocket types are excluded.
|
|
326
|
+
* Can be overridden by the `?websocket=` query parameter.
|
|
327
|
+
*/
|
|
328
|
+
websocket?: boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Force WebTransport transport only. When true, only WebTransport (and WebTransportProxy)
|
|
331
|
+
* endpoint types are used. When false, WebTransport types are excluded.
|
|
332
|
+
* Can be overridden by the `?webtransport=` query parameter.
|
|
333
|
+
*/
|
|
334
|
+
webtransport?: boolean;
|
|
323
335
|
}
|
|
324
336
|
export declare const DEFAULT_SLOW_CONNECTION_THRESHOLD_MS = 5000;
|
|
325
337
|
export declare const DEFAULT_CONNECTION_TIMEOUT_MS = 30000;
|
package/client/ikon-client.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export declare class IkonClient {
|
|
|
113
113
|
private _globalStateReceived;
|
|
114
114
|
private _channelsConnected;
|
|
115
115
|
private _joinedHandled;
|
|
116
|
+
private _environmentTrackingSetup;
|
|
116
117
|
private readonly _functionRegistry;
|
|
117
118
|
private unregisterBrowserFunctions;
|
|
118
119
|
private unregisterMediaCaptureFunctions;
|
package/connection/urls.d.ts
CHANGED
|
@@ -45,20 +45,10 @@ export declare function deriveBackendType(): BackendType;
|
|
|
45
45
|
* 4. Default → IKON_AUTH_URL_PROD
|
|
46
46
|
*/
|
|
47
47
|
export declare function deriveAuthUrl(): string;
|
|
48
|
-
/**
|
|
49
|
-
* Read the `?proxy=` query parameter.
|
|
50
|
-
* Returns `true` for `?proxy=true`, `false` for `?proxy=false`, `null` otherwise.
|
|
51
|
-
*/
|
|
52
|
-
export declare function getProxyQueryParam(): boolean | null;
|
|
53
48
|
/**
|
|
54
49
|
* Parse URL query parameters.
|
|
55
50
|
*/
|
|
56
51
|
export declare function parseQueryParams(): Record<string, string>;
|
|
57
|
-
/**
|
|
58
|
-
* Parse external connect URL from query parameter for shareable preview links.
|
|
59
|
-
* Returns the connect URL if present in the URL query string, undefined otherwise.
|
|
60
|
-
*/
|
|
61
|
-
export declare function parseExternalConnectUrlFromQuery(): string | undefined;
|
|
62
52
|
/**
|
|
63
53
|
* Result of parsing URL path and query parameters.
|
|
64
54
|
*/
|
package/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { isWebTransportSupported } from './transport/web-transport-transport';
|
|
|
13
13
|
export { setLogLevel, setLogSink, getLogLevel, getLogSink, createLogger, LogLevel, subscribeToLogEvents } from './utils/logger';
|
|
14
14
|
export type { LogEntry, LogSink, Logger, LogEventListener, LogEventSubscriptionOptions } from './utils/logger';
|
|
15
15
|
export { initializeDebugMode, isDebugModeEnabled } from './utils/debug-mode';
|
|
16
|
+
export { getLangParam, getProxyParam, getWebSocketParam, getWebTransportParam, getDebugParam, getServerUrlParam, setSdkUrlParam, IKON_PARAM_PROXY, IKON_PARAM_WEBSOCKET, IKON_PARAM_WEBTRANSPORT, IKON_PARAM_DEBUG, IKON_PARAM_LANG, IKON_PARAM_SERVER_URL, IKON_PARAM_GIT_SOURCE, IKON_PARAM_GIT_BRANCH } from './utils/query-params';
|
|
16
17
|
export { getOpcodeName } from './utils/opcode-names';
|
|
17
18
|
export { initializeLogSink, setSendLogsCallback, getBufferedLogs, takeBufferedLogs, flushLogs, clearLogBuffer, getLogBufferSize } from './utils/log-sink';
|
|
18
19
|
export type { LogSinkConfig } from './utils/log-sink';
|