navigator.presentation returns a Presentation object — the entry point for presenting web content on another screen. Learn feature detection, MDN’s receiver vs idle check, defaultRequest, secure contexts, five examples, and try-it labs.
01
Kind
Read-only property
02
Returns
Presentation
03
Status
Experimental
04
Context
Secure (HTTPS)
05
Roles
Controller / receiver
06
Best first step
Feature detect
Fundamentals
Introduction
The Presentation API lets a page act as a controller (start or reconnect a presentation) or as a receiver (the page shown on the other display). navigator.presentation is how you reach that API from JavaScript.
MDN notes that today the property is especially useful for feature checking, and on a receiving user agent for accessing PresentationReceiver via navigator.presentation.receiver.
💡
Two contexts, one entry point
A controlling page may set defaultRequest. A receiving page reads receiver. Most everyday tabs are idle controllers with no active receiver.
Concept
Understanding the presentation Property
Reading navigator.presentation does not start casting by itself. It returns a Presentation object with role-specific fields:
receiver — PresentationReceiver in a receiving context; otherwise typically falsy.
defaultRequest — optional PresentationRequest for browser-chrome-initiated presentation in a controlling context.
Read-only entry point — you do not assign to navigator.presentation.
Secure context — HTTPS / localhost where supported.
Experimental — not Baseline; support is limited.
Foundation
📝 Syntax
General form of the property:
JavaScript
navigator.presentation
Value
A reference to a Presentation object.
Common patterns
JavaScript
// MDN-style feature check + receiver hint:
if ("presentation" in navigator) {
const status = navigator.presentation.receiver
? "Receiving presentation"
: "(idle)";
console.log(status);
} else {
console.error("Presentation API is not available in this browser.");
}
// Controlling pages may later set:
// navigator.presentation.defaultRequest = new PresentationRequest(urls);
Cheat Sheet
⚡ Quick Reference
Goal
Code
Get Presentation object
navigator.presentation
Feature detect
"presentation" in navigator
Receiving?
!!navigator.presentation.receiver
Default request
navigator.presentation.defaultRequest
Secure context?
window.isSecureContext
Writable?
No (read-only property)
Status (MDN)
Experimental / limited availability
Snapshot
🔍 At a Glance
Four facts to remember about navigator.presentation.
Returns
Presentation
API entry point
Status
experimental
Not Baseline
HTTPS
required
Secure context
Best first use
detect
Then branch UX
Compare
📋 Controller vs Receiver
Controlling context
Receiving context
Role
Starts / reconnects a presentation
Shows content on the other screen
receiver
Typically falsy / null
PresentationReceiver
defaultRequest
May hold a PresentationRequest
Must be null
Everyday tab?
Usually yes (idle)
Only while presenting
MDN status text
(idle) when no receiver
Receiving presentation
Hands-On
Examples Gallery
Examples follow MDN navigator.presentation patterns. Prefer Try It Yourself. Many browsers still omit the API.
📚 Getting Started
Detect the API and apply MDN’s receiver status check.
Example 1 — Feature Detection
Check whether presentation exists before using it.
presentation missing
(or "available" in a supporting browser / context)
How It Works
MDN treats this check as the practical first step before any casting UI.
Example 2 — MDN Receiver vs Idle Status
Show whether this browsing context is receiving a presentation.
JavaScript
if ("presentation" in navigator) {
const status = navigator.presentation.receiver
? "Receiving presentation"
: "(idle)";
console.log(status);
} else {
console.error("Presentation API is not available in this browser.");
}
navigator.presentation belongs to the experimental Presentation API and is not Baseline. Support is limited. Always feature-detect, use HTTPS, and keep a single-screen fallback.
✓ Experimental · Not Baseline
Navigator.presentation
Safe to explore for learning cast / secondary-display flows. Do not require it for core app functionality.
LimitedExperimental
Google ChromePartial / evolving Presentation API support
Limited
Microsoft EdgeFollow Chromium Presentation API status
Limited
OperaFollow Chromium Presentation API status
Limited
Mozilla FirefoxTypically unavailable for this API path
Unavailable
Apple SafariTypically unavailable for this API path
Unavailable
Internet ExplorerNo Presentation API support
Unavailable
presentationLimited
Bottom line: Detect navigator.presentation, check receiver vs idle, and hide casting UI when the API is missing.
Wrap Up
Conclusion
navigator.presentation is the experimental entry point to the Presentation API. Feature-detect it, use MDN’s receiver vs idle check, remember HTTPS, and keep casting as an optional enhancement.
Experimental Presentation entry point — detect, then enhance.
5
Core concepts
📺01
Returns
Presentation
Type
🔍02
Detect
"presentation" in navigator
Safe
⚗️03
Status
experimental
Caution
🔒04
HTTPS
secure context
Security
🎦05
Roles
idle / receiving
UX
❓ Frequently Asked Questions
It is a read-only Navigator property that returns a Presentation object — the entry point to the Presentation API for controlling or receiving presentations on secondary displays.
The Presentation API / Presentation interface is experimental and not Baseline. MDN marks navigator.presentation as limited availability. Always feature-detect and keep a non-presentation fallback UX.
Yes in supporting browsers: it is available only in secure contexts (HTTPS or localhost).
On a receiving browsing context, navigator.presentation.receiver returns a PresentationReceiver. On a normal controlling page it is typically null / falsy — MDN’s example shows “Receiving presentation” vs “(idle)”.
In a controlling context you can set navigator.presentation.defaultRequest to a PresentationRequest so the browser can use it for chrome-initiated casting. In a receiving context it is null.
No. The property is read-only. You use fields on the returned Presentation object (such as defaultRequest and receiver).
Did you know?
Setting navigator.presentation.defaultRequest does not by itself cast your page. It tells a supporting controlling browser which PresentationRequest to use if the user starts presentation from browser chrome (for example a cast menu).