PhoenixReplay.Recording (PhoenixReplay v0.2.0)

Copy Markdown View Source

A recorded LiveView session.

Contains the initial state and a timeline of events with assigns deltas, enough to reconstruct what the user saw at any point.

Summary

Functions

Replays events up to index and returns the accumulated assigns map.

Types

event()

@type event() :: {non_neg_integer(), event_type(), map()}

event_type()

@type event_type() :: :mount | :event | :handle_params | :info | :assigns

t()

@type t() :: %PhoenixReplay.Recording{
  connected_at: integer(),
  events: [event()],
  id: binary(),
  params: map(),
  session: map(),
  url: binary() | nil,
  view: module()
}

Functions

accumulated_assigns(recording, index)

@spec accumulated_assigns(t(), non_neg_integer()) :: map()

Replays events up to index and returns the accumulated assigns map.