Skip to content
ConsoleMonster

API Reference

Class

Recording

Namespace ConsoleMonster.Export
Assembly ConsoleMonster
Modifiers static

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

Export 2 overloads
public static String Export(IWidget root, TextReader jsonLines, ExportFormat format, RecordingExportOptions? options = null) #
Returns: String

Exports a recording in a format.

Parameters

root ConsoleMonster.Layout.IWidget requiredposition: 0
The widget tree the recording was made with.
jsonLines System.IO.TextReader requiredposition: 1
The recording.
format ConsoleMonster.Export.ExportFormat requiredposition: 2
Html, Svg or Asciicast.
options ConsoleMonster.Export.RecordingExportOptions? = null optionalposition: 3
The options.

Returns

The exported document.

public static String Export(IWidget root, IEnumerable<LiveEvent> events, ExportFormat format, RecordingExportOptions? options = null) #
Returns: String

Exports recorded events in a format.

Parameters

root ConsoleMonster.Layout.IWidget requiredposition: 0
The widget tree the events address.
events System.Collections.Generic.IEnumerable<ConsoleMonster.Live.LiveEvent> requiredposition: 1
The events, in order, with their times.
format ConsoleMonster.Export.ExportFormat requiredposition: 2
Html, Svg or Asciicast.
options ConsoleMonster.Export.RecordingExportOptions? = null optionalposition: 3
The options.

Returns

The exported document.

public static String ExportAsciicast(IWidget root, TextReader jsonLines, RecordingExportOptions? options = null) #
Returns: String

Exports a recording as asciicast v3.

Parameters

root ConsoleMonster.Layout.IWidget requiredposition: 0
The widget tree the recording was made with.
jsonLines System.IO.TextReader requiredposition: 1
The recording.
options ConsoleMonster.Export.RecordingExportOptions? = null optionalposition: 2
Size, frame rate and theme.

Returns

The asciicast lines.

public static String ExportHtml(IWidget root, TextReader jsonLines, RecordingExportOptions? options = null) #
Returns: String

Exports a recording as an HTML player.

Parameters

root ConsoleMonster.Layout.IWidget requiredposition: 0
The widget tree the recording was made with.
jsonLines System.IO.TextReader requiredposition: 1
The recording.
options ConsoleMonster.Export.RecordingExportOptions? = null optionalposition: 2
Size, frame rate, theme and window frame.

Returns

The HTML.

ExportPlayerData 2 overloads
public static String ExportPlayerData(IWidget root, TextReader jsonLines, RecordingExportOptions? options = null) #
Returns: String

Exports 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 requiredposition: 0
The widget tree the recording was made with.
jsonLines System.IO.TextReader requiredposition: 1
The recording.
options ConsoleMonster.Export.RecordingExportOptions? = null optionalposition: 2
Size, frame rate, theme and window frame.

Returns

The JSON.

public static String ExportPlayerData(IWidget root, IEnumerable<LiveEvent> events, RecordingExportOptions? options = null) #
Returns: String

Exports recorded events as player data (JSON); see Recording.ExportPlayerData.

Parameters

root ConsoleMonster.Layout.IWidget requiredposition: 0
The widget tree the events address.
events System.Collections.Generic.IEnumerable<ConsoleMonster.Live.LiveEvent> requiredposition: 1
The events, in order, with their times.
options ConsoleMonster.Export.RecordingExportOptions? = null optionalposition: 2
Size, frame rate, theme and window frame.

Returns

The JSON.

public static String ExportSvg(IWidget root, TextReader jsonLines, RecordingExportOptions? options = null) #
Returns: String

Exports a recording as an animated SVG.

Parameters

root ConsoleMonster.Layout.IWidget requiredposition: 0
The widget tree the recording was made with.
jsonLines System.IO.TextReader requiredposition: 1
The recording.
options ConsoleMonster.Export.RecordingExportOptions? = null optionalposition: 2
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) #
Returns: Void

Exports a recording file to another file (UTF-8 without a byte order mark).

Parameters

root ConsoleMonster.Layout.IWidget requiredposition: 0
The widget tree the recording was made with.
recordingPath System.String requiredposition: 1
The .jsonl recording.
outputPath System.String requiredposition: 2
The output file.
format ConsoleMonster.Export.ExportFormat? = null optionalposition: 3
The format; null picks it from the output extension (.html, .svg, .cast; .json writes player data).
options ConsoleMonster.Export.RecordingExportOptions? = null optionalposition: 4
The options.