import { Mutex } from 'async-mutex'; import { FfmpegCommand } from 'fluent-ffmpeg'; import { EventEmitter } from 'node:events'; import type { Page as PuppeteerPage } from 'puppeteer-core'; import { PassThrough, Writable } from 'stream'; import { PuppeteerCapture } from './PuppeteerCapture'; import { PuppeteerCaptureEvents } from './PuppeteerCaptureEvents'; import { PuppeteerCaptureOptions } from './PuppeteerCaptureOptions'; import { PuppeteerCaptureStartOptions } from './PuppeteerCaptureStartOptions'; export declare abstract class PuppeteerCaptureBase extends EventEmitter implements PuppeteerCapture { static readonly DEFAULT_OPTIONS: PuppeteerCaptureOptions; static readonly DEFAULT_START_OPTIONS: PuppeteerCaptureStartOptions; protected readonly _options: PuppeteerCaptureOptions; protected readonly _frameInterval: number; protected readonly _onPageClose: () => void; protected readonly _startStopMutex: Mutex; protected _page: PuppeteerPage | null; protected _target: string | Writable | null; protected _frameBeingCaptured: Promise | null; protected _captureTimestamp: number; protected _capturedFrames: number; protected _dropCapturedFrames: boolean; protected _recordedFrames: number; protected _error: any | null; protected _framesStream: PassThrough | null; protected _ffmpegStream: FfmpegCommand | null; protected _ffmpegStarted: Promise | null; protected _ffmpegExited: Promise | null; protected _ffmpegExitedResolve: (() => void) | null; protected _isCapturing: boolean; constructor(options?: PuppeteerCaptureOptions); get page(): PuppeteerPage | null; get isCapturing(): boolean; get captureTimestamp(): number; get capturedFrames(): number; get dropCapturedFrames(): boolean; set dropCapturedFrames(dropCapturedFrames: boolean); get recordedFrames(): number; attach(page: PuppeteerPage): Promise; protected _attach(page: PuppeteerPage): Promise; detach(): Promise; protected _detach(page: PuppeteerPage): Promise; start(target: string | Writable, options?: PuppeteerCaptureStartOptions): Promise; protected _start(target: string | Writable, options?: PuppeteerCaptureStartOptions): Promise; stop(): Promise; protected _stop(): Promise; waitForTimeout(milliseconds: number): Promise; emit(eventName: Event, ...args: Parameters): boolean; protected onPostCaptureStarted(): Promise; protected onPostCaptureStopped(): Promise; protected onFrameCaptured(timestamp: number, data: Buffer): Promise; protected onFrameCaptureFailed(reason?: any): Promise; protected onPageClose(): void; private static findFfmpeg; }