pub struct RecFrame {
pub png: Vec<u8>,
pub cx: f64,
pub cy: f64,
pub click: f32,
pub dt_ms: u32,
}Expand description
One recorded frame streamed from the engine during automation.
record_begin sets up a channel; the backend then captures a frame
at each input step (mouse move, keystroke, click settle) and sends
it here without releasing the main thread. cx/cy are the cursor
position in frame pixels (already scaled to the recorded frame’s
resolution) so the recorder can composite a pointer, and click is
a ripple phase (1.0 at press, decaying to 0.0; 0.0 = no ripple).
This is what lets a recording show real, continuous mouse motion
instead of a before/after slideshow: the frames are grabbed inside
the move loop, not by a poller that is blocked behind it.
Fields§
§png: Vec<u8>§cx: f64§cy: f64§click: f32§dt_ms: u32Intended elapsed time (ms) this frame represents on the input
path, independent of how long the synchronous capture actually
took. The recorder advances its media clock by this so motion
plays at natural speed even though each snapshot inflates the real
wall-clock of the move. 0 = use real elapsed time (idle frames).