@ikonai/sdk 1.0.45 → 1.0.46
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-BnmgtUMV.js → audio-capture-worker-Brmt2Z7a.js} +156 -152
- package/assets/{audio-playback-worker-os3j8TEw.js → audio-playback-worker-CyEW91Py.js} +91 -83
- package/assets/{protocol-worker-CMTcdGdm.js → protocol-worker-z-5Xst2M.js} +466 -448
- package/assets/{video-capture-worker-CUqzL0P7.js → video-capture-worker-_LRzpUOA.js} +152 -143
- package/assets/{video-playback-worker-BoE6foO2.js → video-playback-worker-Dlf8ieLP.js} +61 -53
- package/channel/channel-manager.d.ts +12 -8
- package/channel/channel.d.ts +8 -2
- package/client/endpoint-selector.d.ts +0 -7
- package/client/ikon-client-config.d.ts +18 -3
- package/client/ikon-client.d.ts +23 -1
- package/connection/urls.d.ts +2 -2
- package/index.js +2723 -2517
- package/media/ikon-audio-capture.d.ts +15 -2
- package/media/ikon-video-capture.d.ts +7 -0
- package/package.json +1 -1
- package/transport/transport.d.ts +1 -2
- package/utils/query-params.d.ts +2 -2
- package/webrtc/webrtc-signaling.d.ts +16 -4
|
@@ -63,6 +63,12 @@ export interface IkonAudioCaptureRequest {
|
|
|
63
63
|
bitrate?: number;
|
|
64
64
|
targetIds?: number[];
|
|
65
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Optional correlation identifier embedded in the AudioStreamBegin payload. Used by the
|
|
68
|
+
* server-side CaptureButton to derive onCaptureStart/onCaptureStop from the audio path
|
|
69
|
+
* itself, eliminating any race between UI action dispatch and the audio stream.
|
|
70
|
+
*/
|
|
71
|
+
correlationId?: string;
|
|
66
72
|
onStopped?: () => void;
|
|
67
73
|
/**
|
|
68
74
|
* Called when capture encounters an error.
|
|
@@ -87,8 +93,15 @@ export interface IkonAudioCaptureHandle {
|
|
|
87
93
|
readonly currentConstraints: MediaTrackConstraints;
|
|
88
94
|
/** The current audio options (bitrate, etc.) applied to the capture. */
|
|
89
95
|
readonly currentOptions: IkonAudioCaptureOptions;
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Start a new logical recording segment. Optional correlationId identifies the originator
|
|
98
|
+
* (e.g., a CaptureButton instance) and is propagated to the server so the
|
|
99
|
+
* CaptureCorrelationBridge can fire onCaptureStart for the right registration. For the
|
|
100
|
+
* worker-encoded path the correlationId is fixed at startMic time and this argument is
|
|
101
|
+
* ignored; for the WebRTC path it is sent with each segment-start signal.
|
|
102
|
+
*/
|
|
103
|
+
startSegment(correlationId?: string): void;
|
|
104
|
+
endSegment(correlationId?: string): void;
|
|
92
105
|
stop(): Promise<void>;
|
|
93
106
|
/** Update audio constraints on the active capture. Returns true if successful. */
|
|
94
107
|
updateConstraints(constraints: MediaTrackConstraints): Promise<boolean>;
|
|
@@ -7,6 +7,13 @@ export interface IkonVideoCaptureRequest {
|
|
|
7
7
|
options?: IkonVideoCaptureOptions;
|
|
8
8
|
userGesture?: boolean;
|
|
9
9
|
constraints?: MediaTrackConstraints;
|
|
10
|
+
/**
|
|
11
|
+
* Optional correlation identifier sent to the server-side WebRtcMediaBridge so the next
|
|
12
|
+
* VideoStreamBegin it emits for this sender carries it. Used by the CaptureCorrelationBridge
|
|
13
|
+
* to route onCaptureStart/onCaptureStop dispatches to the originating CaptureButton without
|
|
14
|
+
* racing with the UI action channel.
|
|
15
|
+
*/
|
|
16
|
+
correlationId?: string;
|
|
10
17
|
onStopped?: () => void;
|
|
11
18
|
}
|
|
12
19
|
export interface IkonVideoCaptureHandle {
|
package/package.json
CHANGED
package/transport/transport.d.ts
CHANGED
|
@@ -36,9 +36,8 @@ export interface TransportCallbacks {
|
|
|
36
36
|
* Called when the connection is closed.
|
|
37
37
|
* @param reason - Optional reason for the close
|
|
38
38
|
* @param wasClean - Whether the close was clean (normal)
|
|
39
|
-
* @param isServerClose - Whether the close code was 1000 or 1001, indicating server-initiated close
|
|
40
39
|
*/
|
|
41
|
-
onClose: (reason?: string, wasClean?: boolean
|
|
40
|
+
onClose: (reason?: string, wasClean?: boolean) => void;
|
|
42
41
|
/**
|
|
43
42
|
* Called when an error occurs.
|
|
44
43
|
*/
|
package/utils/query-params.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Supported parameters:
|
|
9
9
|
* - ikon-proxy Force proxy mode on (true) or off (false)
|
|
10
10
|
* - ikon-websocket Force WebSocket transport on (true) or off (false)
|
|
11
|
-
* - ikon-webtransport Force WebTransport on (true)
|
|
11
|
+
* - ikon-webtransport Force WebTransport on (true); default is off. `false` is accepted for parity.
|
|
12
12
|
* - ikon-debug Enable SDK debug logging (true)
|
|
13
13
|
* - ikon-lang Override language detection (e.g., "en", "fi")
|
|
14
14
|
* - ikon-server-url External connect URL for shareable preview links
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* - ikon-webrtc Force WebRTC on (true) or off (false)
|
|
20
20
|
* - ikon-inspect Enable element inspection overlay (true)
|
|
21
21
|
* - ikon-retry Enable retry loops in auth/channel connect (default true; set false to fail fast)
|
|
22
|
-
* - ikon-api Route backend API calls through same-origin /ikon/api
|
|
22
|
+
* - ikon-api Route backend API calls through same-origin /ikon/api (default true on deployed apps; false to force direct calls to api.{env}.ikon.live; always off in local dev)
|
|
23
23
|
*/
|
|
24
24
|
export declare const IKON_PARAM_PROXY = "ikon-proxy";
|
|
25
25
|
export declare const IKON_PARAM_WEBSOCKET = "ikon-websocket";
|
|
@@ -37,11 +37,23 @@ export declare class WebRTCSignaling {
|
|
|
37
37
|
* Returns the first active video capture MediaStream, if any.
|
|
38
38
|
*/
|
|
39
39
|
getActiveVideoCaptureStream(): MediaStream | null;
|
|
40
|
+
/**
|
|
41
|
+
* Look up a local video capture MediaStream by its app-level streamId.
|
|
42
|
+
* Capture streamId format: `webrtc_video_${sessionId}_${trackIndex}` (see sendVideoStreamBegin).
|
|
43
|
+
* Returns null if no local capture matches.
|
|
44
|
+
*/
|
|
45
|
+
getLocalVideoCaptureStreamByStreamId(streamId: string): MediaStream | null;
|
|
40
46
|
startAudioCapture(constraints?: MediaTrackConstraints): Promise<void>;
|
|
41
|
-
startAudioSegment(): void;
|
|
42
|
-
endAudioSegment(): void;
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
startAudioSegment(correlationId?: string): void;
|
|
48
|
+
endAudioSegment(correlationId?: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* Communicate the originator's correlation id for a video capture sender to the server-side
|
|
51
|
+
* WebRtcMediaBridge so the next VideoStreamBegin it emits for this sender carries it.
|
|
52
|
+
* Called by the video capture path when starting a CaptureButton-initiated stream.
|
|
53
|
+
*/
|
|
54
|
+
sendVideoCaptureCorrelation(senderIndex: number, correlationId?: string): void;
|
|
55
|
+
startVideoCapture(constraints?: MediaTrackConstraints, bitrate?: number, senderIndex?: number, correlationId?: string): Promise<void>;
|
|
56
|
+
startScreenCapture(constraints?: MediaTrackConstraints, bitrate?: number, senderIndex?: number, correlationId?: string): Promise<MediaStream>;
|
|
45
57
|
stopVideoCapture(senderIndex: number): Promise<void>;
|
|
46
58
|
private sendVideoStreamBegin;
|
|
47
59
|
private sendVideoStreamEnd;
|