Re: [presentation-api] Refine how to do session teardown/disconnect/closing

@mounirlamouri if the netflix website calls `.close()`, then the 
PresentationSession would transition to a `terminated` state. If we 
have the `lastsessionterminated` event, then that would automatically 
close the application on the TV. If we don't have the 
`lastsessionterminated` event, then the presumption is that the 
application would have code similar to what @mfoltzgoogle provided 
which would cause the application to close.

Either way, the result would be that if the netflix website calls 
`.close()`, that the netflix application on the TV would be closed.

I think @mfoltzgoogle and I are largely in agreement. That we'd have 
just a `.close()` function on PresentationSession which would cause 
the connection to transition to the `terminated` state. And we'd have 
no `.terminate()` function.

The only point of difference in our proposals is whether we have a 
`lastsessionterminated` event which by default would close the page. I
 think whether we do that or not is a function of what default 
behavior we want to have, and how much work it would be to implement 
such an event.

I can definitely live with or without the `lastsessionterminated` 
event. But I kind'a like the default behavior of closing the 
application when the last controller goes away, and I don't think 
implementing the event would be very hard (though I could be wrong 
about that). So the event gets my vote.

But I can really live with either solution.

-- 
GitHub Notif of comment by sicking
See 
https://github.com/w3c/presentation-api/issues/35#issuecomment-137272420

Received on Wednesday, 2 September 2015 23:25:58 UTC