()
| 1345 | } |
| 1346 | |
| 1347 | async stopCapture(): Promise<void> { |
| 1348 | if (!isTauri()) { |
| 1349 | throw new Error('Screen capture only available in Tauri'); |
| 1350 | } |
| 1351 | |
| 1352 | try { |
| 1353 | if (isDesktop()) { |
| 1354 | await invoke('sc_stop_capture'); |
| 1355 | } else { |
| 1356 | await invoke('plugin:screen-capture|stop_capture_cmd'); |
| 1357 | } |
| 1358 | this.capturing = false; |
| 1359 | } catch (error) { |
| 1360 | throw error; |
| 1361 | } |
| 1362 | } |
| 1363 | |
| 1364 | /** |
| 1365 | * Stop only video capture. |
no test coverage detected