Open chongqiangchen opened 1 year ago
I think it's a permission issue. When you don't grant screen recording permission on Mac OS, it behaves as you described, only the current application and desktop background are captured, and even desktop files are not displayed.
I think it's a permission issue. When you don't grant screen recording permission on Mac OS, it behaves as you described, only the current application and desktop background are captured, and even desktop files are not displayed.
my guess is that it's also a permission issue, but it's just occasionally normal and occasionally abnormal during the development phase, which makes me a little confused.
Hey 👋 Which rust crate are you using to take screenshots here?
Hey 👋 Which rust crate are you using to take screenshots here? use std::process::Command;
fn capture_screen() -> Result<PathBuf, Box
Command::new("screencapture")
.arg("-i")
.arg(screenshot_path.to_str().unwrap())
.output()?;
Ok(screenshot_path)
}
I used it directly like this, do you have any other recommendations?
Ah alright. Then it really should be a permission issue as @IvanLi-CN said. Looks like there's a (user-side) setting in System Preferences -> Security & Privacy -> Privacy -> Screen Recording
, source: https://discussions.apple.com/thread/251116945
Describe the bug
Why can I only capture the desktop but not the contents of other windows when I use "let screenshot_path = capture_screen().unwrap();" in Tauri? Do I need to open any specific permissions?
Reproduction
No response
Expected behavior
No response
Platform and versions
Stack trace
No response
Additional context
No response