export type EncodedFrameCallback = (data: ArrayBuffer, keyframe: boolean, timestamp: number) => void; /** * What `useNativeScreenCapture()` returns. Named for the same reason as * `NativeAudioCaptureState`: `NativeScreenCapture` in `host/index.ts` is the host API. */ export interface NativeScreenCaptureState { available: boolean; active: boolean; videoStream: MediaStream | null; /** Which codec the native HW encoder is using, or null if raw/inactive */ encodedCodec: "h264" | "hevc" | null; /** Subscribe to pre-encoded NAL frames. Returns unsubscribe function. */ subscribeEncodedFrames: (cb: EncodedFrameCallback) => () => void; start: (monitorIndex: number, fps: number, maxWidth?: number, maxHeight?: number, bitrate?: number, codec?: string) => Promise; stop: () => void; } export declare function useNativeScreenCapture(): NativeScreenCaptureState;