Screencast
Interface for capturing screencast frames from a page.
Methods
hide_actions
Added in: v1.59Removes action decorations.
Usage
screencast.hide_actions()
Returns
hide_overlays
Added in: v1.59Hides overlays without removing them.
Usage
screencast.hide_overlays()
Returns
show_actions
Added in: v1.59Enables visual annotations on interacted elements. Returns a disposable that stops showing actions when disposed.
Usage
screencast.show_actions()
screencast.show_actions(**kwargs)
Arguments
-
How long each annotation is displayed in milliseconds. Defaults to
500. -
Font size of the action title in pixels. Defaults to
24. -
position"top-left" | "top" | "top-right" | "bottom-left" | "bottom" | "bottom-right" (optional)#Position of the action title overlay. Defaults to
"top-right".
Returns
- [Disposable]#
show_chapter
Added in: v1.59Shows a chapter overlay with a title and optional description, centered on the page with a blurred backdrop. Useful for narrating video recordings. The overlay is removed after the specified duration, or 2000ms.
Usage
screencast.show_chapter(title)
screencast.show_chapter(title, **kwargs)
Arguments
-
Title text displayed prominently in the overlay.
-
Optional description text displayed below the title.
-
Duration in milliseconds after which the overlay is automatically removed. Defaults to
2000.
Returns
show_overlay
Added in: v1.59Adds an overlay with the given HTML content. The overlay is displayed on top of the page until removed. Returns a disposable that removes the overlay when disposed.
Usage
screencast.show_overlay(html)
screencast.show_overlay(html, **kwargs)
Arguments
-
HTML content for the overlay.
-
Duration in milliseconds after which the overlay is automatically removed. Overlay stays until dismissed if not provided.
Returns
- [Disposable]#
show_overlays
Added in: v1.59Shows overlays.
Usage
screencast.show_overlays()
Returns
start
Added in: v1.59Starts the screencast. When path is provided, it saves video recording to the specified file. When on_frame is provided, delivers JPEG-encoded frames to the callback. Both can be used together.
Usage
Arguments
-
on_frameCallable[Dict]:Promise (optional)#-
databytesJPEG-encoded frame data.
Callback that receives JPEG-encoded frame data.
-
-
pathUnion[str, pathlib.Path] (optional)#Path where the video should be saved when the screencast is stopped. When provided, video recording is started.
-
The quality of the image, between 0-100.
Returns
- [Disposable]#
stop
Added in: v1.59Stops the screencast and video recording if active. If a video was being recorded, saves it to the path specified in screencast.start().
Usage
screencast.stop()
Returns