Skip to main content

capture

Function capture 

Source
pub async fn capture<F>(
    opts: &CaptureOptions,
    on_frame: F,
) -> Result<CaptureReport>
where F: FnMut(u64, Vec<u8>) -> Result<()>,
Expand description

Capture opts, calling on_frame(index, png) for every frame in order.

If on_frame returns an error, the capture stops and returns it. Chrome is closed in every case.