From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../tests/interfaces/image-capture.idl | 160 +++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 testing/web-platform/tests/interfaces/image-capture.idl (limited to 'testing/web-platform/tests/interfaces/image-capture.idl') diff --git a/testing/web-platform/tests/interfaces/image-capture.idl b/testing/web-platform/tests/interfaces/image-capture.idl new file mode 100644 index 0000000000..f98912cb6a --- /dev/null +++ b/testing/web-platform/tests/interfaces/image-capture.idl @@ -0,0 +1,160 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: MediaStream Image Capture (https://w3c.github.io/mediacapture-image/) + +[Exposed=Window] +interface ImageCapture { + constructor(MediaStreamTrack videoTrack); + Promise takePhoto(optional PhotoSettings photoSettings = {}); + Promise getPhotoCapabilities(); + Promise getPhotoSettings(); + + Promise grabFrame(); + + readonly attribute MediaStreamTrack track; +}; + +dictionary PhotoCapabilities { + RedEyeReduction redEyeReduction; + MediaSettingsRange imageHeight; + MediaSettingsRange imageWidth; + sequence fillLightMode; +}; + +dictionary PhotoSettings { + FillLightMode fillLightMode; + double imageHeight; + double imageWidth; + boolean redEyeReduction; +}; + +dictionary MediaSettingsRange { + double max; + double min; + double step; +}; + +enum RedEyeReduction { + "never", + "always", + "controllable" +}; + +enum FillLightMode { + "auto", + "off", + "flash" +}; + +partial dictionary MediaTrackSupportedConstraints { + boolean whiteBalanceMode = true; + boolean exposureMode = true; + boolean focusMode = true; + boolean pointsOfInterest = true; + + boolean exposureCompensation = true; + boolean exposureTime = true; + boolean colorTemperature = true; + boolean iso = true; + + boolean brightness = true; + boolean contrast = true; + boolean pan = true; + boolean saturation = true; + boolean sharpness = true; + boolean focusDistance = true; + boolean tilt = true; + boolean zoom = true; + boolean torch = true; +}; + +partial dictionary MediaTrackCapabilities { + sequence whiteBalanceMode; + sequence exposureMode; + sequence focusMode; + + MediaSettingsRange exposureCompensation; + MediaSettingsRange exposureTime; + MediaSettingsRange colorTemperature; + MediaSettingsRange iso; + + MediaSettingsRange brightness; + MediaSettingsRange contrast; + MediaSettingsRange saturation; + MediaSettingsRange sharpness; + + MediaSettingsRange focusDistance; + MediaSettingsRange pan; + MediaSettingsRange tilt; + MediaSettingsRange zoom; + + boolean torch; +}; + +partial dictionary MediaTrackConstraintSet { + ConstrainDOMString whiteBalanceMode; + ConstrainDOMString exposureMode; + ConstrainDOMString focusMode; + ConstrainPoint2D pointsOfInterest; + + ConstrainDouble exposureCompensation; + ConstrainDouble exposureTime; + ConstrainDouble colorTemperature; + ConstrainDouble iso; + + ConstrainDouble brightness; + ConstrainDouble contrast; + ConstrainDouble saturation; + ConstrainDouble sharpness; + + ConstrainDouble focusDistance; + (boolean or ConstrainDouble) pan; + (boolean or ConstrainDouble) tilt; + (boolean or ConstrainDouble) zoom; + + ConstrainBoolean torch; +}; + +partial dictionary MediaTrackSettings { + DOMString whiteBalanceMode; + DOMString exposureMode; + DOMString focusMode; + sequence pointsOfInterest; + + double exposureCompensation; + double exposureTime; + double colorTemperature; + double iso; + + double brightness; + double contrast; + double saturation; + double sharpness; + + double focusDistance; + double pan; + double tilt; + double zoom; + + boolean torch; +}; + +dictionary ConstrainPoint2DParameters { + sequence exact; + sequence ideal; +}; + +typedef (sequence or ConstrainPoint2DParameters) ConstrainPoint2D; + +enum MeteringMode { + "none", + "manual", + "single-shot", + "continuous" +}; + +dictionary Point2D { + double x = 0.0; + double y = 0.0; +}; -- cgit v1.2.3