New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 9 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2015
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Exp-Leadership: ----
Launch-Leadership: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Test: ----
Launch-UI: ----
Rollout-Type: ----



Sign in to add a comment

Add support for enumeration of media devices

Project Member Reported by guidou@chromium.org, Jun 25 2015

Issue description

(See http://www.chromium.org/blink#launch-process for an overview)

Change description:
Add the navigator.mediaDevices object and the navigator.mediaDevices.enumerateDevices() function.

Changes to API surface:
navigator.mediaDevices.enumerateDevices

Links:
Public standards discussion: http://w3c.github.io/mediacapture-main/getusermedia.html#enumerating-devices

Support in other browsers:
Internet Explorer: Public support, https://msdn.microsoft.com/en-us/library/mt131870(v=vs.85).aspx 
Firefox: Shipped since version 39, https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices
Safari: In development, http://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.h?rev=182275

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 8 2015

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=198529

------------------------------------------------------------------
r198529 | guidou@chromium.org | 2015-07-08T19:21:02.109617Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/RuntimeEnabledFeatures.in?r1=198529&r2=198528&pathrev=198529
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt?r1=198529&r2=198528&pathrev=198529

Enable MediaDevices by default by marking the the EnumerateDevices flag as stable.

Note that this includes mediaDevices.enumerateDevices() but also mediaDevices.getUserMedia() which was added later under the same flag.
The Intent to Ships for both were approved recently.

BUG= 504280 , 503227 

Review URL: https://codereview.chromium.org/1217273009
-----------------------------------------------------------------

Comment 2 by guidou@chromium.org, Jul 31 2015

Due to a regression caused by mediaDevices.getUserMedia(), this feature is behind a flag in M45. Shipping is postponed to M46 where either getUserMedia will be fixed or will have its own flag.
Cc: owe...@chromium.org
Do you believe this API has any potential privacy or security implications (for example increased fingerprinting risk)? If so we should ensure it has been approved by the appropriate teams. Let me know either way.
The security review for the device enumeration API is at crbug.com/268977

Note that at the time of that discussion, the original device enumeration API was MediaStreamTrack.getSources(), but the spec changed and replaced it with MediaDevices.enumerateDevices() (see  crbug.com/388648 ).
MediaStreamTrack.getSources() will be removed eventually (see  crbug.com/388194 ).

Apart from the name change, the main difference is that enumerateDevices() can list audio output devices in addition to the audio input and video input devices that MediaStreamTrack.getSources() already provides.

Based on the points discussed in the security review, I don't think enumerateDevices() raises any new risks by itself. The ability to enumerate audio output devices is expected to be used in combination with another API called Audio Output Devices API. That API  will have its own security review before being shipped.

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 28 2015

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=201398

------------------------------------------------------------------
r201398 | guidou@chromium.org | 2015-08-28T12:50:14.295158Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/mediastream/NavigatorUserMedia.idl?r1=201398&r2=201397&pathrev=201398
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/RuntimeEnabledFeatures.in?r1=201398&r2=201397&pathrev=201398
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt?r1=201398&r2=201397&pathrev=201398
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/mediastream/MediaDevices.idl?r1=201398&r2=201397&pathrev=201398

Use separate flags for MediaDevices and promises-based getUserMedia.

getUserMedia is not yet fully spec compliant and should remain behind a flag, but MediaDevices.enumerateDevices does not have this problem.


BUG= 504280 

Review URL: https://codereview.chromium.org/1300833002
-----------------------------------------------------------------
Labels: Hotlist-Recharge
This issue likely requires triage.  The current issue owner maybe inactive (i.e. hasn't fixed an issue in the last 30 days).  Thanks for helping out!

-Anthony

Comment 7 by guidou@chromium.org, Sep 24 2015

Status: Fixed

Sign in to add a comment