Skip to main content

Module frames

Module frames 

Source
Available on crate feature browser only.
Expand description

A live frame feed from a browser session: a screenshot on an interval, latest frame wins.

BrowserSession::frames starts a feed that a console can relay to a person watching the agent work, for example as server-sent events. It uses only WebDriver screenshots: no remote desktop, no extra port and nothing the page can reach, so it works from a sealed browser too.

BehaviourWhy
Captures only while the session runs; never starts oneWatching must not launch a browser or keep one alive
Skips a frame identical to the last one publishedA still page costs nothing after its first frame
Skips ticks missed while a screenshot is in flightA slow page lowers the frame rate instead of queueing
Keeps only the latest frameA slow viewer sees the current page, not a backlog
Holds the session weaklyThe feed ends when the session is dropped, and never keeps it alive

Structs§

Frame
One frame of a session’s page.
FrameFeed
A running frame feed from a BrowserSession, made by BrowserSession::frames.

Constants§

MIN_FRAME_INTERVAL
The shortest interval BrowserSession::frames accepts; a shorter one is raised to it.