@ikonai/sdk 0.0.34 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{audio-capture-worker-CiEMOS9I.js → audio-capture-worker-Bnqb8-xb.js} +357 -237
- package/assets/{audio-playback-worker-WI7y4bo8.js → audio-playback-worker-CXmAFv0O.js} +125 -152
- package/assets/index-C-9F_--I.js +186 -0
- package/assets/index-C3ZAK5YF.js +170 -0
- package/assets/libopus-BBY7KH2-.js +169 -0
- package/assets/libopus-simd-CQXMVirP.js +169 -0
- package/client/ikon-client-config.d.ts +54 -55
- package/index.d.ts +3 -3
- package/index.js +498 -468
- package/media/audio-constants.d.ts +5 -0
- package/media/ikon-audio-capture.d.ts +12 -1
- package/media/ikon-audio-playback.d.ts +8 -9
- package/media/ikon-media-capture.d.ts +5 -2
- package/media/ikon-media.d.ts +8 -0
- package/media/index.d.ts +3 -2
- package/package.json +1 -1
- package/assets/index-CvFH-Dkf.js +0 -650
- /package/utils/{logSink.d.ts → log-sink.d.ts} +0 -0
|
@@ -187,6 +187,50 @@ export interface TimeoutConfig {
|
|
|
187
187
|
*/
|
|
188
188
|
maxReconnectAttempts?: number;
|
|
189
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Media Session metadata for OS-level media controls (lock screen, notifications).
|
|
192
|
+
* Shared across audio and video playback.
|
|
193
|
+
*/
|
|
194
|
+
export interface MediaSessionConfig {
|
|
195
|
+
/** Title shown in media notifications. Default: 'Audio' */
|
|
196
|
+
title?: string;
|
|
197
|
+
/** Artist shown in media notifications. Default: 'Ikon AI App' */
|
|
198
|
+
artist?: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Audio playback pipeline configuration.
|
|
202
|
+
*/
|
|
203
|
+
export interface AudioConfig {
|
|
204
|
+
/**
|
|
205
|
+
* When enabled, the SDK prepares the audio pipeline and starts decoding as soon as possible.
|
|
206
|
+
*
|
|
207
|
+
* Audio output still depends on browser autoplay policies. The SDK automatically resumes
|
|
208
|
+
* the AudioContext on the first user gesture (click, touch, keypress, etc.).
|
|
209
|
+
*/
|
|
210
|
+
enabled?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Threading and capability preferences for audio.
|
|
213
|
+
*/
|
|
214
|
+
threading?: IkonAudioPlaybackConfig['threading'];
|
|
215
|
+
/**
|
|
216
|
+
* Background audio playback configuration.
|
|
217
|
+
*/
|
|
218
|
+
background?: IkonAudioPlaybackConfig['background'];
|
|
219
|
+
/**
|
|
220
|
+
* Audio debugging/diagnostics configuration.
|
|
221
|
+
*/
|
|
222
|
+
diagnostics?: IkonAudioPlaybackConfig['diagnostics'];
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Video playback pipeline configuration.
|
|
226
|
+
*
|
|
227
|
+
* Video rendering requires an explicit surface (canvas) provided by the app.
|
|
228
|
+
* The SDK can still prepare worker/decoder plumbing to reduce time-to-first-frame.
|
|
229
|
+
*/
|
|
230
|
+
export interface VideoConfig {
|
|
231
|
+
enabled?: boolean;
|
|
232
|
+
threading?: IkonVideoPlaybackConfig['threading'];
|
|
233
|
+
}
|
|
190
234
|
/**
|
|
191
235
|
* Configuration for IkonClient.
|
|
192
236
|
*/
|
|
@@ -216,63 +260,18 @@ export interface IkonClientConfig {
|
|
|
216
260
|
*/
|
|
217
261
|
debug?: DebugConfig;
|
|
218
262
|
/**
|
|
219
|
-
*
|
|
263
|
+
* Audio playback pipeline configuration.
|
|
220
264
|
*/
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Move protocol send/receive to a WebWorker when possible.
|
|
224
|
-
* - 'auto': try to use a worker and fall back to main thread on failure
|
|
225
|
-
* - 'disabled': always use main thread transports
|
|
226
|
-
*/
|
|
227
|
-
protocolWorker?: 'auto' | 'disabled';
|
|
228
|
-
};
|
|
265
|
+
audio?: AudioConfig;
|
|
229
266
|
/**
|
|
230
|
-
*
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
* (
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
* Audio playback pipeline.
|
|
239
|
-
*/
|
|
240
|
-
audio?: {
|
|
241
|
-
/**
|
|
242
|
-
* When enabled, the SDK prepares the audio pipeline and starts decoding as soon as possible.
|
|
243
|
-
*
|
|
244
|
-
* Audio output still depends on browser autoplay policies. The SDK automatically resumes
|
|
245
|
-
* the AudioContext on the first user gesture (click, touch, keypress, etc.).
|
|
246
|
-
*/
|
|
247
|
-
enabled?: boolean;
|
|
248
|
-
/**
|
|
249
|
-
* Threading and capability preferences for audio.
|
|
250
|
-
*/
|
|
251
|
-
threading?: IkonAudioPlaybackConfig['threading'];
|
|
252
|
-
/**
|
|
253
|
-
* Background audio playback configuration.
|
|
254
|
-
*/
|
|
255
|
-
background?: IkonAudioPlaybackConfig['background'];
|
|
256
|
-
/**
|
|
257
|
-
* Media Session metadata for notifications/lock screen.
|
|
258
|
-
*/
|
|
259
|
-
mediaSession?: IkonAudioPlaybackConfig['mediaSession'];
|
|
260
|
-
/**
|
|
261
|
-
* Audio debugging/diagnostics configuration.
|
|
262
|
-
*/
|
|
263
|
-
diagnostics?: IkonAudioPlaybackConfig['diagnostics'];
|
|
264
|
-
};
|
|
265
|
-
/**
|
|
266
|
-
* Video playback pipeline.
|
|
267
|
-
*
|
|
268
|
-
* Video rendering requires an explicit surface (canvas) provided by the app.
|
|
269
|
-
* The SDK can still prepare worker/decoder plumbing to reduce time-to-first-frame.
|
|
270
|
-
*/
|
|
271
|
-
video?: {
|
|
272
|
-
enabled?: boolean;
|
|
273
|
-
threading?: IkonVideoPlaybackConfig['threading'];
|
|
274
|
-
};
|
|
275
|
-
};
|
|
267
|
+
* Video playback pipeline configuration.
|
|
268
|
+
*/
|
|
269
|
+
video?: VideoConfig;
|
|
270
|
+
/**
|
|
271
|
+
* Media Session metadata for OS-level media controls (lock screen, notifications).
|
|
272
|
+
* Shared across audio and video playback.
|
|
273
|
+
*/
|
|
274
|
+
mediaSession?: MediaSessionConfig;
|
|
276
275
|
/**
|
|
277
276
|
* Callback when a protocol message is received.
|
|
278
277
|
* The SDK handles keepalive internally; other messages are passed to this callback.
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { IkonClient, type ProtocolMessageHandler, type StateHandler, type ProtocolMessageSubscriptionOptions, type ProtocolMessagePort, type ProtocolSendPort } from './client/ikon-client';
|
|
2
|
-
export type { IkonClientConfig, LocalConfig, ApiKeyConfig, SessionTokenConfig, CloudConnectionConfig, CommonConnectionConfig, TimeoutConfig, DebugConfig, BackendType } from './client/ikon-client-config';
|
|
2
|
+
export type { IkonClientConfig, LocalConfig, ApiKeyConfig, SessionTokenConfig, CloudConnectionConfig, CommonConnectionConfig, TimeoutConfig, DebugConfig, BackendType, AudioConfig, VideoConfig, MediaSessionConfig } from './client/ikon-client-config';
|
|
3
3
|
export type { ConnectionState } from './client/connection-state';
|
|
4
4
|
export { isConnecting, isConnected, isOffline, isError } from './client/connection-state';
|
|
5
5
|
export { ChannelManager, type ChannelManagerConfig, type ChannelManagerState } from './channel/channel-manager';
|
|
@@ -13,8 +13,8 @@ export { isWebTransportSupported } from './transport/web-transport-transport';
|
|
|
13
13
|
export { setLogLevel, setLogSink, getLogLevel, getLogSink, createLogger, LogLevel } from './utils/logger';
|
|
14
14
|
export type { LogEntry, LogSink, Logger } from './utils/logger';
|
|
15
15
|
export { getOpcodeName } from './utils/opcode-names';
|
|
16
|
-
export { initializeLogSink, setSendLogsCallback, getBufferedLogs, takeBufferedLogs, flushLogs, clearLogBuffer, getLogBufferSize } from './utils/
|
|
17
|
-
export type { LogSinkConfig } from './utils/
|
|
16
|
+
export { initializeLogSink, setSendLogsCallback, getBufferedLogs, takeBufferedLogs, flushLogs, clearLogBuffer, getLogBufferSize } from './utils/log-sink';
|
|
17
|
+
export type { LogSinkConfig } from './utils/log-sink';
|
|
18
18
|
export { FunctionRegistry, registerBrowserFunctions, isBrowserEnvironment, type FunctionRegistryConfig } from './functions';
|
|
19
19
|
export { withResultData } from './functions';
|
|
20
20
|
export type { ValueDescriptor, NormalizedValueDescriptor, PrimitiveValueKind, FunctionParameterDefinition, FunctionDefinition, FunctionHandler, FunctionResultWithData } from './functions';
|