pub struct Screencast { /* private fields */ }Expand description
Live frame-streaming entry point. Obtained from
Page::screencast.
Implementations§
Source§impl Screencast
impl Screencast
Sourcepub async fn start(&self, options: ScreencastStartOptions) -> Result<()>
pub async fn start(&self, options: ScreencastStartOptions) -> Result<()>
Sourcepub async fn stop(&self) -> Result<()>
pub async fn stop(&self) -> Result<()>
Stop the screencast. If start was called with a path, the
recorded file is written to that path before this call returns.
Sourcepub fn on_frame<F, Fut>(&self, handler: F)
pub fn on_frame<F, Fut>(&self, handler: F)
Register a handler for incoming frames. Multiple handlers may be registered; they fire in order for each frame.
Sourcepub async fn show_actions(&self, options: ShowActionsOptions) -> Result<()>
pub async fn show_actions(&self, options: ShowActionsOptions) -> Result<()>
Overlay action labels on the streamed frames as actions occur.
Pair with hide_actions to stop.
Sourcepub async fn hide_actions(&self) -> Result<()>
pub async fn hide_actions(&self) -> Result<()>
Stop overlaying action labels. No-op if not currently shown.
Sourcepub async fn show_chapter(
&self,
title: &str,
options: ChapterOptions,
) -> Result<()>
pub async fn show_chapter( &self, title: &str, options: ChapterOptions, ) -> Result<()>
Show a chapter card with the given title (and optional description). Useful for splitting a session into named phases for an agent’s video log.
Sourcepub async fn show_overlay(
&self,
html: &str,
options: ShowOverlayOptions,
) -> Result<OverlayId>
pub async fn show_overlay( &self, html: &str, options: ShowOverlayOptions, ) -> Result<OverlayId>
Render arbitrary HTML as an overlay. Returns an OverlayId
you can pass to remove_overlay to
dismiss it early; otherwise it dismisses itself after
options.duration (if set) or stays until removed.
Sourcepub async fn remove_overlay(&self, id: OverlayId) -> Result<()>
pub async fn remove_overlay(&self, id: OverlayId) -> Result<()>
Remove an overlay previously created via
show_overlay. Idempotent.
Sourcepub async fn set_overlay_visible(&self, visible: bool) -> Result<()>
pub async fn set_overlay_visible(&self, visible: bool) -> Result<()>
Toggle visibility of all currently-shown overlays without removing them. Useful for hiding overlays during a section the agent considers “noise” and re-showing them later.
Trait Implementations§
Source§impl Clone for Screencast
impl Clone for Screencast
Source§fn clone(&self) -> Screencast
fn clone(&self) -> Screencast
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more