Skip to content

Filling out the list of available presentation displays for start #387

Closed

Description

@tidoust

Step 7. of the select a presentation display algorithm tells the user agent to monitor the list of available presentation displays. This is meant to fill out the 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. Problem is that set is only filled out by the getAvailability algorithm.

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:

  1. 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.
  1. 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...

Activity

  1. tidoust commented on Dec 1, 2016

    @tidoust
    MemberAuthor

    Hmm, a better fix might be to complete the monitoring algorithm with a step such as:

    If there is a pending request to select a presentation display, run the following step:

    1. For each display in newDisplays, if display is an available presentation display for one of the presentation urls then run the following steps:
      • let presentationUrl be that presentation url
      • Insert a tuple (presentationUrl, display) into the list of available presentation displays, if no identical tuple already exists.
  2. markafoltz commented on Dec 3, 2016

    @markafoltz
    Contributor

    We could just have a step in start() before 7 that creates an availability object for the request, and a cleanup step to remove the object. Then monitoring would run and insert any available displays into the list for the request URLs.

  3. added 3 commits that reference this issue on Dec 14, 2016
  4. added a commit that references this issue on Dec 20, 2016
  5. added a commit that references this issue on Dec 21, 2016
  6. added a commit that references this issue on Dec 21, 2016
  7. markafoltz commented on Dec 21, 2016

    @markafoltz
    Contributor

    Should be addressed by PR #387.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions