Re: Proposal to add defaultDevice attribute to getMediaDevices.

On 03/12/2014 12:32 PM, Kiran Kumar wrote:
> Hi,
> I would like to add this to bug list.
> Please let me know if you have any comments.

I would like to not add it.

As has been noted, there isn't always an obvious default device. So if 
the flag is added, the JS must be written to handle the condition where 
no default device is in the list. But since this may be a rare case, JS 
apps might choose to ignore this possibility - which is bad for app 
portability.

If the JS wishes to get a device, and it doesn't care about which one, 
it could just getUserMedia(). Which one is returned may vary depending 
on configuration parameters, constraints, or whether some other program 
has opened the device (for OSes that do exclusive device access).

The only use case I can see is to preselect the default device in a list 
of devices, so that the user can tell which device will be opened if he 
doesn't select one - and as seen above, this is not guaranteed to be the 
device that actually gets selected (some other program may have grabbed 
it before the user selects a device).

I see increased complexity, without a corresponding size of benefit. So 
I'd like to not do this.



>
>
> On Mon, Mar 10, 2014 at 3:43 PM, Kiran Kumar <g.kiranreddy4u@gmail.com 
> <mailto:g.kiranreddy4u@gmail.com>> wrote:
>
>     It is not universally true for all,
>
>     When I connect an external webcam to my desktop PC, which has no
>     camera, Mozilla is displaying its names as YUV-xxx-camera.
>     Laptops are also not showing "default" prefix in the names.
>
>     I am not sure which devices/SO's are showing the "default" prefix.
>
>     Thanks,
>     Kiran.
>
>
>
>     On Mon, Mar 10, 2014 at 3:19 PM, Iņaki Baz Castillo <ibc@aliax.net
>     <mailto:ibc@aliax.net>> wrote:
>
>         2014-03-10 6:51 GMT+01:00 Kiran Kumar
>         <g.kiranreddy4u@gmail.com <mailto:g.kiranreddy4u@gmail.com>>:
>         > I would like to propose adding a defaultDevice attribute
>         which indicates
>         > which device is the default device out of the list.
>         >
>         > dictionary MediaDeviceInfo {
>         >     DOMString       deviceId;
>         >     MediaDeviceKind kind;
>         >     DOMString       label;
>         >     DOMString       groupId;
>         >
>         >     bool            defaultDevice;
>         > };
>         >
>         > This will allow a default value checked while displaying the
>         list of
>         > devices.
>
>
>         Correct me if I'm wrong, but AFAIK the multimedia subsystem in
>         some
>         SO's report a "default sound card", "default mic" and "default
>         webcam".
>
>
>         --
>         Iņaki Baz Castillo
>         <ibc@aliax.net <mailto:ibc@aliax.net>>
>
>
>

Received on Thursday, 13 March 2014 09:19:22 UTC