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

Re: [presentation-api] Run startSession steps in parallel

From: Mark Foltz via GitHub <sysbot+gh@w3.org>
Date: Mon, 12 Oct 2015 16:50:11 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-147458999-1444668610-sysbot+gh@w3.org>
Doing this in parallel makes sense.  It's not clear that the 
"monitoring displays" algorithm has a clear termination condition.  I 
could be roaming among WiFi networks with the dialog open and come 
across a display, or some other discovery process may complete in the 
background.

If change to parallel discovery and selection, then the page won't get
 a rejected Promise from `start()` until the user sees there are no 
displays (or gives up waiting) and explicitly cancels selection.  That
 seems okay to me.

So I would propose the following:

1. Always start monitoring for displays when `start()` is called
2. In parallel, notify the user with any displays found (or no 
displays), and allow the user to cancel
3. Cancelling will stop monitoring and reject the `Promise`.

I'll do this in a separate PR since it involves some surgery to the 
start presentation algorithm.

-- 
GitHub Notif of comment by mfoltzgoogle
See 
https://github.com/w3c/presentation-api/issues/148#issuecomment-147458999
Received on Monday, 12 October 2015 16:50:12 UTC

This archive was generated by hypermail 2.3.1 : Monday, 12 October 2015 16:50:13 UTC