Messaging between a player and its replay frame.
Each player opens a private channel with an unguessable name and passes it to its frame, so viewers of the same recording never drive each other's frames. When the frame connects it announces itself and the player answers with the current position, preceded by the recording itself for a live session, which the frame does not read from the buffer.
Summary
Functions
Tells the player that its frame connected.
Hands the frame a live session's redacted recording.
Generates a new channel name.
Tells the frame to show the event at index.
Subscribes the caller to channel.
Tells the player which assigns the frame's template reads that the
recording lacks at the moment shown, which it rendered as nil.
Types
@type channel() :: String.t()
Functions
@spec frame_ready(channel()) :: :ok
Tells the player that its frame connected.
@spec load(channel(), PhoenixReplay.Recording.t()) :: :ok
Hands the frame a live session's redacted recording.
@spec new() :: channel()
Generates a new channel name.
@spec seek(channel(), non_neg_integer()) :: :ok
Tells the frame to show the event at index.
Subscribes the caller to channel.
Tells the player which assigns the frame's template reads that the
recording lacks at the moment shown, which it rendered as nil.