# `PhoenixReplay.Web.Player.Channel`
[🔗](https://github.com/elixir-vibe/phoenix_replay/blob/v0.6.2/lib/phoenix_replay/web/player/channel.ex#L1)

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.

# `channel`

```elixir
@type channel() :: String.t()
```

# `frame_ready`

```elixir
@spec frame_ready(channel()) :: :ok
```

Tells the player that its frame connected.

# `load`

```elixir
@spec load(channel(), PhoenixReplay.Recording.t()) :: :ok
```

Hands the frame a live session's redacted recording.

# `new`

```elixir
@spec new() :: channel()
```

Generates a new channel name.

# `seek`

```elixir
@spec seek(channel(), non_neg_integer()) :: :ok
```

Tells the frame to show the event at `index`.

# `subscribe`

```elixir
@spec subscribe(channel()) :: :ok | {:error, term()}
```

Subscribes the caller to `channel`.

# `unrecorded`

```elixir
@spec unrecorded(channel(), [atom()]) :: :ok
```

Tells the player which assigns the frame's template reads that the
recording lacks at the moment shown, which it rendered as `nil`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
