Skip to main content

Screencast

Interface for capturing screencast frames from a page.


Methods

hideActions

Added in: v1.59 screencast.hideActions

Removes action decorations.

Usage

Screencast.hideActions();

Returns


hideOverlays

Added in: v1.59 screencast.hideOverlays

Hides overlays without removing them.

Usage

Screencast.hideOverlays();

Returns


showActions

Added in: v1.59 screencast.showActions

Enables visual annotations on interacted elements. Returns a disposable that stops showing actions when disposed.

Usage

Screencast.showActions();
Screencast.showActions(options);

Arguments

  • options Screencast.ShowActionsOptions (optional)
    • setDuration double (optional)#

      How long each annotation is displayed in milliseconds. Defaults to 500.

    • setFontSize int (optional)#

      Font size of the action title in pixels. Defaults to 24.

    • setPosition enum AnnotatePosition { TOP_LEFT, TOP, TOP_RIGHT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT } (optional)#

      Position of the action title overlay. Defaults to "top-right".

Returns

  • [Disposable]#

showChapter

Added in: v1.59 screencast.showChapter

Shows 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.showChapter(title);
Screencast.showChapter(title, options);

Arguments

  • title String#

    Title text displayed prominently in the overlay.

  • options Screencast.ShowChapterOptions (optional)

    • setDescription String (optional)#

      Optional description text displayed below the title.

    • setDuration double (optional)#

      Duration in milliseconds after which the overlay is automatically removed. Defaults to 2000.

Returns


showOverlay

Added in: v1.59 screencast.showOverlay

Adds 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.showOverlay(html);
Screencast.showOverlay(html, options);

Arguments

  • html String#

    HTML content for the overlay.

  • options Screencast.ShowOverlayOptions (optional)

    • setDuration double (optional)#

      Duration in milliseconds after which the overlay is automatically removed. Overlay stays until dismissed if not provided.

Returns

  • [Disposable]#

showOverlays

Added in: v1.59 screencast.showOverlays

Shows overlays.

Usage

Screencast.showOverlays();

Returns


start

Added in: v1.59 screencast.start

Starts the screencast. When setPath is provided, it saves video recording to the specified file. When setOnFrame is provided, delivers JPEG-encoded frames to the callback. Both can be used together.

Usage

Arguments

  • options Screencast.StartOptions (optional)
    • setOnFrame Consumer<ScreencastFrame> (optional)#

      • setData byte[]

        JPEG-encoded frame data.

      Callback that receives JPEG-encoded frame data.

    • setPath Path (optional)#

      Path where the video should be saved when the screencast is stopped. When provided, video recording is started.

    • setQuality int (optional)#

      The quality of the image, between 0-100.

Returns

  • [Disposable]#

stop

Added in: v1.59 screencast.stop

Stops 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