RE: Synchronous versus asynchronous getSourceInfos

How about getInfoOnSources()?


-          Jim

From: Justin Uberti [mailto:juberti@google.com]
Sent: Tuesday, June 04, 2013 4:51 PM
To: Travis Leithead
Cc: Martin Thomson; Eric Rescorla; public-media-capture@w3.org; Tommy Widenflycht (ᛏᚮᛘᛘᚤ); Victoria Kirst
Subject: Re: Synchronous versus asynchronous getSourceInfos

While more grammatically correct, to me getSourceInfo reads like it's getting the info about a particular source. How about getSources() (or getUserSources) instead?

Also, as this makes getSourceInfos more like getUserMedia, is there a good reason to have this as a static method on MediaStreamTrack as opposed to Navigator, like getUserMedia? (I may have just missed this in the original discussion)



On Tue, Jun 4, 2013 at 1:12 PM, Travis Leithead <travis.leithead@microsoft.com<mailto:travis.leithead@microsoft.com>> wrote:
>> While we are there, s/Infos/Info/  - "Info" is short for "Information", which is already plural.
Thank you! That's been bugging me... :-)

-----Original Message-----
From: Martin Thomson [mailto:martin.thomson@gmail.com<mailto:martin.thomson@gmail.com>]
Sent: Tuesday, June 4, 2013 1:06 PM
To: Eric Rescorla
Cc: Justin Uberti; public-media-capture@w3.org<mailto:public-media-capture@w3.org>; Tommy Widenflycht (ᛏᚮᛘᛘᚤ); Victoria Kirst
Subject: Re: Synchronous versus asynchronous getSourceInfos

Yes, this is something that should be made asynchronous.

While we are there, s/Infos/Info/  - "Info" is short for "Information", which is already plural.

On 4 June 2013 11:36, Eric Rescorla <ekr@rtfm.com<mailto:ekr@rtfm.com>> wrote:
> This seems like a good idea.
>
>
> On Tue, Jun 4, 2013 at 10:30 AM, Justin Uberti <juberti@google.com<mailto:juberti@google.com>> wrote:
>>
>> getSourceInfos is currently defined as synchronous [1] , but it will
>> need to reach down into the media subsystem to enumerate capture devices.
>> Previously, we have suggested that APIs like this should be async, to
>> avoid blocking the JS thread while waiting for the low-level
>> operation to complete. For getSourceInfos, I think this is still true
>> - even if we pre-enumerate devices when the browser starts, it is
>> possible that a page may make a request before the enumeration has
>> completed, and will still need to block.
>>
>> Therefore I suggest that as part of the futures discussion, we
>> consider whether getSourceInfos should be async, either
>>
>> void getSourceInfos(successCallback, failureCallback)
>>
>> or
>>
>> Future getSourceInfos()
>>
>> [1] http://dev.w3.org/2011/webrtc/editor/getusermedia.html#methods-1

>>
>

Received on Tuesday, 4 June 2013 20:54:55 UTC