@ikonai/sdk 1.0.66 → 1.0.68

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.
@@ -141,8 +141,12 @@ export declare class IkonClient {
141
141
  private nextProtocolSendPortId;
142
142
  private readonly _audioEnabled;
143
143
  private readonly _videoEnabled;
144
- private readonly _media;
144
+ private readonly _mediaConfig;
145
+ private readonly _mediaCaptureConfig;
146
+ private _media;
147
+ private _mediaPromise;
145
148
  private _mediaCapture;
149
+ private _mediaCapturePromise;
146
150
  private _webRtcSignaling;
147
151
  private _webRtcAudioElements;
148
152
  private _webRtcAudioStreams;
@@ -161,18 +165,29 @@ export declare class IkonClient {
161
165
  private _waitForExternalConnectUrl;
162
166
  private _externalConnectUrlCleanup;
163
167
  /**
164
- * SDK-provided media pipelines (audio/video).
168
+ * SDK-provided custom (non-WebRTC) media playback pipeline.
165
169
  *
166
- * Audio and video are always enabled by default. Use this to access audio/video
167
- * playback controls and attach rendering surfaces.
170
+ * This is the backup playback path: when WebRTC carries audio/video (the
171
+ * default) it is never built and this returns `null`. It is constructed only
172
+ * when WebRTC is disabled/unavailable. Callers must null-guard.
168
173
  */
169
- get media(): IkonMedia;
174
+ get media(): IkonMedia | null;
170
175
  /**
171
- * Optional SDK-provided media capture pipelines (audio/video/image).
176
+ * SDK-provided custom media capture pipeline (audio/video/image), if already built.
172
177
  *
173
- * These are only available in browser environments.
178
+ * Capture is loaded lazily; use {@link ensureMediaCapture} to build it on demand.
179
+ * This getter returns `null` until then (and always `null` outside a browser).
174
180
  */
175
181
  get mediaCapture(): IkonMediaCapture | null;
182
+ /**
183
+ * Builds (and caches) the custom media capture pipeline on demand, dynamically
184
+ * importing its module the first time. Returns `null` outside a browser.
185
+ *
186
+ * UI that can trigger capture should call this on mount to warm the chunk so the
187
+ * later user-gesture click resolves instantly (keeping the gesture intact for iOS).
188
+ */
189
+ ensureMediaCapture(): Promise<IkonMediaCapture | null>;
190
+ private ensureMedia;
176
191
  /**
177
192
  * Whether audio playback is enabled.
178
193
  */
@@ -365,6 +380,12 @@ export declare class IkonClient {
365
380
  */
366
381
  private setErrorState;
367
382
  private connectProtocol;
383
+ /**
384
+ * Builds and enables the custom (non-WebRTC) playback pipeline. This is the
385
+ * backup path used when WebRTC is disabled or its signaling fails; the pipeline
386
+ * subscribes to the GROUP_AUDIO/GROUP_VIDEO protocol stream once enabled.
387
+ */
388
+ private enableCustomPlayback;
368
389
  private setupWebRtcSignaling;
369
390
  private _webRtcAudioUnlockHandler;
370
391
  private readonly _webRtcMediaSession;