- From: Mark Foltz via GitHub <sysbot+gh@w3.org>
- Date: Fri, 12 Jun 2015 20:07:13 +0000
- To: public-secondscreen@w3.org
@avayvod - Regarding `getSession()` vs. `getSessions()`, the concern raised by JC Duford during the F2F was to make the common case (one controller) as simple as possible. However I agree that it adds some redundancy to the API. - `getSession()` could always return the initial controller (connected or disconnected), but that would prevent the underlying PresentationSession from ever being garbage collected; a minor but annoying inefficiency. - I think the transcription was botched from the F2F. Re-reading the notes, `getSessions()` was proposed to return just a `PresentationSession[]` (no Promise). We did not want to expose an Array property because of concerns about modification of the Array prototype. - I agree that an array is probably not the right semantic to convey the set of controllers. It makes it harder to garbage collect disconnected sessions and forces the Web developer to diff to find out if there are new controllers. @obeletski - See my comment above; I believe the only Promise should be for getting the initial controller via `getSession()` and (under the original proposal) we would return an Array `PresentationSession[]` itself for `getSessions()`. Let me see if I can formulate another proposal that addresses the concerns raised here. The other actions raised in the F2F to formulate new idioms and a new APIs for referring to the PresentationSession on either side of the presentation [1] [2] I will consider and propose separately. [1] http://www.w3.org/2015/05/19-webscreens-minutes.html#action12 [2] http://www.w3.org/2015/05/19-webscreens-minutes.html#action13 -- GitHub Notif of comment by mfoltzgoogle See https://github.com/w3c/presentation-api/issues/19#issuecomment-111601625
Received on Friday, 12 June 2015 20:07:14 UTC