(
State(state): State<AppState>,
Path(udid): Path<String>,
)
| 2519 | } |
| 2520 | |
| 2521 | async fn start_screen_recording( |
| 2522 | State(state): State<AppState>, |
| 2523 | Path(udid): Path<String>, |
| 2524 | ) -> Result<Json<Value>, AppError> { |
| 2525 | if android::is_android_id(&udid) { |
| 2526 | return Err(AppError::bad_request( |
| 2527 | "Screen recording is currently supported for iOS simulators only.", |
| 2528 | )); |
| 2529 | } |
| 2530 | let recording_id = |
| 2531 | run_bridge_action(state, move |bridge| bridge.start_screen_recording(&udid)).await?; |
| 2532 | Ok(Json(json_value!({ |
| 2533 | "ok": true, |
| 2534 | "recordingId": recording_id, |
| 2535 | }))) |
| 2536 | } |
| 2537 | |
| 2538 | async fn stop_screen_recording( |
| 2539 | State(state): State<AppState>, |
nothing calls this directly
no test coverage detected