@ikonai/sdk 1.0.72 → 1.0.73
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-CC2FKp8X.js → audio-playback-worker-DLkTvKgj.js} +394 -511
- package/assets/{protocol-worker-DCLZvHGe.js → protocol-worker-BfR3vj38.js} +52 -52
- package/assets/{video-capture-worker-CzOnKSIv.js → video-capture-worker-ZDlmU6Ta.js} +153 -153
- package/assets/{video-playback-worker-BTMuFG90.js → video-playback-worker-BMnMLk3U.js} +203 -203
- package/assets/viseme-worker-BOyyqInI.js +831 -0
- package/client/ikon-client-config.d.ts +6 -0
- package/client/ikon-client.d.ts +22 -0
- package/index.d.ts +2 -1
- package/index.js +2771 -2540
- package/media/ikon-audio-playback.d.ts +0 -57
- package/media/index.d.ts +1 -0
- package/media/viseme-tracker.d.ts +53 -0
- package/package.json +1 -1
- package/utils/connect-timeline.d.ts +4 -0
- package/utils/log-sender.d.ts +1 -0
- package/utils/query-params.d.ts +9 -0
- package/webrtc/index.d.ts +1 -1
- package/webrtc/webrtc-config.d.ts +2 -0
- package/webrtc/webrtc-connection.d.ts +1 -0
- package/webrtc/webrtc-signaling.d.ts +16 -0
- package/worker/audio-playback-worker.d.ts +0 -10
- package/worker/viseme-worker.d.ts +24 -0
|
@@ -256,6 +256,12 @@ export interface WebRtcConfig {
|
|
|
256
256
|
enabled?: boolean;
|
|
257
257
|
/** ICE servers (TURN/STUN) for WebRTC. Server-provided ICE servers take precedence. */
|
|
258
258
|
iceServers?: RTCIceServer[];
|
|
259
|
+
/**
|
|
260
|
+
* ICE transport policy for the peer connection. Set to `relay` to force media
|
|
261
|
+
* through the TURN server (no host/srflx candidates) — useful for verifying the
|
|
262
|
+
* relay path. Overridden by the `ikon-ice-transport` URL param. Default: `all`.
|
|
263
|
+
*/
|
|
264
|
+
iceTransportPolicy?: RTCIceTransportPolicy;
|
|
259
265
|
}
|
|
260
266
|
/**
|
|
261
267
|
* Configuration for IkonClient.
|
package/client/ikon-client.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { FunctionRegistry } from '../functions/function-registry';
|
|
|
4
4
|
import { ReactiveRegistry } from '../reactive/reactive-registry';
|
|
5
5
|
import { IkonMedia } from '../media/ikon-media';
|
|
6
6
|
import { IkonMediaCapture } from '../media/ikon-media-capture';
|
|
7
|
+
import { VisemeTracker } from '../media/viseme-tracker';
|
|
7
8
|
import { ConnectionState } from './connection-state';
|
|
8
9
|
import { IkonClientConfig } from './ikon-client-config';
|
|
9
10
|
/**
|
|
@@ -147,7 +148,10 @@ export declare class IkonClient {
|
|
|
147
148
|
private _mediaPromise;
|
|
148
149
|
private _mediaCapture;
|
|
149
150
|
private _mediaCapturePromise;
|
|
151
|
+
private _visemeTracker;
|
|
150
152
|
private _webRtcSignaling;
|
|
153
|
+
private _webRtcConnectWatchdog;
|
|
154
|
+
private _webRtcFallbackActive;
|
|
151
155
|
private _webRtcAudioElements;
|
|
152
156
|
private _webRtcAudioStreams;
|
|
153
157
|
private _webRtcVideoStreams;
|
|
@@ -172,6 +176,15 @@ export declare class IkonClient {
|
|
|
172
176
|
* when WebRTC is disabled/unavailable. Callers must null-guard.
|
|
173
177
|
*/
|
|
174
178
|
get media(): IkonMedia | null;
|
|
179
|
+
/**
|
|
180
|
+
* Lip-sync / shape-set receiver, available whenever audio is in use.
|
|
181
|
+
*
|
|
182
|
+
* Viseme and other analyzer shape data ride the audio stream but carry no PCM,
|
|
183
|
+
* so this is built independently of {@link media} and works the same over WebRTC
|
|
184
|
+
* or the SDK playback pipeline. Poll {@link VisemeTracker.getCurrentVisemeValues}
|
|
185
|
+
* for interpolated mouth values. Returns `null` before audio is enabled.
|
|
186
|
+
*/
|
|
187
|
+
get viseme(): VisemeTracker | null;
|
|
175
188
|
/**
|
|
176
189
|
* SDK-provided custom media capture pipeline (audio/video/image), if already built.
|
|
177
190
|
*
|
|
@@ -380,6 +393,7 @@ export declare class IkonClient {
|
|
|
380
393
|
*/
|
|
381
394
|
private setErrorState;
|
|
382
395
|
private connectProtocol;
|
|
396
|
+
private ensureVisemeTracker;
|
|
383
397
|
/**
|
|
384
398
|
* Builds and enables the custom (non-WebRTC) playback pipeline. This is the
|
|
385
399
|
* backup path used when WebRTC is disabled or its signaling fails; the pipeline
|
|
@@ -387,6 +401,14 @@ export declare class IkonClient {
|
|
|
387
401
|
*/
|
|
388
402
|
private enableCustomPlayback;
|
|
389
403
|
private setupWebRtcSignaling;
|
|
404
|
+
private clearWebRtcConnectWatchdog;
|
|
405
|
+
/**
|
|
406
|
+
* Tear down a failed/never-connected WebRTC session and switch to the
|
|
407
|
+
* non-WebRTC (protocol-channel) playback path. The server is told to drop the
|
|
408
|
+
* peer immediately (WebRTCClose) so it resumes protocol-channel media without
|
|
409
|
+
* waiting for its liveness timeout. Idempotent.
|
|
410
|
+
*/
|
|
411
|
+
private fallbackToCustomPlayback;
|
|
390
412
|
private _webRtcAudioUnlockHandler;
|
|
391
413
|
private readonly _webRtcMediaSession;
|
|
392
414
|
private createWebRtcAudioElement;
|
package/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { getOpcodeName } from './utils/opcode-names';
|
|
|
23
23
|
export { initializeLogSink, setSendLogsCallback, getBufferedLogs, takeBufferedLogs, flushLogs, clearLogBuffer, getLogBufferSize } from './utils/log-sink';
|
|
24
24
|
export type { LogSinkConfig } from './utils/log-sink';
|
|
25
25
|
export { startLogSender, stopLogSender } from './utils/log-sender';
|
|
26
|
+
export { getConnectTraceId, reportConnectTimeline } from './utils/connect-timeline';
|
|
26
27
|
export { FunctionRegistry, registerBrowserFunctions, isBrowserEnvironment, FunctionCallError, type FunctionRegistryConfig, type ErrorInterceptor } from './functions';
|
|
27
28
|
export { withResultData } from './functions';
|
|
28
29
|
export type { ValueDescriptor, NormalizedValueDescriptor, PrimitiveValueKind, FunctionParameterDefinition, FunctionDefinition, FunctionHandler, FunctionResultWithData } from './functions';
|
|
@@ -30,7 +31,7 @@ export { loginErrorInterceptor, reprovisionAfterLogin, consumeLoginHandoff, getL
|
|
|
30
31
|
export type { LoginPromptState, LoginPendingCall } from './login';
|
|
31
32
|
export { IKON_AUTH_BASE_URL, IKON_AUTH_URL_PROD, IKON_AUTH_URL_DEV, IKON_BACKEND_URL_PROD, IKON_BACKEND_URL_DEV, deriveAuthUrl, getSameOriginAuthUrl, deriveBackendUrl, deriveBackendType, parseUrlParams, clearSessionParamsFromUrl, isCloudEnvironment, type UrlParams } from './connection/urls';
|
|
32
33
|
export { getOrCreateDeviceId, clearDeviceId, extractUserIdFromToken } from './storage';
|
|
33
|
-
export { IkonMedia, IkonAudioPlayback, IkonVideoPlayback, isSharedArrayBufferSupported, isAudioWorkletSupported, IkonMediaCapture, IkonVideoCapture, IkonAudioCapture, IkonImageCapture, isMobileBrowserLikely } from './media';
|
|
34
|
+
export { IkonMedia, IkonAudioPlayback, IkonVideoPlayback, VisemeTracker, isSharedArrayBufferSupported, isAudioWorkletSupported, IkonMediaCapture, IkonVideoCapture, IkonAudioCapture, IkonImageCapture, isMobileBrowserLikely } from './media';
|
|
34
35
|
export type { IkonMediaConfig, IkonAudioPlaybackConfig, IkonVideoPlaybackConfig, IkonVideoCaptureHandle, IkonVideoCaptureRequest, IkonVideoCaptureOptions, VideoCaptureSource, IkonAudioCaptureHandle, IkonAudioCaptureRequest, IkonAudioCaptureOptions, IkonImageCaptureRequest, IkonImageCaptureResult, IkonNativeCameraCaptureRequest, IkonNativeCameraFacing } from './media';
|
|
35
36
|
export { WebRTCConnection, WebRTCSignaling, WEBRTC_AUDIO_CODEC, WEBRTC_AUDIO_SAMPLE_RATE, WEBRTC_AUDIO_CHANNELS, WEBRTC_AUDIO_BITRATE, WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS, WEBRTC_VIDEO_CODEC, WEBRTC_VIDEO_MAX_BITRATE, WEBRTC_VIDEO_MAX_FRAMERATE, WEBRTC_BUNDLE_POLICY, WEBRTC_RTCP_MUX_POLICY, WEBRTC_DATA_CHANNEL_LABEL, WEBRTC_DATA_CHANNEL_ORDERED, WEBRTC_DATA_CHANNEL_MAX_RETRANSMITS, WEBRTC_MAX_AUDIO_TRACKS, WEBRTC_MAX_VIDEO_TRACKS } from './webrtc';
|
|
36
37
|
export type { WebRTCConnectionConfig, WebRTCConnectionState, WebRTCSignalingConfig } from './webrtc';
|