import type WebSocket from 'ws';
import type { Session } from './session-manager';
export interface ScreencastConfig {
    format: 'jpeg' | 'png';
    quality: number;
    maxWidth: number;
    maxHeight: number;
    everyNthFrame: number;
}
/**
 * Start CDP screencast on the given session, forwarding base64 frames to the
 * WebSocket as JSON messages. Returns a stopper that detaches the listener
 * and stops the upstream screencast.
 *
 * Backpressure: if ws.bufferedAmount exceeds the ceiling we skip sending the
 * frame to the client BUT still ack to chromium so it keeps producing.
 * Dropping the frame is preferable to letting daemon memory balloon when
 * a slow client falls behind.
 */
export declare function startScreencast(session: Session, ws: WebSocket, cfg?: Partial<ScreencastConfig>): Promise<() => Promise<void>>;
//# sourceMappingURL=screencast.d.ts.map