PhoenixReplay.Recording.PointerTrack (PhoenixReplay v0.6.2)

Copy Markdown View Source

The pointer track of a recording: where the pointer moved, what it pressed and how the page scrolled, on the recording's timeline.

:pointer events carry batches the browser sent; see PhoenixReplay.Capture.Pointer. split/1 takes them out of a recording, so stepping through it stays on LiveView events, and places each sample at its offset from the session's start: the batch arrived at its event's at, and its samples span the span milliseconds before that.

Summary

Functions

Whether the track holds anything to show.

A track with nothing in it.

The offset of the track's last sample, or 0 for an empty track.

How long a press's ripple lasts in the overlay, in milliseconds.

Splits a recording into the recording without its :pointer events and their track: moves, presses and scrolls as the batches held them (see PhoenixReplay.Capture.Pointer), unflattened, with each dt replaced by at, the offset from the session's start, and each list ordered by it.

How long the overlay draws the path behind the cursor, in milliseconds.

Types

t()

@type t() :: %{moves: [[integer()]], presses: [list()], scrolls: [[integer()]]}

Functions

any?(track)

@spec any?(t()) :: boolean()

Whether the track holds anything to show.

empty()

@spec empty() :: t()

A track with nothing in it.

end_at(track)

@spec end_at(t()) :: non_neg_integer()

The offset of the track's last sample, or 0 for an empty track.

ripple_ms()

@spec ripple_ms() :: pos_integer()

How long a press's ripple lasts in the overlay, in milliseconds.

split(recording)

Splits a recording into the recording without its :pointer events and their track: moves, presses and scrolls as the batches held them (see PhoenixReplay.Capture.Pointer), unflattened, with each dt replaced by at, the offset from the session's start, and each list ordered by it.

trail_ms()

@spec trail_ms() :: pos_integer()

How long the overlay draws the path behind the cursor, in milliseconds.