All users were logged out of Bugzilla on October 13th, 2018

[Presentation WebAPI] enable Presentation API via preference instead of permission

RESOLVED FIXED in Firefox 51

Status

()

RESOLVED FIXED
2 years ago
5 months ago

People

(Reporter: schien, Assigned: schien)

Tracking

({dev-doc-complete})

unspecified
mozilla51
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox51 fixed)

Details

(Whiteboard: btpp-active[ETA 8/19])

Attachments

(1 attachment, 3 obsolete attachments)

Comment hidden (empty)
Created attachment 8760202 [details] [diff] [review]
[WIP] allow-presentation-in-web-page.patch
Assignee: nobody → schien
Whiteboard: btpp-active
Created attachment 8775477 [details] [diff] [review]
[WIP] allow-presentation-in-web-page.patch
Attachment #8760202 - Attachment is obsolete: true

Updated

2 years ago
Status: NEW → ASSIGNED
Whiteboard: btpp-active → btpp-active[ETA 8/19]
Created attachment 8779999 [details] [diff] [review]
[WIP] allow-presentation-in-web-page.patch
Attachment #8775477 - Attachment is obsolete: true
Comment hidden (mozreview-request)
Attachment #8779999 - Attachment is obsolete: true
Comment on attachment 8781009 [details]
Bug 1278205 - use preference for exposing presentation API. .

summary of this change:
1. remove |presentation| permission
2. use |dom.presentation.enabled| for API that is common for both controller and receiver
3. use |dom.presentation.controller.enabled| for API that is only for controller.
4. use |dom.presentation.receiver.enabled| for API that is only for receiver.
Summary: [Presentation WebAPI] enable Presentation API for web page on Fennec as a controller → [Presentation WebAPI] enable Presentation API via preference instead of permission
Comment hidden (mozreview-request)

Comment 8

2 years ago
So dom.presentation.enabled needs to be enabled before dom.presentation.controller.enabled or dom.presentation.receiver.enabled can enable certain parts of the API?

Comment 9

2 years ago
mozreview-review
Comment on attachment 8781009 [details]
Bug 1278205 - use preference for exposing presentation API. .

https://reviewboard.mozilla.org/r/71514/#review69214

Ah, this way. And yes, the spec seem to hint that some interfaces are exposed only in some contexts.
Attachment #8781009 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #8)
> So dom.presentation.enabled needs to be enabled before
> dom.presentation.controller.enabled or dom.presentation.receiver.enabled can
> enable certain parts of the API?

Yes, unfortunately we need to fiddle two preferences for controller and receiver, three preferences for 1-UA device since it supports both APIs.
Comment hidden (mozreview-request)

Comment 12

2 years ago
Pushed by schien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5f9021b0c901
use preference for exposing presentation API. r=smaug.

Comment 13

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5f9021b0c901
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Depends on: 1297018
Keywords: dev-doc-needed
The compat data on these pages now show the preference info:

https://developer.mozilla.org/en-US/docs/Web/API/Presentation
https://developer.mozilla.org/en-US/docs/Web/API/Presentation/defaultRequest
https://developer.mozilla.org/en-US/docs/Web/API/Presentation/receiver

https://developer.mozilla.org/en-US/docs/Web/API/PresentationAvailability
https://developer.mozilla.org/en-US/docs/Web/API/PresentationAvailability/value
https://developer.mozilla.org/en-US/docs/Web/API/PresentationAvailability/onchange

https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/binaryType
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/close
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/id
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/state
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/terminate
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/url

https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionAvailableEvent
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionAvailableEvent/PresentationConnectionAvailableEvent
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionAvailableEvent/connection

https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionCloseEvent
https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionList
https://developer.mozilla.org/en-US/docs/Web/API/PresentationReceiver

https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest
https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest/PresentationRequest
https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest/getAvailability
https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest/onconnectionavailable
https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest/reconnect
https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest/start
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.