| 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..93e943225af7e7d8a2a85ef8b9881283805dd712 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 NONE, which would map to the empty string in
|
| +// JavaScript.
|
| +enum FacingMode {
|
| + NONE,
|
| + USER,
|
| + ENVIRONMENT,
|
| + LEFT,
|
| + RIGHT
|
| +};
|
| +
|
| +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
|
|
|