pub async fn capture<F>(
opts: &CaptureOptions,
on_frame: F,
) -> Result<CaptureReport>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.