Audience engagement
Ask the room and see the answers land on your slide. astro-slides bundles the audience layer most deck tools outsource to Slido or Mentimeter: polls voted from phones, moderated Q&A, and emoji reactions — all riding the same sync gateway as the phone remote.
The audience joins by QR
Section titled “The audience joins by QR”Run your deck with the gateway and the terminal prints two QR codes — the presenter remote and the audience page:
astro-slides dev --remote # open on the LANastro-slides dev --remote=hunter2 # token-protected URLsSpectators scan the Audience code onto /audience: a mobile page with the active
poll, a question box, and a reaction bar. Audience connections are scoped
server-side — the gateway only relays vote, qa/ask, and react from them, so
a modified page still can’t navigate your deck or draw on it.
Declare a poll in MDX; options live in your source, votes live in the room:
<Poll id="warmup" question="How are you presenting today?" options={["Keynote/PowerPoint", "A web framework", "PDF and prayers"]}/>- When the poll’s slide is present, it opens for the audience automatically; their phones show the question and options.
- Votes tally live as bars on the slide. One vote per device (anonymous stable client id), revisable until you press Close voting on the slide.
- Results persist across refreshes — like drawings, they save under
.astro-slides/engagement/while the gateway runs. - Give each poll a stable
id; votes are keyed by it.
The audience types questions on their phones; they appear in your presenter view
(P) in a moderation panel:
- Show puts the question on the audience-facing deck window as a banner (at most one at a time — showing another demotes the first).
- Hide returns it to the queue; Dismiss removes it.
Reactions
Section titled “Reactions”Six emoji on the audience page float up the deck when tapped. Rate-limited on the phone and sprite-capped on the deck, so an enthusiastic room stays legible. Inert in embeds, previews, and print.
Example
Section titled “Example”examples/audience-engagement
is a runnable four-slide deck exercising all three features:
astro-slides dev examples/audience-engagement --remoteSource
Section titled “Source”packages/client/components/Poll.astro— the<Poll>componentpackages/client/src/engagement/— tallies, reactions overlay, Q&A banner, persistencepackages/client/src/sync/types.ts— poll/question state + actions inSharedStatepackages/core/src/server/audience-page.ts— the/audiencemobile pagepackages/core/src/server/engagement.ts— audience-role scoping + persistencedocs/built/19-audience-engagement.md— the phase write-up