@ikonai/sdk 0.0.14 → 0.0.16
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-DbFwKRTJ.js → audio-capture-worker-C5hNMTF7.js} +1991 -1883
- package/assets/{audio-worker-BFOOU5sk.js → audio-worker-CdScgwWe.js} +1503 -1305
- package/assets/{protocol-worker-DIwctOUY.js → protocol-worker-DZqyPqA2.js} +1498 -1396
- package/assets/{video-capture-worker-CJhKrZYf.js → video-capture-worker-OBl3bsvx.js} +591 -489
- package/assets/{video-worker-BhoZnZ1o.js → video-worker-BoOfB8qz.js} +1232 -1130
- package/client/ikon-client-config.d.ts +2 -23
- package/client/ikon-client.d.ts +0 -2
- package/index.js +3165 -2680
- package/media/ikon-audio-playback.d.ts +19 -26
- package/media/ikon-image-capture.d.ts +0 -6
- package/media/ikon-video-capture.d.ts +0 -1
- package/media/ikon-video-playback.d.ts +0 -1
- package/media/ring-buffer.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,40 +1,29 @@
|
|
|
1
1
|
import { IkonClient } from '../client/ikon-client';
|
|
2
2
|
export interface IkonAudioOutputConfig {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Multi-stream normalization configuration.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* The decode worker resamples into the actual output rate used by the playback graph.
|
|
6
|
+
* When enabled, normalizes mixed output by the number of active streams.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* This is used to normalize decoded streams into a single mixing format.
|
|
14
|
-
*/
|
|
15
|
-
channels?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Startup buffer size (seconds).
|
|
18
|
-
*
|
|
19
|
-
* This is the minimum buffered audio required before playback begins after a reset.
|
|
20
|
-
*/
|
|
21
|
-
minBufferSizeSeconds?: number;
|
|
8
|
+
multiStreamNormalization?: {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
};
|
|
22
11
|
/**
|
|
23
|
-
*
|
|
12
|
+
* Audio debugging/diagnostics configuration.
|
|
24
13
|
*
|
|
25
|
-
*
|
|
14
|
+
* When enabled, logs audio events and periodic status information.
|
|
26
15
|
*/
|
|
27
|
-
|
|
16
|
+
diagnostics?: {
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
/** Interval for periodic status logs in seconds. Default: 5 */
|
|
19
|
+
statusInterval?: number;
|
|
20
|
+
};
|
|
28
21
|
}
|
|
29
22
|
export interface IkonAudioPlaybackConfig {
|
|
30
23
|
/**
|
|
31
24
|
* Output format used by the mixing graph.
|
|
32
25
|
*/
|
|
33
26
|
output?: IkonAudioOutputConfig;
|
|
34
|
-
/**
|
|
35
|
-
* Called when the browser requires a user gesture to start audio playback.
|
|
36
|
-
*/
|
|
37
|
-
onAudioUnlockRequired?: () => void;
|
|
38
27
|
/**
|
|
39
28
|
* Worker and transport preferences.
|
|
40
29
|
*
|
|
@@ -46,7 +35,6 @@ export interface IkonAudioPlaybackConfig {
|
|
|
46
35
|
* All of these have fallbacks for restrictive embed environments.
|
|
47
36
|
*/
|
|
48
37
|
threading?: {
|
|
49
|
-
decodeWorker?: 'auto' | 'disabled';
|
|
50
38
|
preferSharedArrayBuffer?: boolean;
|
|
51
39
|
preferAudioWorklet?: boolean;
|
|
52
40
|
preferWebCodecs?: boolean;
|
|
@@ -69,7 +57,6 @@ export declare class IkonAudioPlayback {
|
|
|
69
57
|
private enabled;
|
|
70
58
|
private prepared;
|
|
71
59
|
private stateUnsubscribe;
|
|
72
|
-
private unlockRequiredSignaled;
|
|
73
60
|
private readonly isIos;
|
|
74
61
|
private recreateOnNextResume;
|
|
75
62
|
private boundVisibilityChange;
|
|
@@ -79,9 +66,12 @@ export declare class IkonAudioPlayback {
|
|
|
79
66
|
/** Timeout for AudioContext.resume() - normally resolves instantly, but some browsers hang indefinitely */
|
|
80
67
|
private static readonly RESUME_TIMEOUT_MS;
|
|
81
68
|
private audioContext;
|
|
69
|
+
private outputSampleRateHz;
|
|
82
70
|
private audioWorkletNode;
|
|
83
71
|
private scriptProcessorNode;
|
|
72
|
+
private scriptDiagnosticsTimer;
|
|
84
73
|
private workletModuleUrl;
|
|
74
|
+
private workletModuleKey;
|
|
85
75
|
private workletReady;
|
|
86
76
|
private pendingWorkletMessages;
|
|
87
77
|
private audioWorker;
|
|
@@ -137,9 +127,12 @@ export declare class IkonAudioPlayback {
|
|
|
137
127
|
* Some browsers return a Promise that never resolves in certain edge cases.
|
|
138
128
|
*/
|
|
139
129
|
private resumeWithTimeout;
|
|
140
|
-
private signalUnlockRequired;
|
|
141
130
|
private ensureAudioWorklet;
|
|
142
131
|
private ensureScriptProcessor;
|
|
132
|
+
private skipFromFallbackQueue;
|
|
133
|
+
private trimFallbackQueue;
|
|
134
|
+
private stopScriptProcessorDiagnostics;
|
|
135
|
+
private ensureScriptProcessorDiagnostics;
|
|
143
136
|
private readFromFallbackQueue;
|
|
144
137
|
private resumeAudioContextIfPossible;
|
|
145
138
|
private recoverAudioContext;
|
|
@@ -13,12 +13,6 @@ export interface IkonImageCaptureResult {
|
|
|
13
13
|
data: Uint8Array;
|
|
14
14
|
}
|
|
15
15
|
export declare class IkonImageCapture {
|
|
16
|
-
private readonly requestUserGesture;
|
|
17
|
-
constructor(requestUserGesture: (req: {
|
|
18
|
-
kind: 'image';
|
|
19
|
-
resume: () => void;
|
|
20
|
-
cancel?: () => void;
|
|
21
|
-
}) => void);
|
|
22
16
|
private acquireCameraStream;
|
|
23
17
|
captureFromCamera(request?: IkonImageCaptureRequest): Promise<IkonImageCaptureResult>;
|
|
24
18
|
}
|
|
@@ -23,7 +23,6 @@ export declare class IkonVideoCapture {
|
|
|
23
23
|
private ensureWorker;
|
|
24
24
|
private ensurePorts;
|
|
25
25
|
private getMediaStream;
|
|
26
|
-
private acquireStreamWithGestureFallback;
|
|
27
26
|
start(request: IkonVideoCaptureRequest): Promise<IkonVideoCaptureHandle>;
|
|
28
27
|
startCamera(options?: Omit<IkonVideoCaptureRequest, 'source'>): Promise<IkonVideoCaptureHandle>;
|
|
29
28
|
startScreen(options?: Omit<IkonVideoCaptureRequest, 'source'>): Promise<IkonVideoCaptureHandle>;
|
package/media/ring-buffer.d.ts
CHANGED