/** * @file * * Photographs the DEVICE, not the web page. * * `captureObsidianScreenshot` goes through Appium in the WebView context, so on * Android it captures the page: no status bar, and — the reason this exists — * no soft keyboard, because the IME is a system window and not part of the * page. A frame that is meant to show what a phone looks like therefore cannot * be taken that way. * * `adb exec-out screencap -p` reads the framebuffer instead, which is the same * route the trusted-input passes already use. The trade is deliberate and worth * writing down at every call site: a device capture carries the status-bar clock * and battery, so it is **not byte-reproducible** the way a page capture is. * Reach for this only for the shots that need the keyboard; leave the rest on * `captureObsidianScreenshot`. */ /** * Parameters for {@link captureDeviceScreenshot}. */ export interface CaptureDeviceScreenshotParams { /** * The device to photograph. */ readonly deviceId: string; } /** * Captures the device's framebuffer as a PNG. * * @param params - The device to photograph. * @returns A {@link Promise} that resolves to the raw PNG bytes. * @throws Error if what came back is not a PNG — which is what a truncated or text-decoded capture looks * like, and is far cheaper to catch here than in an image diff. */ export declare function captureDeviceScreenshot(params: CaptureDeviceScreenshotParams): Promise;