import type { AppiumLogger } from '@appium/types';
import type { SafariDriver } from '../driver';
export interface StartRecordingOptions {
    /** Specifies the codec type: "h264" or "hevc" */
    codec?: string;
    /** Supports "internal" or "external". Default is "internal" */
    display?: string;
    /** For non-rectangular displays, handle the mask by policy:
     * - ignored: The mask is ignored and the unmasked framebuffer is saved.
     * - alpha: Not supported, but retained for compatibility; the mask is rendered black.
     * - black: The mask is rendered black.
     */
    mask?: string;
    /** The maximum recording time, in seconds. The default value is 600 seconds (10 minutes). */
    timeLimit?: string | number;
    /** Whether to ignore the call if a screen recording is currently running
     * (`false`) or to start a new recording immediately and terminate the existing one if running (`true`).
     */
    forceRestart?: boolean;
}
export interface StopRecordingOptions {
    /** The path to the remote location, where the resulting video should be uploaded.
     * The following protocols are supported: http/https, ftp.
     * Null or empty string value (the default setting) means the content of resulting
     * file should be encoded as Base64 and passed as the endpoint response value.
     * An exception will be thrown if the generated media file is too big to
     * fit into the available process memory.
     */
    remotePath?: string;
    /** The name of the user for the remote authentication. */
    user?: string;
    /** The password for the remote authentication. */
    pass?: string;
    /** The http multipart upload method name. The 'PUT' one is used by default. */
    method?: string;
    /** Additional headers mapping for multipart http(s) uploads */
    headers?: Record<string, string>;
    /** The name of the form field, where the file content BLOB should be stored for http(s) uploads */
    fileFieldName?: string;
    /** Additional form fields for multipart http(s) uploads */
    formFields?: Record<string, string> | Array<[string, string]>;
}
interface ScreenRecorderOptions {
    codec?: string;
    display?: string;
    mask?: string;
    timeLimit?: string | number;
}
export declare class ScreenRecorder {
    private log;
    private _process;
    private _udid;
    private _videoPath;
    private _codec?;
    private _display?;
    private _mask?;
    private _timeLimitMs;
    private _timer;
    constructor(udid: string, videoPath: string, log: AppiumLogger, opts?: ScreenRecorderOptions);
    get isRunning(): boolean;
    getVideoPath(): Promise<string>;
    start(): Promise<void>;
    stop(force?: boolean): Promise<string>;
    private _enforceTermination;
}
/**
 * Record the Simulator's display in background while the automated test is running.
 * This method uses `xcrun simctl io recordVideo` helper under the hood.
 * Check the output of `xcrun simctl io` command for more details.
 *
 * @param options - The available options.
 * @throws {Error} If screen recording has failed to start or is not supported for the destination device.
 */
export declare function startRecordingScreen(this: SafariDriver, options?: StartRecordingOptions): Promise<void>;
/**
 * Stop recording the screen.
 * If no screen recording has been started before then the method returns an empty string.
 *
 * @param options - The available options.
 * @returns Base64-encoded content of the recorded media file if 'remotePath'
 * parameter is falsy or an empty string.
 * @throws {Error} If there was an error while getting the name of a media file
 * or the file content cannot be uploaded to the remote location
 * or screen recording is not supported on the device under test.
 */
export declare function stopRecordingScreen(this: SafariDriver, options?: StopRecordingOptions): Promise<string>;
export {};
//# sourceMappingURL=record-screen.d.ts.map