Re: Session cancellation and reconnection

On Thu, Sep 11, 2014 at 5:16 PM, mark a. foltz <mfoltz@google.com> wrote:
> I have created a pull request that conveys the suggested specification for
> automatic session reconnection.
>
> https://github.com/webscreens/presentation-api/pull/23
>
> Please note that there are some open issues that were added as I fleshed out
> the specification:
>
> * If more than one presentation session exists with the same url and
> presentationId (on different screens) then what is the behavior of
> joinSession(url, presentationId)?

Ugh, tricky one.

Maybe leave undefined which one is reconnected to. But have a SHOULD
or MAY requirement that implementation should attempt to reconnect to
the same presentation session that this device previously lost
connection to. And if that doesn't exist, connect to a session that
doesn't have any devices connected to it. And otherwise choose one at
random or let the user choose?

> * If the user agent becomes aware of a presentation session after the page
> has already called joinSession, there is no way to notify the page of its
> existence. Should we use an event handler instead?

I'm not sure I understand the order of events here. You mean that the
page calls joinSession before the onavailablechange event fires but
before we've connected to anything? If so it seems fine to just
connect to that existing session, no?

> * If the page calls startSession(url, presentationId) with the same url and
> presenationId as joinSession(url, presentationId), and the latter call has
> not resolved, behavior is not defined.

Is this different from the more general situation of calling
startSession when there's already an existing sessions with all TVs?

It seems reasonable for the UA to either simply reject the attempt, or
to show UI to the user allowing the user to terminate the existing
session and start a new session.

> * Since we permit multiple opener pages to connect the same presentation
> page, we need to define how connection and disconnection of these pages is
> communicated to the presentation page (if at all).

I think this is an interesting use case. It could allow for
multiplayer gaming on a TV for example. Is this the same as issue 19?

/ Jonas

Received on Friday, 12 September 2014 20:09:57 UTC