(
params: { simulatorUuid: string },
executor: CommandExecutor,
)
| 240 | } |
| 241 | |
| 242 | export async function stopSimulatorVideoCapture( |
| 243 | params: { simulatorUuid: string }, |
| 244 | executor: CommandExecutor, |
| 245 | ): Promise<StopVideoCaptureResult> { |
| 246 | void executor; |
| 247 | |
| 248 | const simulatorUuid = params.simulatorUuid; |
| 249 | if (!simulatorUuid) { |
| 250 | return { stopped: false, error: 'simulatorUuid is required' }; |
| 251 | } |
| 252 | |
| 253 | const result = await stopSession(simulatorUuid, { timeoutMs: 5000 }); |
| 254 | if ('error' in result) { |
| 255 | return { stopped: false, error: result.error }; |
| 256 | } |
| 257 | |
| 258 | log( |
| 259 | 'info', |
| 260 | `Stopped AXe video recording for simulator ${simulatorUuid}. ${result.parsedPath ? `Detected file: ${result.parsedPath}` : 'No file detected in output.'}`, |
| 261 | ); |
| 262 | |
| 263 | return { |
| 264 | stopped: true, |
| 265 | sessionId: result.sessionId, |
| 266 | stdout: result.stdout, |
| 267 | parsedPath: result.parsedPath, |
| 268 | }; |
| 269 | } |
| 270 | |
| 271 | export async function stopAllVideoCaptureSessions(timeoutMs = 1000): Promise<{ |
| 272 | stoppedSessionCount: number; |
nothing calls this directly
no test coverage detected