Re: Google/Mozilla Presentation API update

On Mon, Aug 25, 2014 at 4:30 AM, Marco Chen <mchen@mozilla.com> wrote:

> Hi,
>
> I think the support of multiple controllers is important to benefit some
> use cases.
> The web game can allow multiple players for one.
>
> Maybe we can refer to NSD [1] which provided two EventHandler for
> notifying service found or lost.
> (For Presentation API here, maybe session joined or leaved and under
> NavigatorPresentation)
> Then the session object in presenting page [2] will become multiple ones.
>
> The question is do we allow presenting page to explicitly reject or deny
> second or later sessions?
> (ex: when I choose a game to single player mode then presenting page can
> reject others player.)
>
> [1] http://www.w3.org/TR/discovery-api/#dom-networkservices-onservicefound
> [2]
> http://lists.w3.org/Archives/Public/public-webscreens/2014Aug/0058.html
>


HTML5 SharedWorkers use an onconnect event handler to let the worker listen
for additional connections [1].  The ConnectEvent names a source
(MessagePort).  Perhaps a similar API would work here, e.g. retaining the
onpresent event for new connections.

[1]
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#shared-workers

We would still want to address the race condition, either by setting a
property at page load time with existing connections, or requiring the user
agent to queue up connect events and fire them when the first handler is
added.

m.


> ------------------------------
> *From: *"Jonas Sicking" <jonas@sicking.cc>
> *To: *"Mark Watson" <watsonm@netflix.com>
> *Cc: *"mark a. foltz" <mfoltz@google.com>, "Anton Vayvod" <
> avayvod@google.com>, "Anssi Kostiainen" <anssi.kostiainen@intel.com>,
> "Marco Chen" <mchen@mozilla.com>, "Wesley Johnston" <wjohnston@mozilla.com>,
> public-webscreens@w3.org, "Evelyn Hung" <ehung@mozilla.com>
> *Sent: *Saturday, August 23, 2014 8:06:41 AM
> *Subject: *Re: Google/Mozilla Presentation API update
>
>
> On Wed, Aug 20, 2014 at 6:15 PM, Mark Watson <watsonm@netflix.com> wrote:
> > Ok, so if multiple simultaneous connections are allowed we will need some
> > way to tell the presenting page when controllers come and go and which
> > controller each message is from, right ?
>
> Indeed, I don't think the API as it's currently defined allows for
> multiple controllers.
>
> / Jonas
>
>

Received on Tuesday, 26 August 2014 00:58:31 UTC