API Reference
Recording
Exports JSON-lines recordings (written by a live session with a recorder) to an animated SVG (CSS keyframes, no script), a self-contained HTML player (play/pause, speed, scrubbing) or asciicast v3 for standard players. A recording holds updates, not pictures, so it is played into the widget tree it was recorded from (the same dashboard definition) at a fixed size and frame rate.
Inheritance
- Object
- Recording
Methods
public static String Export(IWidget root, TextReader jsonLines, ExportFormat format, RecordingExportOptions? options = null) #StringExports a recording in a format.
Parameters
- root ConsoleMonster.Layout.IWidget
- The widget tree the recording was made with.
- jsonLines System.IO.TextReader
- The recording.
- format ConsoleMonster.Export.ExportFormat
- Html, Svg or Asciicast.
- options ConsoleMonster.Export.RecordingExportOptions? = null
- The options.
Returns
The exported document.
public static String Export(IWidget root, IEnumerable<LiveEvent> events, ExportFormat format, RecordingExportOptions? options = null) #StringExports recorded events in a format.
Parameters
- root ConsoleMonster.Layout.IWidget
- The widget tree the events address.
- events System.Collections.Generic.IEnumerable<ConsoleMonster.Live.LiveEvent>
- The events, in order, with their times.
- format ConsoleMonster.Export.ExportFormat
- Html, Svg or Asciicast.
- options ConsoleMonster.Export.RecordingExportOptions? = null
- The options.
Returns
The exported document.
public static String ExportAsciicast(IWidget root, TextReader jsonLines, RecordingExportOptions? options = null) #StringExports a recording as asciicast v3.
Parameters
- root ConsoleMonster.Layout.IWidget
- The widget tree the recording was made with.
- jsonLines System.IO.TextReader
- The recording.
- options ConsoleMonster.Export.RecordingExportOptions? = null
- Size, frame rate and theme.
Returns
The asciicast lines.
public static String ExportHtml(IWidget root, TextReader jsonLines, RecordingExportOptions? options = null) #StringExports a recording as an HTML player.
Parameters
- root ConsoleMonster.Layout.IWidget
- The widget tree the recording was made with.
- jsonLines System.IO.TextReader
- The recording.
- options ConsoleMonster.Export.RecordingExportOptions? = null
- Size, frame rate, theme and window frame.
Returns
The HTML.
public static String ExportPlayerData(IWidget root, TextReader jsonLines, RecordingExportOptions? options = null) #StringExports a recording as player data (JSON) for the native player (ConsoleExporter.PlayerScript), so a site includes the script once and points any number of players at their data instead of embedding whole pages. The data holds the distinct rows as HTML, each frame as its start time and row numbers, and the screen CSS (scoped to its player by the script). It is safe to embed in a script type="application/json" element.
Parameters
- root ConsoleMonster.Layout.IWidget
- The widget tree the recording was made with.
- jsonLines System.IO.TextReader
- The recording.
- options ConsoleMonster.Export.RecordingExportOptions? = null
- Size, frame rate, theme and window frame.
Returns
The JSON.
public static String ExportPlayerData(IWidget root, IEnumerable<LiveEvent> events, RecordingExportOptions? options = null) #StringExports recorded events as player data (JSON); see Recording.ExportPlayerData.
Parameters
- root ConsoleMonster.Layout.IWidget
- The widget tree the events address.
- events System.Collections.Generic.IEnumerable<ConsoleMonster.Live.LiveEvent>
- The events, in order, with their times.
- options ConsoleMonster.Export.RecordingExportOptions? = null
- Size, frame rate, theme and window frame.
Returns
The JSON.
public static String ExportSvg(IWidget root, TextReader jsonLines, RecordingExportOptions? options = null) #StringExports a recording as an animated SVG.
Parameters
- root ConsoleMonster.Layout.IWidget
- The widget tree the recording was made with.
- jsonLines System.IO.TextReader
- The recording.
- options ConsoleMonster.Export.RecordingExportOptions? = null
- Size, frame rate, theme and window frame.
Returns
The SVG.
public static Void Save(IWidget root, String recordingPath, String outputPath, ExportFormat? format = null, RecordingExportOptions? options = null) #VoidExports a recording file to another file (UTF-8 without a byte order mark).
Parameters
- root ConsoleMonster.Layout.IWidget
- The widget tree the recording was made with.
- recordingPath System.String
- The .jsonl recording.
- outputPath System.String
- The output file.
- format ConsoleMonster.Export.ExportFormat? = null
- The format; null picks it from the output extension (.html, .svg, .cast; .json writes player data).
- options ConsoleMonster.Export.RecordingExportOptions? = null
- The options.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?