PresentationRequest
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
A PresentationRequest
object is used to initiate or reconnect to a presentation made by a controlling browsing context. The PresentationRequest
object MUST be implemented in a controlling browsing context provided by a controlling user agent.
When a PresentationRequest
is constructed, the given urls
MUST be used as the list of presentation request URLs which are each a possible presentation URL for the PresentationRequest
instance.
Constructor
PresentationRequest()
-
Creates a
PresentationRequest
.
Properties
None
Event handlers
PresentationRequest.onconnectionavailable
-
Fires on a successful call to
PresentationRequest.start()
orPresentationRequest.join()
. This method provides a object with a reference to the created or joined object.
Methods
PresentationRequest.start()
-
Returns a
Promise
that resolves with aPresentationConnection
after the user agent prompts the user to select a display and grant permission to use that display. PresentationRequest.reconnect()
-
When the
reconnect(presentationId)
method is called on aPresentationRequest
presentationRequest, the user agent MUST run the following steps to reconnect to a presentation. PresentationRequest.getAvailability()
-
When the
getAvailability()
method is called, the user agent MUST run the steps as the link.
Specifications
Specification |
---|
Presentation API # interface-presentationrequest |
Browser compatibility
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
PresentationRequest |
48 |
79 |
51-88 |
No |
35 |
No |
No |
48 |
51-79 |
35 |
No |
5.0 |
PresentationRequest |
48 |
79 |
51-88 |
No |
35 |
No |
No |
48 |
51-79 |
35 |
No |
5.0 |
getAvailability |
48 |
79 |
51-88 |
No |
35 |
No |
No |
48 |
51-79 |
35 |
No |
5.0 |
onconnectionavailable |
48 |
79 |
51-88 |
No |
35 |
No |
No |
48 |
51-79 |
35 |
No |
5.0 |
reconnect |
48 |
79 |
51-88 |
No |
35 |
No |
No |
48 |
51-79 |
35 |
No |
5.0 |
secure_context_required |
61 |
≤79 |
Yes-61 |
No |
48 |
No |
No |
61 |
Yes-79 |
45 |
No |
8.0 |
start |
48 |
79 |
51-88 |
No |
35 |
No |
No |
48 |
51-79 |
35 |
No |
5.0 |
startWithDevice |
No |
No |
51-88 |
No |
No |
No |
No |
No |
51-79 |
No |
No |
No |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest