Closed Bug 1278205 Opened 4 years ago Closed 4 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: schien, Assigned: schien)

References

Details

(Keywords: dev-doc-complete, Whiteboard: btpp-active[ETA 8/19])

Attachments

(1 file, 3 obsolete files)

No description provided.
Assignee: nobody → schien
Whiteboard: btpp-active
Status: NEW → ASSIGNED
Whiteboard: btpp-active → btpp-active[ETA 8/19]
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
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 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.
Pushed by schien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5f9021b0c901
use preference for exposing presentation API. r=smaug.
https://hg.mozilla.org/mozilla-central/rev/5f9021b0c901
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
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
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.