()
| 1323 | } |
| 1324 | |
| 1325 | async stopCapture(): Promise<void> { |
| 1326 | if (!isTauri()) { |
| 1327 | throw new Error('Screen capture only available in Tauri'); |
| 1328 | } |
| 1329 | |
| 1330 | try { |
| 1331 | if (isDesktop()) { |
| 1332 | await invoke('sc_stop_capture'); |
| 1333 | } else { |
| 1334 | await invoke('plugin:screen-capture|stop_capture_cmd'); |
| 1335 | } |
| 1336 | this.capturing = false; |
| 1337 | } catch (error) { |
| 1338 | throw error; |
| 1339 | } |
| 1340 | } |
| 1341 | |
| 1342 | /** |
| 1343 | * Stop only video capture. |
no test coverage detected