@ikonai/sdk 0.0.13 → 0.0.15

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.
@@ -246,14 +246,10 @@ export interface IkonClientConfig {
246
246
  /**
247
247
  * When enabled, the SDK prepares the audio pipeline and starts decoding as soon as possible.
248
248
  *
249
- * Audio output still depends on browser autoplay policies; the app must ensure a user gesture
250
- * has occurred before resuming the AudioContext. The SDK surfaces this need via `onAudioUnlockRequired`.
249
+ * Audio output still depends on browser autoplay policies. The SDK automatically resumes
250
+ * the AudioContext on the first user gesture (click, touch, keypress, etc.).
251
251
  */
252
252
  enabled?: boolean;
253
- /**
254
- * Callback fired when audio playback requires a user gesture (autoplay restriction).
255
- */
256
- onAudioUnlockRequired?: () => void;
257
253
  /**
258
254
  * Output format for mixing and rendering.
259
255
  */
@@ -274,23 +270,6 @@ export interface IkonClientConfig {
274
270
  threading?: IkonVideoPlaybackConfig['threading'];
275
271
  };
276
272
  };
277
- /**
278
- * Media capture configuration (microphone/camera/screen/image).
279
- *
280
- * The SDK does not render any UI. When browser policies require a user gesture
281
- * to start capture, the SDK notifies the host app via `onUserGestureRequired`.
282
- *
283
- * The app should show its own overlay and call `request.resume()` directly
284
- * from a user gesture handler (e.g. button click) so the browser treats the
285
- * subsequent getUserMedia/getDisplayMedia call as user-initiated.
286
- */
287
- mediaCapture?: {
288
- onUserGestureRequired?: (request: {
289
- kind: 'microphone' | 'camera' | 'screen' | 'image';
290
- resume: () => void;
291
- cancel?: () => void;
292
- }) => void;
293
- };
294
273
  /**
295
274
  * Callback when a protocol message is received.
296
275
  * The SDK handles keepalive internally; other messages are passed to this callback.
@@ -2,7 +2,6 @@ import { GlobalState, ProtocolMessage } from '../../../../shared/generated/src/i
2
2
  import { FunctionRegistry } from '../functions/function-registry';
3
3
  import { IkonMedia } from '../media/ikon-media';
4
4
  import { IkonMediaCapture } from '../media/ikon-media-capture';
5
- import { UserGestureRequest } from '../utils/user-gesture';
6
5
  import { ConnectionState } from './connection-state';
7
6
  import { IkonClientConfig } from './ikon-client-config';
8
7
  /**
@@ -122,7 +121,6 @@ export declare class IkonClient {
122
121
  */
123
122
  get mediaCapture(): IkonMediaCapture | null;
124
123
  constructor(config: IkonClientConfig);
125
- requestUserGesture(request: UserGestureRequest): void;
126
124
  private _lastError;
127
125
  /**
128
126
  * Get the error that caused 'offlineError' state, if any.
@@ -18,24 +18,31 @@ export declare const IKON_AUTH_BASE_URL = "https://auth.ikonai.com";
18
18
  */
19
19
  export declare function getBackendUrl(backendType?: BackendType): string;
20
20
  /**
21
- * Derive backend API URL from window.location.hostname.
22
- * - If hostname contains '.dev.' → IKON_BACKEND_URL_DEV
23
- * - Otherwise IKON_BACKEND_URL_PROD
21
+ * Derive backend API URL from environment or window.location.hostname.
22
+ * Priority:
23
+ * 1. VITE_IKON_BACKEND_URL env var (set by .NET server during local dev)
24
+ * 2. Local environment (localhost, LAN IPs) → IKON_BACKEND_URL_DEV
25
+ * 3. Hostname contains '.dev.' → IKON_BACKEND_URL_DEV
26
+ * 4. Default → IKON_BACKEND_URL_PROD
24
27
  */
25
28
  export declare function deriveBackendUrl(): string;
26
29
  /**
27
30
  * Derive backend type from environment or window.location.hostname.
28
- * - If VITE_IKON_BASE_URL env var contains '.dev.' → 'development'
29
- * - If hostname contains '.dev.' 'development'
30
- * - Otherwise → 'production'
31
+ * Priority:
32
+ * 1. VITE_IKON_BACKEND_TYPE env var (set by .NET server during local dev)
33
+ * 2. VITE_IKON_BACKEND_URL env var contains '.dev.' → 'development'
34
+ * 3. Local environment (localhost, LAN IPs) → 'development'
35
+ * 4. Hostname contains '.dev.' → 'development'
36
+ * 5. Default → 'production'
31
37
  */
32
38
  export declare function deriveBackendType(): BackendType;
33
39
  /**
34
40
  * Derive auth service URL from environment or window.location.hostname.
35
- * - VITE_IKON_AUTH_URL env var takes precedence (for local development)
36
- * - localhost/127.0.0.1 http://localhost:3400
37
- * - hostname contains '.dev.' → IKON_AUTH_URL_DEV
38
- * - OtherwiseIKON_AUTH_URL_PROD
41
+ * Priority:
42
+ * 1. VITE_IKON_AUTH_URL env var (set by .NET server during local dev)
43
+ * 2. Local environment (localhost, LAN IPs) → IKON_AUTH_URL_DEV
44
+ * 3. Hostname contains '.dev.' IKON_AUTH_URL_DEV
45
+ * 4. Default → IKON_AUTH_URL_PROD
39
46
  */
40
47
  export declare function deriveAuthUrl(): string;
41
48
  /**