Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pan and tilt constraints #182

Merged
merged 1 commit into from
Mar 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions implementation-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ Feature/Platform | Android | Linux/Chrome
└ focusDistance | ([732807](https://crbug.com/732807))| | | |
└ focusMode | ✓ | ✓ | 60 ([657128](https://crbug.com/657128)) | |
└ iso | ✓ | | | |
└ pan | | | | |
└ pointsOfInterest | ✓ | | | |
└ saturation | | ✓ | 60 ([657128](https://crbug.com/657128)) | |
└ sharpness | | ✓ | 60 ([657128](https://crbug.com/657128)) | |
└ tilt | | | | |
└ whiteBalanceMode | ✓ | ✓ | 60 ([657128](https://crbug.com/657128)) | |
└ zoom | ✓ | ✓ | 60 ([657128](https://crbug.com/657128)) | |

Expand Down
40 changes: 40 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,11 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for

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;
};
Expand Down Expand Up @@ -394,6 +396,9 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for
<dt><dfn dict-member for="MediaTrackSupportedConstraints"><code>contrast</code></dfn></dt>
<dd>Whether <a>contrast</a> constraining is recognized.</dd>

<dt><dfn dict-member for="MediaTrackSupportedConstraints"><code>pan</code></dfn></dt>
<dd>Whether <a>pan</a> constraining is recognized.</dd>

<dt><dfn dict-member for="MediaTrackSupportedConstraints"><code>saturation</code></dfn></dt>
<dd>Whether <a>saturation</a> constraining is recognized.</dd>

Expand All @@ -403,6 +408,9 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for
<dt><dfn dict-member for="MediaTrackSupportedConstraints"><code>focusDistance</code></dfn></dt>
<dd>Whether <a>focus distance</a> constraining is recognized.</dd>

<dt><dfn dict-member for="MediaTrackSupportedConstraints"><code>tilt</code></dfn></dt>
<dd>Whether <a>tilt</a> constraining is recognized.</dd>

<dt><dfn dict-member for="MediaTrackSupportedConstraints"><code>zoom</code></dfn></dt>
<dd>Whether configuration of the <a>zoom</a> level is recognized.</dd>

Expand Down Expand Up @@ -430,6 +438,8 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for
MediaSettingsRange sharpness;

MediaSettingsRange focusDistance;
MediaSettingsRange pan;
MediaSettingsRange tilt;
MediaSettingsRange zoom;

boolean torch;
Expand Down Expand Up @@ -463,6 +473,9 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for
<dt><dfn dict-member for="MediaTrackCapabilities"><code>contrast</code></dfn></dt>
<dd>This reflects the supported range of <a>contrast</a>. Values are numeric. Increasing values indicate increasing contrast.</dd>

<dt><dfn dict-member for="MediaTrackCapabilities"><code>pan</code></dfn></dt>
<dd>This reflects the <a>pan</a> value range supported by the UA.</dd>

<dt><dfn dict-member for="MediaTrackCapabilities"><code>saturation</code></dfn></dt>
<dd>This reflects the permitted range of <a>saturation</a> setting. Values are numeric. Increasing values indicate increasing saturation.</dd>

Expand All @@ -472,6 +485,9 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for
<dt><dfn dict-member for="MediaTrackCapabilities"><code>focusDistance</code></dfn></dt>
<dd>This reflects the <a>focus distance</a> value range supported by the UA.</dd>

<dt><dfn dict-member for="MediaTrackCapabilities"><code>tilt</code></dfn></dt>
<dd>This reflects the <a>tilt</a> value range supported by the UA.</dd>

<dt><dfn dict-member for="MediaTrackCapabilities"><code>zoom</code></dfn></dt>
<dd>This reflects the <a>zoom</a> value range supported by the UA.</dd>

Expand Down Expand Up @@ -504,6 +520,8 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for
ConstrainDouble sharpness;

ConstrainDouble focusDistance;
ConstrainDouble pan;
ConstrainDouble tilt;
ConstrainDouble zoom;

ConstrainBoolean torch;
Expand Down Expand Up @@ -540,6 +558,9 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for
<dt><dfn dict-member for="MediaTrackConstraintSet"><code>contrast</code></dfn></dt>
<dd>See <a>contrast</a> constrainable property.</dd>

<dt><dfn dict-member for="MediaTrackConstraintSet"><code>pan</code></dfn></dt>
<dd>See <a>pan</a> constrainable property.</dd>

<dt><dfn dict-member for="MediaTrackConstraintSet"><code>saturation</code></dfn></dt>
<dd>See <a>saturation</a> constrainable property.</dd>

Expand All @@ -549,6 +570,9 @@ This Section defines a number of new set of <a>Constrainable Properties</a> for
<dt><dfn dict-member for="MediaTrackConstraintSet"><code>focusDistance</code></dfn></dt>
<dd>See <a>focus distance</a> constrainable property.</dd>

<dt><dfn dict-member for="MediaTrackConstraintSet"><code>tilt</code></dfn></dt>
<dd>See <a>tilt</a> constrainable property.</dd>

<dt><dfn dict-member for="MediaTrackConstraintSet"><code>zoom</code></dfn></dt>
<dd>See <a>zoom</a> constrainable property.</dd>

Expand Down Expand Up @@ -577,6 +601,8 @@ When the {{getSettings()}} method is invoked on a video stream track, the user a
double sharpness;

double focusDistance;
double pan;
double tilt;
double zoom;

boolean torch;
Expand Down Expand Up @@ -613,6 +639,9 @@ When the {{getSettings()}} method is invoked on a video stream track, the user a
<dt><dfn dict-member for="MediaTrackSettings"><code>contrast</code></dfn></dt>
<dd>This reflects the current <a>contrast</a> setting of the camera.</dd>

<dt><dfn dict-member for="MediaTrackSettings"><code>pan</code></dfn></dt>
<dd>This reflects the current <a>pan</a> setting of the camera.</dd>

<dt><dfn dict-member for="MediaTrackSettings"><code>saturation</code></dfn></dt>
<dd>This reflects the current <a>saturation</a> setting of the camera.</dd>

Expand All @@ -622,6 +651,9 @@ When the {{getSettings()}} method is invoked on a video stream track, the user a
<dt><dfn dict-member for="MediaTrackSettings"><code>focusDistance</code></dfn></dt>
<dd>This reflects the current <a>focus distance</a> setting of the camera.</dd>

<dt><dfn dict-member for="MediaTrackSettings"><code>tilt</code></dfn></dt>
<dd>This reflects the current <a>tilt</a> setting of the camera.</dd>

<dt><dfn dict-member for="MediaTrackSettings"><code>zoom</code></dfn></dt>
<dd>This reflects the current <a>zoom</a> setting of the camera.</dd>

Expand Down Expand Up @@ -708,6 +740,14 @@ When the {{getSettings()}} method is invoked on a video stream track, the user a

<li><dfn>Focus distance</dfn> is a numeric camera setting that controls the focus distance of the lens. The setting usually represents distance in meters to the optimal focus distance.</li>

<li><dfn>Pan</dfn> is a numeric camera setting that controls the pan of the camera. The setting represents pan in arc seconds, which are 1/3600th of a degree. Values are in the range from –180*3600 arc seconds to +180*3600 arc seconds. Positive values pan the camera clockwise as viewed from above, and negative values pan the camera counter clockwise as viewed from above.</li>

<li><dfn>Tilt</dfn> is a numeric camera setting that controls the tilt of the camera. The setting represents tilt in arc seconds, which are 1/3600th of a degree. Values are in the range from –180*3600 arc seconds to +180*3600 arc seconds. Positive values tilt the camera upward when viewed from the front, and negative values tilt the camera downward as viewed from the front.

<div class="note">
There is no defined order when applying <a>pan</a> and <a>tilt</a>, the UA is allowed to apply them in any order. In practice this should not matter since these values are absolute, so order will not affect the final position. However, if applying pan and tilt is slow enough, the order in which they are applied may be visually noticeable.
</div></li>

<li><dfn>Zoom</dfn> is a numeric camera setting that controls the focal length of the lens. The setting usually represents a ratio, e.g. 4 is a zoom ratio of 4:1. The minimum value is usually 1, to represent a 1:1 ratio (i.e. no zoom).</li>

<li><dfn>Fill light mode</dfn> describes the flash setting of the capture device (e.g. |auto|, |off|, |on|). <dfn>Torch</dfn> describes the setting of the source's fill light as continuously connected, staying on as long as {{track}} is active.</li>
Expand Down