W3C home > Mailing lists > Public > public-secondscreen@w3.org > December 2016

[presentation-api] Filling out the list of available presentation displays for start

From: François Daoust via GitHub <sysbot+gh@w3.org>
Date: Thu, 01 Dec 2016 20:53:17 +0000
To: public-secondscreen@w3.org
Message-ID: <issues.opened-192959313-1480625596-sysbot+gh@w3.org>
tidoust has just created a new issue for 
https://github.com/w3c/presentation-api:

== Filling out the list of available presentation displays for start 
==
Step 7. of the [select a presentation display 
algorithm](http://w3c.github.io/presentation-api/#dfn-select-a-presentation-display)
 tells the user agent to [monitor the list of available presentation 
displays](http://w3c.github.io/presentation-api/#dfn-monitor-the-list-of-available-presentation-displays).
 This is meant to fill out the [list of available presentation 
displays](http://w3c.github.io/presentation-api/#dfn-list-of-available-presentation-displays),
 which needs to be non empty for the display selection to do 
something.

The monitoring algorithm fills out that list based on the contents of 
the [set of presentation availability 
objects](http://w3c.github.io/presentation-api/#dfn-set-of-presentation-availability-objects).
 Problem is that set is only filled out by the [`getAvailability` 
algorithm](http://w3c.github.io/presentation-api/#getting-the-presentation-displays-availability-information).

In short, if an app calls `start` without first calling 
`getAvailability`, the monitoring algorithm will simply create an 
empty list of available presentation displays which would make `start`
 end up with a `NotFoundError` exception.

I guess the easiest way to fix that would be to have the selection 
algorithm set the presentation display availability right before 
current step 7, as done in `getAvailability`. Something like:

7. If the presentation display availability for presentationRequest is
 null, then:
  - Set the presentation display availability for presentationRequest 
to a newly created PresentationAvailability object, and let A be that 
object. 
  - Set the value property of A as follows: 
    1. false if the list of available presentation displays is empty. 
    2. true if there is at least one available presentation display 
for some member of presentationUrls. That is, there is an entry 
(presentationUrl, display) in the list of available presentation 
displays for some presentationUrl in presentationUrls. 
    3. false otherwise. 
  - Create a tuple (A, presentationUrls) and add it to the set of 
presentation availability objects.
8. If the user agent is not monitoring the list of available 
presentation displays, run the steps to monitor the list of available 
presentation displays in parallel.

Now, in theory, there should be no reason to introduce 
`PresentationAvailability` objects in `start`. Oh well...

Please view or discuss this issue at 
https://github.com/w3c/presentation-api/issues/387 using your GitHub 
account
Received on Thursday, 1 December 2016 20:53:24 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 1 December 2016 20:53:25 UTC