W3C home > Mailing lists > Public > public-secondscreen@w3.org > May 2015

Re: [presentation-api] Rethinking availability monitoring

From: Mark Foltz via GitHub <sysbot+gh@w3.org>
Date: Mon, 11 May 2015 20:31:17 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-101039366-1431376277-sysbot+gh@w3.org>
Rather than add a `cancel` method we could write the 
`AvailabilityListener` API as follows:

partial interface NavigatorPresentation {
  AvailabilityListener listenForAvailability(/*DOMString 

interface AvailabilityListener : EventTarget {
  Promise<boolean> getAvailability();
  attribute EventHandler onavailablechange;

The UA would not run discovery if:

* there were no handlers on `onavailablechange`
* there was no unresolved `Promise` from `getAvailability`

Even if there were listeners, the UA could also suspend discovery if 
there was no opportunity to start presentation (i.e., screen was off, 
tab was in the background, etc.) as a power optimization.

I would like to understand the role of the `presentationUrl` and 
`params` in the API; @avayvod, they were part of your original 

GitHub Notif of comment by mfoltzgoogle
Received on Monday, 11 May 2015 20:31:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 11 May 2015 20:31:20 UTC