(
State(state): State<AppState>,
Path(udid): Path<String>,
)
| 2573 | } |
| 2574 | |
| 2575 | async fn refresh_stream( |
| 2576 | State(state): State<AppState>, |
| 2577 | Path(udid): Path<String>, |
| 2578 | ) -> Result<Json<Value>, AppError> { |
| 2579 | if android::is_android_id(&udid) { |
| 2580 | return Ok(json(json_value!({ "ok": true, "stream": "screenshot" }))); |
| 2581 | } |
| 2582 | let session = state.registry.get_or_create_async(&udid).await?; |
| 2583 | if let Err(error) = session.ensure_started_async().await { |
| 2584 | state.registry.remove(&udid); |
| 2585 | return Err(error); |
| 2586 | } |
| 2587 | session.request_refresh(); |
| 2588 | Ok(json(json_value!({ "ok": true }))) |
| 2589 | } |
| 2590 | |
| 2591 | async fn camera_webcams() -> Result<Json<Value>, AppError> { |
| 2592 | let webcams = task::spawn_blocking(camera::list_webcams_value) |
nothing calls this directly
no test coverage detected