Types for asking what a camera can do and changing how it behaves.
An application can change only settings that both the browser recognizes and the particular camera supports.
Camera configuration has three related parts:
Capabilities contains the values a camera can support.Constraints contains the values the application asks for.Settings contains the values the browser is actually using.A browser may know a setting without supporting every value or combination on
a particular camera. Properties it does not report are Nothing. After
configuring a camera, use the returned Settings as the camera's current
settings.
Settings to ask a camera to use.
Every field is optional. Keep this value in your application model when making
several changes, and use defaultConstraints when starting without preferences.
Camera constraints with no requested values.
The settings a camera is currently using.
The browser returns these after opening or configuring a camera. A field is
Nothing when the browser does not report it.
A camera setting name recognized by the browser.
A particular camera may still not support the setting or a requested
combination of values. Unknown names are kept in UnknownConstraint.
Return the Web API name for a supported constraint.
A range of values supported by a camera.
step is Nothing when the camera does not report an increment.
Check whether a value is within a camera's advertised minimum and maximum.
This does not check whether the value follows the optional step increment.
The direction a camera faces relative to its device.
Unknown values are kept so newer browser values can still pass through Elm.
Return the Web API name for a facing mode.
An automatic or manual mode used by camera controls.
Continuous is commonly used for autofocus, automatic exposure, and automatic
white balance. Unknown browser values are kept in UnknownMeteringMode.
Return the Web API name for a metering mode.
Whether the browser may crop and scale camera output.
Return the Web API name for a resize mode.
The values supported by an open camera.
Numbers use ranges, while modes and Boolean properties list their available values.
Nothingmeans the camera does not report that property.