Re: [presentation-api] Specify behavior when multiple controlling pages are connected to the session

We might want to support the following functionality on the presenting
 page:

1. Be able to distinguish the first session to the controlling page.
2. Accept only certain number of controlling pages (think of the game 
that supports only 2 players)
3. Stop accepting controlling pages after certain time (e.g. game or 
class has started)

>From that perspective simple interface that was proposed by @avayvod  
could be a good solution.
```
partial interface NavigatorPresentation {
    Promise<PresentationSession> requestController(params);  // 
replaces navigator.presentation.session
}
```
Additionally, we will have to pass implementation specific parameters 
to `getSession()` or `requestController()` methods. For Google cast 
one has to provide cast message bus, for HbbTV `app-endpoint`  
https://github.com/w3c/presentation-api/issues/67#issuecomment-107878649,
 for Samsung's multiscreen - `channelId`. That means that UA is not 
able to initiate background task for connecting to the controlling 
pages without that extra information before page is loaded.  That task
 has to be triggered by the script.

Another thing is that on the controlling page it would not be possible
 to differentiate that presentation page is not accepting connections 
anymore, see communication issues listed here: 
https://github.com/w3c/presentation-api/issues/67#issuecomment-101780142.
 Establishing of the connection (pairing) is working I the same way 
for Samsung's multiscreen and the same issues exist for that 
technology. In practice, requirements 2 and 3 would difficult to 
implement for controlling page. So presenting page would be better off
 establishing connection, sending message that no more participants 
are accepted and closing that immediately.

-- 
GitHub Notif of comment by obeletski
See 
https://github.com/w3c/presentation-api/issues/19#issuecomment-112008939

Received on Monday, 15 June 2015 10:22:39 UTC