@ikonai/sdk 1.0.43 → 1.0.44

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.
@@ -13,6 +13,11 @@ export interface IkonImageCaptureResult {
13
13
  data: Uint8Array;
14
14
  }
15
15
  export declare class IkonImageCapture {
16
+ /**
17
+ * Capture a single frame from an existing MediaStream (e.g., from an active screen share).
18
+ * The caller is responsible for managing the stream lifecycle.
19
+ */
20
+ captureFromStream(stream: MediaStream, request?: IkonImageCaptureRequest): Promise<IkonImageCaptureResult>;
16
21
  private acquireCameraStream;
17
22
  captureFromCamera(request?: IkonImageCaptureRequest): Promise<IkonImageCaptureResult>;
18
23
  }
@@ -35,5 +35,9 @@ export declare class IkonVideoCapture {
35
35
  startCamera(options?: Omit<IkonVideoCaptureRequest, 'sourceType'>): Promise<IkonVideoCaptureHandle>;
36
36
  startScreen(options?: Omit<IkonVideoCaptureRequest, 'sourceType'>): Promise<IkonVideoCaptureHandle>;
37
37
  stop(captureId: string): Promise<boolean>;
38
+ /**
39
+ * Returns the MediaStream of an active screen capture, if any.
40
+ */
41
+ getActiveScreenStream(): MediaStream | null;
38
42
  dispose(): void;
39
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonai/sdk",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/webrtc/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { WebRTCConnection, type WebRTCConnectionConfig, type WebRTCConnectionState } from './webrtc-connection';
2
2
  export { WebRTCSignaling, type WebRTCSignalingConfig } from './webrtc-signaling';
3
- export { WEBRTC_AUDIO_CODEC, WEBRTC_AUDIO_SAMPLE_RATE, WEBRTC_AUDIO_CHANNELS, WEBRTC_AUDIO_BITRATE, WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS, WEBRTC_VIDEO_CODEC, WEBRTC_VIDEO_MAX_BITRATE, WEBRTC_VIDEO_MAX_FRAMERATE, WEBRTC_MAX_AUDIO_TRACKS, WEBRTC_MAX_VIDEO_TRACKS, WEBRTC_BUNDLE_POLICY, WEBRTC_RTCP_MUX_POLICY, WEBRTC_ICE_SERVERS, WEBRTC_DATA_CHANNEL_LABEL, WEBRTC_DATA_CHANNEL_ORDERED, WEBRTC_DATA_CHANNEL_MAX_RETRANSMITS, } from './webrtc-config';
3
+ export { WEBRTC_AUDIO_CODEC, WEBRTC_AUDIO_SAMPLE_RATE, WEBRTC_AUDIO_CHANNELS, WEBRTC_AUDIO_BITRATE, WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS, WEBRTC_VIDEO_CODEC, WEBRTC_VIDEO_MAX_BITRATE, WEBRTC_VIDEO_MAX_FRAMERATE, WEBRTC_MAX_AUDIO_TRACKS, WEBRTC_MAX_VIDEO_TRACKS, WEBRTC_BUNDLE_POLICY, WEBRTC_RTCP_MUX_POLICY, WEBRTC_DATA_CHANNEL_LABEL, WEBRTC_DATA_CHANNEL_ORDERED, WEBRTC_DATA_CHANNEL_MAX_RETRANSMITS, } from './webrtc-config';
@@ -9,7 +9,6 @@ export declare const WEBRTC_VIDEO_MAX_FRAMERATE = 30;
9
9
  export declare const WEBRTC_VIDEO_PLAYOUT_DELAY_HINT_S = 0.05;
10
10
  export declare const WEBRTC_BUNDLE_POLICY: RTCBundlePolicy;
11
11
  export declare const WEBRTC_RTCP_MUX_POLICY: RTCRtcpMuxPolicy;
12
- export declare const WEBRTC_ICE_SERVERS: RTCIceServer[];
13
12
  export declare const WEBRTC_MAX_AUDIO_TRACKS = 16;
14
13
  export declare const WEBRTC_MAX_VIDEO_TRACKS = 16;
15
14
  export declare const WEBRTC_DATA_CHANNEL_LABEL = "ikon-data";
@@ -3,6 +3,7 @@ export interface WebRTCConnectionConfig {
3
3
  useAudioTrack: boolean;
4
4
  useVideoTrack: boolean;
5
5
  useDataChannel: boolean;
6
+ iceServers?: RTCIceServer[];
6
7
  onIceCandidate?: (candidate: RTCIceCandidate | null) => void;
7
8
  onStateChange?: (state: WebRTCConnectionState) => void;
8
9
  onDataChannelMessage?: (data: ArrayBuffer) => void;
@@ -7,6 +7,7 @@ export interface WebRTCSignalingConfig {
7
7
  useAudioTrack: boolean;
8
8
  useVideoTrack: boolean;
9
9
  useDataChannel: boolean;
10
+ iceServers?: RTCIceServer[];
10
11
  onStateChange?: (state: WebRTCConnectionState) => void;
11
12
  onDataChannelMessage?: (data: ArrayBuffer) => void;
12
13
  onDataChannelOpen?: () => void;
@@ -32,6 +33,10 @@ export declare class WebRTCSignaling {
32
33
  sendDataChannelMessage(data: ArrayBuffer): void;
33
34
  private audioCaptureStream;
34
35
  private videoCaptureStreams;
36
+ /**
37
+ * Returns the first active video capture MediaStream, if any.
38
+ */
39
+ getActiveVideoCaptureStream(): MediaStream | null;
35
40
  startAudioCapture(constraints?: MediaTrackConstraints): Promise<void>;
36
41
  startAudioSegment(): void;
37
42
  endAudioSegment(): void;