Extreme Screencast API
Extreme Screencast uses WebSocket as an API to provide interface capabilities ( only available after logging in to an account, not available to free users )
WebSocket API is a common and universal http protocol API interface that supports calls from various languages, such as: Keyboard Wizard, Easy Language, C++, Python, Html, Vue, Node.js, etc. . .
  • Extreme Screencast WebSocket API address: ws://127.0.0.1:33332
  • WebSocket online test: https://wstool.js.org/
  • Html demo :https://drive.google.com/file/d/1p1WUy7iI2LNRvwm9nQefcowmE9XgMXPp/view?usp=sharing

Get all device information

ask:
{ "action":"list" }
response:
{ "StatusCode": 200, "result": [ { "deviceId": "ga7d65ylnj6xinhm", "name": "ga7d65ylnj6xinhm", "no": 1 }, { "deviceId": "VBJDU18B14001987", "name": "VBJDU18B14001987", "no": 24 } ] }

screenshot

ask:
{ "action": "screen", "comm": { "deviceIds": "all", "savePath": "d:/quickmirror", "onlyDeviceName": 1 } }
  • deviceIds: "all" means all devices, or you can specify devices by passing comma-separated deviceIds, such as "ga7d65ylnj6xinhm,VBJDU18B14001987"
  • onlyDeviceName: Whether to use the device serial number as the screenshot file name directly
    • 1 means the screenshot file name only contains the device serial number (e.g. ga7d65ylnj6xinhm.png )
    • 0 means the screenshot file name includes the device serial number and the screenshot time (for example, 1_ga7d65ylnj6xinhm_20240707_114500_096.png )
  • Note: If it is a wireless connection, the : and . in the device serial number will be replaced by _ (for example, the screenshot file name of device 192.168.2.109:5555 is 1_192_168_2_109_5555_20240707_114919_656.png )
 
 
response:
{ "StatusCode": 200, "result": "OK" }

Screen Controls

ask:
{ "action": "PointerEvent", "comm": { "deviceIds": "all", "mask": "0", "x": "0.5", "y": "0.5", "endx": "0", "endy": "0", "delta": "0" } }
  • deviceIds: "all" means all devices, or you can specify devices by passing comma-separated deviceIds, such as "ga7d65ylnj6xinhm,VBJDU18B14001987"
  • mask: Event type: 0 pressed, 1 moved, 2 released, 3 right mouse button (return), 4 wheel up, 5 wheel down, 6 swipe up, 7 swipe down, 8 swipe left, 9 swipe right
  • x,y: event coordinates, percentage, range is 0-1
  • endx, endy: end coordinates. These two parameters are only required for up, down, left, and right sliding events. Other events do not need to pass them.
  • delta: The amplitude of the scroll wheel event. The range is an integer greater than 0. The larger the value, the greater the scroll wheel amplitude. This parameter is only required for scroll wheel events, and other events do not need to pass it.
response:
{ "StatusCode": 200, "result": "OK" }
Example:
Swipe up
//先执行按下mask=0 x=0.5 y=0.5 从中间位置开始{ "action": "PointerEvent", "comm": { "deviceIds": "all", "mask": "0", "x": "0.5", "y": "0.5", "endx": "0", "endy": "0", "delta": "0" } } //执行移动mask=1 y移动到0.2位置松开前可执行多个移动就会变成拖动{ "action": "PointerEvent", "comm": { "deviceIds": "all", "mask": "1", "x": "0.5", "y": "0.2", "endx": "0", "endy": "0", "delta": "0" } } //最后松开mask=2 xy 传最后移动到的位置{ "action": "PointerEvent", "comm": { "deviceIds": "all", "mask": "2", "x": "0.5", "y": "0.2", "endx": "0", "endy": "0", "delta": "0" } }

Get the clipboard content

ask:
{ "action": "getclipboard", "comm": { "deviceIds": "8318fc66" } }
  • deviceIds: This command does not support multiple mobile deviceIds
 
response:
{ "StatusCode": 200, "result": "剪切板测试" }

Send to Clipboard

ask:
{ "action": "writeclipboard", "comm": { "deviceIds": "all", "content": "Hi,QuickMirror" } }
  • deviceIds: "all" means all devices, or you can specify devices by passing comma-separated deviceIds, such as "ga7d65ylnj6xinhm,VBJDU18B14001987"
 
response:
{ "StatusCode": 200, "result": "OK" }

Execute ADB Command

ask:
{ "action": "adb", "comm": { "command": "am start -a android.intent.action.VIEW -d https://blog.csdn.net/rankun1/article/details/87970523", "deviceIds": "ga7d65ylnj6xinhm" } }
  • deviceIds: "all" means all devices, or you can specify devices by passing comma-separated deviceIds, such as "ga7d65ylnj6xinhm,VBJDU18B14001987"
 
response:
{ "StatusCode": 200, "result": { "ga7d65ylnj6xinhm": [ "Starting: Intent { act=android.intent.action.VIEW dat=https://www.aa.app/... }" ] } }