class

Opal::Asciicast::VCR

Inherits Reference < Object

VCR-style tactile tape deck supporting programmatic and interactive recording and playback of asciicast sessions with multi-frame pacing and overlay awareness.

Constructors

hold(seconds : Float64) : VCR
Source
instance
Source
load(path_or_content : String) : VCR
Source
pause
Source
record(path : String, width : Int32 = 80, height : Int32 = 24, title : String = "Opal Session", term : String = "xterm-256color", &) : VCR

Delegate class-level methods to the global singleton instance

Source
record(path : String, width : Int32 = 80, height : Int32 = 24, title : String = "Opal Session", term : String = "xterm-256color") : VCR
Source
resume
Source
skip_frames(count : Int32) : VCR
Source
stop
Source
type_text(text : String, cps : Float64 = 25.0) : VCR
Source
wait_frames(count : Int32 = 1, delay_per_frame : Float64 = 0.05) : VCR
Source
write_terminal(data : String, delay : Float64 = 0.0) : VCR
Source

Class methods

capture(buffer : UI::Buffer, advance : Float64 | Nil = nil) : Bool
Source
current_buffer
Source
duration
Source
goto_frame(index : Int32) : PlaybackFrame
Source
next_frame
Source
paused?
Source
play(speed : Float64 = 1.0, loop : Bool = false, &block : UI::Buffer, Int32 -> Nil) : Nil
Source
playing?
Source
prev_frame
Source
recording?
Source
render_frame(target : UI::Buffer, x : Int32 = 0, y : Int32 = 0, respect_overlays : Bool = false) : Nil
Source
rewind
Source
save(path : String | Nil = nil) : Nil
Source
screenshot(path : String | Nil = nil, format : Symbol = :ansi, buffer : UI::Buffer | Nil = nil, copy_to_clipboard : Bool = false) : String
Source
screenshot_to_clipboard(format : Symbol = :text, buffer : UI::Buffer | Nil = nil) : String
Source
seek(timestamp_seconds : Float64) : PlaybackFrame
Source
total_frames
Source

Instance methods

add_overlay(element : UI::Element, x : Int32, y : Int32, width : Int32, height : Int32) : self

Attaches a persistent overlay onto playback

Source
capture(buffer : UI::Buffer, advance : Float64 | Nil = nil) : Bool

Captures a screen buffer snapshot onto the current recording tape

Source
clear_overlays
Source
current_buffer
Source
current_frame
Source
current_frame_index
Source
current_timestamp
Source
duration
Source
elapsed
Source
frame_count
Source
goto_frame(index : Int32) : PlaybackFrame
Source
has_next?
Source
has_prev?
Source
hold(seconds : Float64) : self

Holds the current visual buffer for a specified duration in playback

Source
load(path_or_content : String) : self

Loads a recording file or raw content as a playback tape

Source
load(recording : Reader::Recording) : self

Loads an existing Reader::Recording directly

Source
next_frame
Source
pause

Pauses active recording or playback

Source
paused?
Source
play(speed : Float64 = 1.0, loop : Bool = false, &block : UI::Buffer, Int32 -> Nil) : Nil

Automated playback loop yielding each frame buffer and index

Source
player
Source
playing?
Source
prev_frame
Source
record(path : String, width : Int32 = 80, height : Int32 = 24, title : String = "Opal Session", term : String = "xterm-256color") : self

Starts recording to a destination .cast file

Source
record(path : String, width : Int32 = 80, height : Int32 = 24, title : String = "Opal Session", term : String = "xterm-256color", &) : self

Scoped block recording with automatic start, pacing, and save on exit

Source
recorder
Source
recording?
Source
render_frame(target : UI::Buffer, x : Int32 = 0, y : Int32 = 0, respect_overlays : Bool = false) : Nil

Composites current playback frame into destination buffer, respecting existing overlays if requested

Source
resume

Resumes paused recording or playback

Source
rewind
Source
save(path : String | Nil = nil) : Nil

Saves the current recording tape to disk

Source
screenshot(path : String | Nil = nil, format : Symbol = :ansi, buffer : UI::Buffer | Nil = nil, copy_to_clipboard : Bool = false) : String

Captures a screenshot from the current recording/playback state or passed buffer.

Source
screenshot_to_clipboard(format : Symbol = :text, buffer : UI::Buffer | Nil = nil) : String

Captures a screenshot and copies it directly to the system clipboard.

Source
seek(timestamp_seconds : Float64) : PlaybackFrame
Source
skip_frames(count : Int32) : self

Drops the next N frames from recording

Source
state
Source
stop

Stops recording or playback

Source
total_frames
Source
type_text(text : String, cps : Float64 = 25.0) : self

Simulates human keystroke typing directly to active recorder

Source
wait_frames(count : Int32 = 1, delay_per_frame : Float64 = 0.05) : self

Advances the recording timeline by N simulated frame durations

Source
write_terminal(data : String, delay : Float64 = 0.0) : self

Writes raw terminal output or control sequences directly to active recorder

Source

Nested types