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

Re: [presentation-api] PresentationReceiver: rename getConnection() and getConnections()

From: Mounir Lamouri via GitHub <sysbot+gh@w3.org>
Date: Wed, 07 Oct 2015 14:34:05 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-146212410-1444228444-sysbot+gh@w3.org>
Having ```receiver``` has a promise isn't that different from 
```connections``` as a promise and will make it more complex for a 
website to know if it is being run as a receiver (ie. checks if 
```navigator.presentation.receiver``` is ```null```.

If we follow Anton's lead and not distinguish first connections from 
the others but still want to keep the one connection UC easy, what 
about having something as simple as:
interface PresentationReceiver {
  Promise<PresentationConnection> waitForNextConnection();

It would basically behave like a stream and will resolve the promise 
when a ```PresentationConnection``` is available. It solves a couple 
of issues like having to deal with whether we should show closed 
connections in ```connections```. The website would have to take care 
of handling all the connections itself.
(Anton pointed to me that he suggested [something similar in the 
 so it must definitely be a great idea ;))


GitHub Notif of comment by mounirlamouri
Received on Wednesday, 7 October 2015 14:34:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 October 2015 14:34:07 UTC