Skip to content

Get Screenshot

Get real-time screenshot of specified device, supports various image formats and quality settings.

Interface Description

Interface Type

getScreenShot

Parameters

ParameterTypeRequiredDescription
deviceIdstringYesDevice ID
qualitynumberNoImage quality (0-1), default 0.8
scalenumberNoScale ratio (0-1), default 1.0
formatstringNoReturn format: 'bmp' or default format

Return Value

Returns binary image data:

Basic Usage

javascript
// Get screenshot (default settings)
const screenshot = await apiInvoke('getScreenShot', {
    deviceId: 'P72578581E07'
});

// Save as file
const fs = require('fs');
fs.writeFileSync('screenshot.png', screenshot);

Cooperation: try.catch@foxmail.com