Presentation and Receiver

The Presentation and Receiver components enable you to display web content on secondary screens (external displays, TVs, projectors, or wireless displays) using the Presentation API. The Presentation controller manages the connection from the primary device, while the Receiver controller handles incoming connections on the secondary display. Together, they enable multi-screen experiences for presentations, digital signage, gaming, and collaborative applications.

This component pair is particularly useful for:

  • Delivering presentations on external displays or projectors

  • Creating second-screen experiences for entertainment applications

  • Building digital signage solutions

  • Implementing collaborative whiteboarding and meeting tools

  • Developing multi-display gaming experiences

  • Showing media content on TVs via Chromecast or similar devices

  • Creating kiosk applications with separate control and display screens

  • Building remote display and monitoring dashboards

Browser Support

The Presentation API has limited but growing support, primarily in Chromium-based browsers.

Support level: Limited - Supported in Chrome and Edge on desktop and Android. Requires compatible hardware (Chromecast, wireless displays, or other secondary screens). Not supported in Safari or Firefox as of early 2025.

circle-exclamation
circle-info

Always check for presentation availability before offering this functionality to users. The Presentation controller emits an availability-changed event you can use to show/hide presentation controls.

Architecture

The Presentation API works with two parts:

  1. Presentation Controller (Primary Device): Runs on the user's main device (phone, laptop). Initiates and controls the presentation.

  2. Receiver (Secondary Display): Runs on the secondary screen. Receives and displays content.

Communication flows bidirectionally between controller and receiver through message passing.

Usage

Presentation Controller (Primary Device)

The presentation controller runs on the device that initiates the presentation.

Basic Presentation Setup

Sending Messages to Receiver

Reconnecting to Existing Presentation

Receiver (Secondary Display)

The receiver runs on the secondary display and handles incoming messages.

Basic Receiver Setup

Two-Way Communication

Best Practices

Check Availability First

circle-check

Handle Reconnection Gracefully

circle-info

Connection IDs are persisted in localStorage. Implement reconnection logic to allow users to resume presentations after page refreshes.

Design for Large Screens

circle-check

Keep Controller and Receiver in Sync

circle-exclamation

Error Handling

Common Use Cases

1. Slide Presentation System

2. Digital Signage

3. Multi-Display Gaming

4. Collaborative Whiteboard

API Reference

Presentation Controller

Values

urls

Type: Array Required: Yes

Array of URLs that can be presented on the secondary display. Typically contains a single URL pointing to your receiver page.

Actions

start()

Initiates a new presentation. Opens a browser dialog for the user to select a display.

Returns: Promise<void>

reconnect()

Attempts to reconnect to an existing presentation using the stored connection ID from localStorage.

Returns: Promise<void>

send(params)

Sends a message to the receiver.

Parameters:

  • params.params (object): Data to send (will be JSON stringified)

terminate()

Closes the presentation connection.

Events

availability-changed

Fired when presentation display availability changes or on initial connection.

Event detail:

  • availability.value (boolean): Whether presentation displays are available

started

Fired when a presentation connection is successfully established.

Event detail:

  • id (string): Connection ID

terminated

Fired when the presentation connection is closed.

Event detail:

  • id (string): Connection ID that was terminated

Receiver

Values

None

Actions

None (receiver is passive - it only listens for events)

Events

message

Fired when a message is received from the controller.

Event detail:

  • data (object): Parsed JSON data from controller

close

Fired when the connection is closed.

Event detail:

  • connectionId (string): Connection ID

  • reason (string): Close reason

  • message (string): Close message

  • Service Worker - May be used for offline receiver pages

  • Fullscreen - Often used together for immersive presentation experiences

  • Wake Lock - Keep screen on during presentations

Resources

Last updated

Was this helpful?