(device_name: String)
| 109 | |
| 110 | #[tauri::command] |
| 111 | fn preview_screen(device_name: String) -> String { |
| 112 | let screen = recorder::Screen::all().unwrap().into_iter() |
| 113 | .find(|screen| screen.name() == &device_name).unwrap(); |
| 114 | |
| 115 | let preview = screen.preview().unwrap(); |
| 116 | let encoded = gst::glib::base64_encode(&preview); |
| 117 | |
| 118 | encoded.to_string() |
| 119 | } |
| 120 | |
| 121 | #[tauri::command] |
| 122 | async fn start_record(selected_device: State<'_, SelectedDevice>, record_channel: State<'_, RecordChannel>) -> Result<(), ()> { |