Re: [Bug 24015] Add callback to indicate when available media devices change

(opinionating = list not bugzilla)

This is pure bikeshedding, but I don't like "user" as a prefix either.
And "Media" is confusing by itself, since much media is handled without
being relevant to this item.

What about Devices, attribute devices?

Nit: I think it's "partial interface Navigator" - it extends the
Navigator interface, there isn't an interface called NavigatorUserMedia.

Since current deviceInfo call is async, I think I'd like to keep it
async. Not strongly, but do feel it.


On 05/26/2014 08:04 AM, bugzilla@jessica.w3.org wrote:
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=24015
>
> Adam Bergkvist <adam.bergkvist@ericsson.com> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |adam.bergkvist@ericsson.com
>
> --- Comment #5 from Adam Bergkvist <adam.bergkvist@ericsson.com> ---
> Here's a proposal.
>
> Regarding the name, I don't think the -handler or -manager suffixes add much.
> The sibling object for geolocation is simply called "geolocation" so I suggest
> MediaDevices, UserMedia or something.
>
> partial interface NavigatorUserMedia {
>     // kept for legacy purposes
>     void getUserMedia (MediaStreamConstraints? constraints,
>         NavigatorUserMediaSuccessCallback successCallback,
>         NavigatorUserMediaErrorCallback errorCallback);
>
>     readonly attribute UserMedia userMedia;
> };
>
> Navigator implements NavigatorUserMedia;
>
> interface UserMedia : EventTarget {
>     // this belongs there
>     void getUserMedia (MediaStreamConstraints? constraints,
>         NavigatorUserMediaSuccessCallback successCallback,
>         NavigatorUserMediaErrorCallback errorCallback);
>
>              attribute EventHandler? ondevicechange;
>     void enumerateDevices (MediaDeviceInfoCallback resultCallback);
>
>     // place future function for constraint name probing here
> };
>
> MediaDeviceInfoCallback is already in the spec.
>
> The function enumerateDevices() replaces the current async getMediaDevices()
> function. The new function could be synchronous (as in Martins proposal) if we
> do the work of preparing the return value in advance every time the device list
> changes. I don't have a strong opinion about it.
>
> We don't need a new event type since the event only notifies that there's new
> info available elsewhere (accessed by querying an other function). If the app
> wants to know about changes, it has to keep a reference to an old list and
> compare.
>
> Once we have settled for a first version name, I think we can start editing
> this into the spec.
>


-- 
Surveillance is pervasive. Go Dark.

Received on Monday, 26 May 2014 13:34:19 UTC