import type { AppiumLogger } from '@appium/types'; import type { WindowsDriver } from '../driver'; export interface StartRecordingOptions { videoFilter?: string; fps?: number | string; preset?: string; captureCursor?: boolean; captureClicks?: boolean; audioInput?: string; timeLimit?: string | number; forceRestart?: boolean; } export interface StopRecordingOptions { remotePath?: string; user?: string; pass?: string; method?: string; headers?: Record; fileFieldName?: string; formFields?: Array> | [string, string][]; } interface ScreenRecorderOptions { fps?: number; audioInput?: string; captureCursor?: boolean; captureClicks?: boolean; preset?: string; videoFilter?: string; timeLimit?: number; } export declare class ScreenRecorder { private readonly log; private readonly _videoPath; private _process; private readonly _fps; private readonly _audioInput?; private readonly _captureCursor?; private readonly _captureClicks?; private readonly _preset; private readonly _videoFilter?; private readonly _timeLimit; constructor(videoPath: string, log: AppiumLogger, opts?: ScreenRecorderOptions); getVideoPath(): Promise; isRunning(): boolean; _enforceTermination(): Promise; start(): Promise; stop(force?: boolean): Promise; } /** * Records the desktop in the background while the automated test runs. * * Requires [FFmpeg](https://www.ffmpeg.org/download.html) on PATH. Output is H.264 in an MP4 container suitable for * typical in-browser playback. * * @param timeLimit The maximum recording time, in seconds. Default is 10 minutes. * @param videoFilter The video filter spec to apply for ffmpeg. * See the FFmpeg filtering guide for supported values. * @param fps The number of frames per second in the resulting video. * Higher values produce larger files. * @param preset One of the supported x264 encoding presets. * (For example ultrafast through veryslow; see the FFmpeg H.264 encoding guide.) * @param captureCursor Whether to capture the mouse cursor while recording. * @param captureClicks Whether to capture mouse clicks while recording. * @param audioInput Optional DirectShow audio device name to record alongside the desktop video. * @param forceRestart Whether to stop any in-progress recording before starting a new one. * @throws If recording cannot be started or is unsupported on this host. */ export declare function windowsStartRecordingScreen(this: WindowsDriver, timeLimit?: string | number, videoFilter?: string, fps?: string | number, preset?: string, captureCursor?: boolean, captureClicks?: boolean, audioInput?: string, forceRestart?: boolean): Promise; /** * Stops the current screen recording and returns the result. * * When no recording was started, returns an empty string. When no remote upload URL is given, the recorded file * is read into memory and returned as Base64 in the response; very large files may exhaust process memory. * When a remote URL is given, the file is uploaded over HTTP(S) or FTP using the optional credentials, HTTP * method, headers, multipart field name, and extra form fields. * * @param remotePath The path to the remote location where the resulting video should be uploaded. * Supported protocols: `http/https`, `ftp`. * If `remotePath` is empty, the result is returned as Base64. * @param user The remote authentication username. * @param pass The remote authentication password. * @param method The multipart upload method (defaults to `PUT`). * @param headers Additional headers mapping for multipart HTTP(S) uploads. * @param fileFieldName The name of the form field holding the uploaded file content. * @param formFields Additional form fields for multipart HTTP(S) uploads. * * @throws If the recording cannot be read, the upload fails, or recording is unsupported. */ export declare function windowsStopRecordingScreen(this: WindowsDriver, remotePath?: string, user?: string, pass?: string, method?: string, headers?: Record, fileFieldName?: string, formFields?: Array> | [string, string][]): Promise; /** * W3C-style entry point for starting a screen recording; delegates to {@link windowsStartRecordingScreen}. * * @param options - Recording options (same fields as the positional `windowsStartRecordingScreen` API). * @throws If recording cannot be started or is unsupported on this host. */ export declare function startRecordingScreen(this: WindowsDriver, options?: StartRecordingOptions): Promise; /** * W3C-style entry point for stopping a screen recording; delegates to {@link windowsStopRecordingScreen}. * * @param options - Upload and auth options (same fields as the positional `windowsStopRecordingScreen` API). * @throws If the recording cannot be read, the upload fails, or recording is unsupported. */ export declare function stopRecordingScreen(this: WindowsDriver, options?: StopRecordingOptions): Promise; export {}; //# sourceMappingURL=record-screen.d.ts.map