@ikonai/sdk 1.0.41 → 1.0.42

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.
@@ -79,6 +79,7 @@ export declare class IkonAudioPlayback {
79
79
  private readonly streamShapeSets;
80
80
  private readonly currentShapeSetValues;
81
81
  private readonly visemeBuffers;
82
+ private visemeDelayMs;
82
83
  private readonly _visemeResult;
83
84
  constructor(client: IkonClient, config?: IkonAudioPlaybackConfig);
84
85
  /**
@@ -184,6 +185,9 @@ export declare class IkonAudioPlayback {
184
185
  mouthOpenY: number;
185
186
  mouthForm: number;
186
187
  } | null;
188
+ setVisemeDelayMs(delayMs: number): void;
189
+ getVisemeDelayMs(): number;
190
+ private processShapeSetValues;
187
191
  private resolveDiagnosticsConfig;
188
192
  private resolveBackgroundConfig;
189
193
  private ensureAudioGraph;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonai/sdk",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -18,6 +18,7 @@
18
18
  * - ikon-video Force video on (true) or off (false)
19
19
  * - ikon-webrtc Force WebRTC on (true) or off (false)
20
20
  * - ikon-inspect Enable element inspection overlay (true)
21
+ * - ikon-init Enable optimized channel init flow (true)
21
22
  */
22
23
  export declare const IKON_PARAM_PROXY = "ikon-proxy";
23
24
  export declare const IKON_PARAM_WEBSOCKET = "ikon-websocket";
@@ -31,6 +32,7 @@ export declare const IKON_PARAM_AUDIO = "ikon-audio";
31
32
  export declare const IKON_PARAM_VIDEO = "ikon-video";
32
33
  export declare const IKON_PARAM_WEBRTC = "ikon-webrtc";
33
34
  export declare const IKON_PARAM_INSPECT = "ikon-inspect";
35
+ export declare const IKON_PARAM_INIT = "ikon-init";
34
36
  /**
35
37
  * Set an SDK query parameter in the URL via history.replaceState.
36
38
  */
@@ -45,3 +47,4 @@ export declare function getAudioParam(): boolean | null;
45
47
  export declare function getVideoParam(): boolean | null;
46
48
  export declare function getWebRtcParam(): boolean | null;
47
49
  export declare function getInspectParam(): boolean;
50
+ export declare function getInitParam(): boolean;
@@ -31,19 +31,20 @@ export declare class WebRTCSignaling {
31
31
  disconnect(): void;
32
32
  sendDataChannelMessage(data: ArrayBuffer): void;
33
33
  private audioCaptureStream;
34
- private cameraCaptureStream;
35
- private screenCaptureStream;
34
+ private videoCaptureStreams;
36
35
  startAudioCapture(constraints?: MediaTrackConstraints): Promise<void>;
37
36
  startAudioSegment(): void;
38
37
  endAudioSegment(): void;
39
- startVideoCapture(constraints?: MediaTrackConstraints, bitrate?: number): Promise<void>;
40
- startScreenCapture(constraints?: MediaTrackConstraints, bitrate?: number): Promise<MediaStream>;
41
- stopCameraCapture(): Promise<void>;
42
- stopScreenCapture(): Promise<void>;
38
+ startVideoCapture(constraints?: MediaTrackConstraints, bitrate?: number, senderIndex?: number): Promise<void>;
39
+ startScreenCapture(constraints?: MediaTrackConstraints, bitrate?: number, senderIndex?: number): Promise<MediaStream>;
40
+ stopVideoCapture(senderIndex: number): Promise<void>;
41
+ private sendVideoStreamBegin;
42
+ private sendVideoStreamEnd;
43
43
  stopCapture(): Promise<void>;
44
44
  private applyEncodingParams;
45
45
  private sendOffer;
46
46
  private handleAnswer;
47
+ private parseVideoCodecFromSdp;
47
48
  private handleLocalIceCandidate;
48
49
  private handleRemoteIceCandidate;
49
50
  private handleReady;
@@ -1,4 +1,4 @@
1
- import { AudioShapeSetValues, AudioShapeSet } from '../../../../shared/protocol/src/index.ts';
1
+ import { AudioShapeSet, AudioShapeSetValues } from '../../../../shared/protocol/src/index.ts';
2
2
  export type AudioPlaybackWorkerTransport = 'sab' | 'pcm';
3
3
  export type AudioPlaybackWorkerConfigureMessage = {
4
4
  type: 'configure';
@@ -6,6 +6,7 @@ export type AudioPlaybackWorkerConfigureMessage = {
6
6
  outputSampleRate: number;
7
7
  outputChannels: number;
8
8
  preferWebCodecs?: boolean;
9
+ webRtcEnabled?: boolean;
9
10
  };
10
11
  export type AudioPlaybackWorkerAttachProtocolPortMessage = {
11
12
  type: 'attachProtocolPort';
@@ -50,5 +51,12 @@ export type AudioPlaybackWorkerOut = {
50
51
  isFirst: boolean;
51
52
  isLast: boolean;
52
53
  jitterMs: number;
53
- shapeSetValues?: AudioShapeSetValues[];
54
+ } | {
55
+ type: 'shapeFrame';
56
+ streamId: string;
57
+ epoch: number;
58
+ sequence: number;
59
+ timestampInterleavedSamples: number;
60
+ frameSizeInterleavedSamples: number;
61
+ shapeSetValues: AudioShapeSetValues[];
54
62
  };
@@ -1,6 +1,7 @@
1
1
  import { VideoCodec } from '../../../../shared/protocol/src/index.ts';
2
2
  export type VideoPlaybackWorkerConfigureMessage = {
3
3
  type: 'configure';
4
+ webRtcEnabled?: boolean;
4
5
  };
5
6
  export type VideoPlaybackWorkerAttachProtocolPortMessage = {
6
7
  type: 'attachProtocolPort';