pub fn screen_capture(out: &mut [u8]) -> Result<usize, i32>Expand description
Captures the primary display as RGBA8. Gated by an in-browser permission prompt on first use per origin (the OS may prompt separately for screen recording).
Returns Ok(bytes_written) or an error code: -1 user blocked, -2 no display,
-3 capture failed, -4 buffer error, PERMISSION_PENDING while the prompt is showing
(retry next frame).