Intent to Implement: MediaDevices devicechange event.

128 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Guido Urdaneta

ungelesen,
19.02.2016, 09:20:0619.02.16
an blink-dev

Contact emails

gui...@chromium.org, h...@chromium.org


Spec

http://w3c.github.io/mediacapture-main/

Tag review:https://github.com/w3ctag/spec-reviews/issues/57


Summary

This intent covers the addition of the devicechange event to the MediaDevices object. This event is fired when a media device is connected to or removed from the system.

Motivation

This feature is useful for applications that wish to react to changes in the set of available media devices; for example, to show a device list that is always up-to-date.


Interoperability and Compatibility Risk

The interoperability risk is low since the feature has been in the spec without changes for more than 18 months and is supported by Edge .  Firefox  has an open bug for this, but it has not seen any activity.

There are no significant compatibility risks associated with this feature as it does not affect existing applications that are not aware of this event.


Ongoing technical constraints

Chromium currently supports asynchronous device change notifications on Linux, Windows and Mac, but not on Android or Chrome OS.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Initially it will be supported only on Windows, Mac and Linux. In the case of Mac, some work is required in Chromium to support notifications for audio output-only devices. We plan to keep this feature behind a flag until we have sufficient platform support.


OWP launch tracking bug

crbug.com/585096


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/4906859072847872


Requesting approval to ship?

No.


Philip Jägenstedt

ungelesen,
22.02.2016, 06:16:1622.02.16
an Guido Urdaneta, blink-dev
Sounds very useful!

I like timing problems, and noticed this one: "When a new media input or output device is made available, the User Agent must queue a task that fires a simple event named devicechange at the MediaDevices object."

This isn't really sufficient to write tests for, it seems. Imagine that enumerateDevices() is called arbitrarily often. When should the sequence<MediaDeviceInfo> that the promise is resolved with change, compared to when the devicechange event is fired? APIs where it's possible to observe a change before the change event are annoying. A nice property would be that any call to enumerateDevices() before the event is fired get the old sequence, and any call after the event gets the new sequence.

So I guess implement what makes sense and have the spec changed to match.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten