Re: Multiple controlling pages (Was: Re: Allow page to designate itself as presentation session)

On 2014-11-27 15:39, Bassbouss, Louay wrote:
[...]
>> Whatever the solution, it is going to impact how these sessions are
>> exposed to receivers since "navigator.presentation.session" is a
>> singleton right now. It might be good to handle the possibility for
>> receivers to have multiple senders as soon as possible.
> [Louay]
> I think we need to clearly describe what a "session" is. Currently session is like a channel. In multiple senders case, we need multiple channels but not necessary multiple sessions. What do you think about this proposal?
> session.onconnect = function(evt){
>     var c  = e.channel;
>     c.postMessage("Hello Sender, you are now connected");
>     c.onmessage = function(){...}
>     c.onstatechange = function(){...}
> }

Right, it could be convenient to expose a root session object, on top of 
individual channels:
- the presentationId could be repeated across channels but would better 
sit at the session level.
- this would be the natural place for a possible broadcast postMessage 
function
- similarly, the session interface could also expose a "close" function 
that closes all channels at once... although do we want a "close" 
function on the receiver side actually? Or is the receiver to be viewed 
as a slave of at least one sender? There is no "close" function in the 
Google Cast Receiver API [1] for instance.

Francois.

[1] https://developers.google.com/cast/docs/reference/receiver/

Received on Friday, 28 November 2014 10:24:12 UTC