# `DemoDirector.Playback`
[🔗](https://github.com/ralmidani/demo_director/blob/v0.1.1/lib/demo_director/playback.ex#L1)

Server-side entry point for pushing playback JS to every connected
overlay.

Used by `mix demo_director.play` to broadcast a saved demo's JS
to whichever browser tab(s) currently have the overlay loaded.

# `play!`

```elixir
@spec play!(String.t()) :: :ok
```

Broadcasts the given JS string to every joined overlay.

Reads the host app's pubsub server name from
`Application.fetch_env!(:demo_director, :pubsub)`. Raises if the
pubsub server has not been configured (the install task or manual
wiring should set it).

---

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