Presentation API
Lets a page show itself on a second screen such as a Chromecast.
In one line
Can show itself on a second screen you choose, like a Chromecast
Lets a page show itself on a second screen such as a Chromecast.
Sees which nearby display receivers exist only after the person picks one; lets a page cast to TVs.
What it can and can't do
What the user does: You tap Cast and pick a screen from the list.
It can
- List nearby screens you can show the page on
- Show a page or video on the screen you pick
- Send messages to the second screen while it runs
It cannot
- Pick a screen without you choosing
- Cast on Firefox, Safari or iPhone
- See other devices on your network beyond the list
- Cast after you close the page
How it differs between platforms: Chrome and Edge support it. Firefox and Safari, including iPhone, do not.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 47 | 2015-12-01 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Not supported | Not available | Not listed | None |
| Safari | Not supported | Not available | Not listed | None |
| Safari on iPhone | Not supported | Not available | Not listed | None |
| Chrome on Android | Supported | 47 | 2015-12-02 | None |
| Samsung Internet | Supported | 5.0 | 2016-12-15 | None |
How a site asks for it
| API | new PresentationRequest(urls).start(), PresentationConnection.send(), navigator.presentation.defaultRequest |
| Browser compat keys | api.PresentationRequest |
| How access is granted | picker |
| What the user sees | Cast device chooser |
| Needs a secure context (HTTPS) | Yes |
| Needs a user gesture | Yes |
| How long it lasts | Per origin |
| How to take it back | Site settings |
| Inside an iframe | Same as top level; cross-origin iframes need a permissions policy where listed |
Typical flow
- Call the API
- Browser applies its access rules
- Page receives the result
Data you get
What comes back: Lets a page show itself on a second screen such as a Chromecast.
Shape: object
How often: on demand
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
connection.state | enum | None | connecting, connected, closed, terminated | Not listed |
PresentationAvailability.value | boolean | None | true or false | Not listed |
Technical limits
- No device list without a picker click
- No Firefox, Safari or iOS
- Needs same network receivers
The story
What it is
A page can send itself to a second screen, like a Chromecast.
For you
You tap a Cast button, pick a screen from a list and the page shows up on the TV. Your phone becomes the remote.
For makers
Makers can build second screen experiences, like slides or games that use a TV and a phone as a controller. It brings big screen use to the web.
Where you see it
| Type | Example | Apps |
|---|---|---|
| productivity | You present slides on a TV while your phone shows speaker notes. | Google Slides |
| games | A party game shows the board on the TV and uses phones as controllers. | Jackbox |
| media | A music site shows lyrics on a big screen. | None named |
| education | A teacher casts a quiz to the classroom projector. | Kahoot |
| live | A fitness class page shows the workout on the TV and heart rate on the phone. | None named |
| smart-home | A dashboard page appears on a kitchen display. | None named |
Risks
- Casting to wrong screen
- Shared with nearby devices
What the platform says
- Mozilla: Presentation API. MDN says it lets a page show content on a second screen like a TV or projector.
Good uses and abuse
Legitimate uses
- Slide decks on TV
- Digital signage
Known abuse
- None notable
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 2 of 5 | How useful it is to honest apps |
| Friction | 2 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2016, Chrome 47: Presentation API ships
Sources
How well checked: Checked against real behavior.