Re: New Proposal now up for Discussion on the Wiki

Hi Anssi,

yes, I meant the selection dialog that the UA shows to the user.

Something along the lines of:

var extraPresentationScreens = [ 'Extra Screen 1', 'Extra Screen 2' ]; //
the site was paired with these devices in some proprietary way so it
manages the list and the way to connect to the devices separately from the
presentation API

// the site subscribes to the discovery event, toggling the 'Button' button
on/off depending on when the device is available;
// with the extra devices being available, the button will always be
toggled on
var discovery = navigator.presentation.discoverScreens("
http://example.com/player.html");
discovery.ondiscovered(screensAreAvailable) {
  if (screensAreAvailable)
    // show the UI to start presenting, like enable or add a button
  else
    // hide the UI to start presenting, like hide or disable the button
}

// when the user clicks/taps the present button
var presentationPromise = present.requestShow('
http://example.com/player.html', extraPresentationScreens); //
extraPresentationScreens is an optional parameter
presentationPromise.then(
        function (session) {
             if (session.isExtraDevice)  // or lookup session.screenName in
extraPresentationScreens
                 // use the proprietary messaging channel to load the URL
there, the UA didn't do anything - just returned the supplied name and the
flag
             else
                 // the player is loaded on the second screen, use
session.channel to communicate with it
        },
        function(error) {
            // handle the error when starting the session
        }
);

Thanks for the suggestions, I'll see what I can do with Gmail :)



On Thu, Feb 6, 2014 at 2:41 PM, Kostiainen, Anssi <
anssi.kostiainen@intel.com> wrote:

> Hi Anton,
>
> On 06 Feb 2014, at 13:31, Anton Vayvod <avayvod@google.com> wrote:
>
> >> On Thu, Feb 6, 2014 at 11:20 AM, Rottsches, Dominik <
> dominik.rottsches@intel.com> wrote:
> >> Hi Anton, Louay,
> >>
> >> In this case the YouTube page is aware of the available presentation
> devices and shows them using its own styling and UI. For this to be
> possible via Presentation API, enumeration with human readable names would
> be required.
> >
> > I think we could go the other way: allow the site to provide additional
> items to the selection list. So YouTube would add a list of its own device
> ids for these manually paired devices. I believe this is what the new Cast
> Web SDK does.
>
> By “the selection list”, do you refer to the web content itself (e.g.
> <option> and friends), or to the selection dialogue that the UA shows to
> the user, similarly to e.g. the getUserMedia?
>
>
> https://raw2.github.com/dontcallmedom/web-permissions-req/gh-pages/screenshots/gum-video-prompt-chromium.png
>
> Feel free to share some [pseudo] code if you feel it would make describing
> what you had in mind easier :-)
>
> Thanks,
>
> -Anssi
>
> [Btw. it seems your mail client does not preserve the “>” quotation
> characters. Could you check if this can be configured. Some further tips
> are at:
> http://www.w3.org/2008/webapps/wiki/WorkMode#Mail_List_Policy.2C_Usage.2C_Etiquette.2C_etc
> .]
>

Received on Thursday, 6 February 2014 15:24:36 UTC