Chromium Code Reviews| Index: content/common/media/media_devices.mojom |
| diff --git a/content/common/media/media_devices.mojom b/content/common/media/media_devices.mojom |
| index d53232e580266f2337d724cee50c8786666f33b9..2ef7a7f69795e528a20c846a2c2a61ead05896ae 100644 |
| --- a/content/common/media/media_devices.mojom |
| +++ b/content/common/media/media_devices.mojom |
| @@ -4,6 +4,7 @@ |
| module mojom; |
| +import "media/capture/mojo/video_capture_types.mojom"; |
| import "url/mojo/origin.mojom"; |
| [Native] |
| @@ -12,6 +13,24 @@ enum MediaDeviceType; |
| [Native] |
| struct MediaDeviceInfo; |
| +// The values for this enum match the ones defined in |
| +// https://w3c.github.io/mediacapture-main/#def-constraint-facingMode |
| +// with the addition of UNKNOWN, which would map to the empty string in |
| +// JavaScript. |
| +enum FacingMode { |
| + USER, |
| + ENVIRONMENT, |
| + LEFT, |
| + RIGHT, |
| + UNKNOWN |
|
hta - Chromium
2017/01/27 10:40:47
Is there a particular reason for not calling it NO
Guido Urdaneta
2017/01/27 14:10:47
Changed to NONE. Wasn't aware of the pattern.
|
| +}; |
| + |
| +struct VideoInputDeviceCapabilities { |
| + string device_id; |
| + array<media.mojom.VideoCaptureFormat> formats; |
| + FacingMode facing_mode; |
| +}; |
| + |
| // This object lives in the browser and is responsible for processing device |
| // enumeration requests and managing subscriptions for device-change |
| // notifications. |
| @@ -24,6 +43,14 @@ interface MediaDevicesDispatcherHost { |
| bool request_audio_output, |
| url.mojom.Origin security_origin) |
| => (array<array<MediaDeviceInfo>> enumeration); |
| + |
| + // Returns a list of video devices and their capabilities. |
| + // If there is a user-preferred device, it is the first in the result. |
| + // The result of this function is intended for the implementation details |
| + // of algorithms such as settings selection for getUserMedia. |
| + // Do not expose the data contained in result of this function to JavaScript. |
| + GetVideoInputCapabilities(url.mojom.Origin security_origin) |
| + => (array<VideoInputDeviceCapabilities> video_input_device_capabilities); |
| // Creates a subscription for device-change notifications for the calling |
| // frame/security origin. It is the responsibility of the caller to send |