Get Screenshot
Get real-time screenshot of specified device, supports various image formats and quality settings.
Interface Description
Interface Type
getScreenShotParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| deviceId | string | Yes | Device ID |
| quality | number | No | Image quality (0-1), default 0.8 |
| scale | number | No | Scale ratio (0-1), default 1.0 |
| format | string | No | Return 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);