Skip to content

ObsidianTransport.captureScreenshot method

ObsidianTransport › captureScreenshot

Captures a PNG screenshot of the running Obsidian instance.

Optional and platform-specific, like the other members here. Implemented by DesktopCdpTransport (CDP Page.captureScreenshot, optionally with the viewport pinned to an exact size) and by AppiumTransport (takeScreenshot, always the device's native framebuffer — the size knobs are ignored, so a mobile capture is sized by choosing an AVD with the wanted screen geometry).

Signature:

captureScreenshot(params: CaptureScreenshotParams): Promise<Uint8Array>

Parameters:

ParameterTypeDescription
paramsCaptureScreenshotParamsWhich window to capture, and the exact size to capture it at.

Returns: Promise<Uint8Array>A Promise that resolves to the raw PNG bytes.