diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index d1017c98b12e777..ea5ae31875beb6a 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -7932,10 +7932,10 @@ /en-US/docs/Web/API/MediaRecorder/canRecordMimeType /en-US/docs/Web/API/MediaRecorder/isTypeSupported /en-US/docs/Web/API/MediaRecorder_API /en-US/docs/Web/API/MediaStream_Recording_API /en-US/docs/Web/API/MediaRecorder_API/Using_the_MediaRecorder_API /en-US/docs/Web/API/MediaStream_Recording_API/Using_the_MediaStream_Recording_API -/en-US/docs/Web/API/MediaSettingsRange /en-US/docs/Web/API/PhotoCapabilities/imageHeight -/en-US/docs/Web/API/MediaSettingsRange/max /en-US/docs/Web/API/PhotoCapabilities/imageHeight -/en-US/docs/Web/API/MediaSettingsRange/min /en-US/docs/Web/API/PhotoCapabilities/imageHeight -/en-US/docs/Web/API/MediaSettingsRange/step /en-US/docs/Web/API/PhotoCapabilities/imageHeight +/en-US/docs/Web/API/MediaSettingsRange /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities +/en-US/docs/Web/API/MediaSettingsRange/max /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities +/en-US/docs/Web/API/MediaSettingsRange/min /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities +/en-US/docs/Web/API/MediaSettingsRange/step /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities /en-US/docs/Web/API/MediaStream.addTrack /en-US/docs/Web/API/MediaStream/addTrack /en-US/docs/Web/API/MediaStream/MediaStream.getTracks() /en-US/docs/Web/API/MediaStream/getTracks /en-US/docs/Web/API/MediaStream/getTracks() /en-US/docs/Web/API/MediaStream/getTracks @@ -8286,6 +8286,11 @@ /en-US/docs/Web/API/PeriodicSyncManager/register() /en-US/docs/Web/API/PeriodicSyncManager/register /en-US/docs/Web/API/PeriodicSyncManager/unregister() /en-US/docs/Web/API/PeriodicSyncManager/unregister /en-US/docs/Web/API/PermissionStatus/status /en-US/docs/Web/API/PermissionStatus/state +/en-US/docs/Web/API/PhotoCapabilities /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities +/en-US/docs/Web/API/PhotoCapabilities/fillLightMode /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities +/en-US/docs/Web/API/PhotoCapabilities/imageHeight /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities +/en-US/docs/Web/API/PhotoCapabilities/imageWidth /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities +/en-US/docs/Web/API/PhotoCapabilities/redEyeReduction /en-US/docs/Web/API/ImageCapture/getPhotoCapabilities /en-US/docs/Web/API/PictureInPictureWindow/PictureInPictureWindow:_resize_event /en-US/docs/Web/API/PictureInPictureWindow/resize_event /en-US/docs/Web/API/Point /en-US/docs/Web/API/WebKitPoint /en-US/docs/Web/API/Position /en-US/docs/Web/API/GeolocationPosition diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index b3e8c6a96c7fe92..f67c110caed1fd3 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -68115,48 +68115,6 @@ "teoli" ] }, - "Web/API/PhotoCapabilities": { - "modified": "2020-10-15T21:55:37.658Z", - "contributors": [ - "caraitto", - "mfluehr", - "alattalatta", - "fscholz", - "jpmedley" - ] - }, - "Web/API/PhotoCapabilities/fillLightMode": { - "modified": "2020-10-15T21:55:47.774Z", - "contributors": [ - "alattalatta", - "fscholz", - "Dramloc", - "jpmedley" - ] - }, - "Web/API/PhotoCapabilities/imageHeight": { - "modified": "2020-10-15T21:55:38.110Z", - "contributors": [ - "fscholz", - "jpmedley" - ] - }, - "Web/API/PhotoCapabilities/imageWidth": { - "modified": "2020-10-15T21:55:40.085Z", - "contributors": [ - "MyNameIsBond", - "fscholz", - "jpmedley" - ] - }, - "Web/API/PhotoCapabilities/redEyeReduction": { - "modified": "2020-10-15T21:55:41.964Z", - "contributors": [ - "alattalatta", - "fscholz", - "jpmedley" - ] - }, "Web/API/Picture-in-Picture_API": { "modified": "2020-11-30T19:18:36.297Z", "contributors": [ diff --git a/files/en-us/web/api/imagecapture/getphotocapabilities/index.md b/files/en-us/web/api/imagecapture/getphotocapabilities/index.md index b41108666275cdc..dc14e7155a73fce 100644 --- a/files/en-us/web/api/imagecapture/getphotocapabilities/index.md +++ b/files/en-us/web/api/imagecapture/getphotocapabilities/index.md @@ -29,7 +29,15 @@ const capabilitiesPromise = imageCaptureObj.getPhotoCapabilities() ### Return value -A {{jsxref("Promise")}} that resolves with a {{domxref("PhotoCapabilities")}} object. +A {{jsxref("Promise")}} that resolves with an object containing the following properties: +- `redEyeReduction` + - : Returns one of `"never"`, `"always"`, or `"controllable"`. The `"controllable"` value means the device's red-eye reduction is controllable by the user. +- `imageHeight` + - : Returns an object indicating the image height range supported by the user agent. +- `imageWidth` + - : Returns an object indicating the image width range supported by the user agent. +- `fillLightMode` + - : Returns an array of available fill light options. Options include `auto`, `off`, or `flash`. ## Example diff --git a/files/en-us/web/api/photocapabilities/filllightmode/index.md b/files/en-us/web/api/photocapabilities/filllightmode/index.md deleted file mode 100644 index 64eab1e100fe887..000000000000000 --- a/files/en-us/web/api/photocapabilities/filllightmode/index.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: PhotoCapabilities.fillLightMode -slug: Web/API/PhotoCapabilities/fillLightMode -tags: - - API - - Experimental - - Image - - Image Capture - - Media - - MediaStream Image Capture API - - PhotoCapabilities - - Property - - Read-only - - Reference -browser-compat: api.PhotoCapabilities.fillLightMode ---- -{{APIRef("MediaStream Image")}} - -The **`fillLightMode`** read-only -property of the {{domxref("PhotoCapabilities")}} interface returns all available -fill light options of the source device. - -Options may include -`auto`, `off`, or `flash`. - -## Syntax - -```js -const lightModes = photoCapabilities.fillLightMode -``` - -### Value - -An {{jsxref("Array")}} of available fill light modes. - -- `auto` - - : The device's fill light will be used automatically in low light conditions. -- `off` - - : No fill light will be used. -- `flash` - - : Always use the device's fill light. - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} diff --git a/files/en-us/web/api/photocapabilities/imageheight/index.md b/files/en-us/web/api/photocapabilities/imageheight/index.md deleted file mode 100644 index 764dec7c6ddf6ee..000000000000000 --- a/files/en-us/web/api/photocapabilities/imageheight/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: PhotoCapabilities.imageHeight -slug: Web/API/PhotoCapabilities/imageHeight -tags: - - API - - Experimental - - Image - - Image Capture - - Media - - MediaStream Image Capture API - - PhotoCapabilities - - Property - - Reference -browser-compat: api.PhotoCapabilities.imageHeight ---- -{{SeeCompatTable}}{{APIRef("MediaStream Image")}} - -The **`imageHeight`** read-only property of the {{domxref("PhotoCapabilities")}} interface returns an object indicating the image height range supported by the user agent. - -## Value - -An object containing the following properties: - -- `max` - - : The maximum value of this setting. -- `min` - - : The minimum value of this setting. -- `step` - - : The minimum difference between consecutive values of this setting. - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} diff --git a/files/en-us/web/api/photocapabilities/imagewidth/index.md b/files/en-us/web/api/photocapabilities/imagewidth/index.md deleted file mode 100644 index dc1d851939dd19d..000000000000000 --- a/files/en-us/web/api/photocapabilities/imagewidth/index.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: PhotoCapabilities.imageWidth -slug: Web/API/PhotoCapabilities/imageWidth -tags: - - API - - Experimental - - Image - - Image Capture - - Media - - MediaStream Image Capture API - - PhotoCapabilities - - Property - - Reference -browser-compat: api.PhotoCapabilities.imageWidth ---- -{{SeeCompatTable}}{{APIRef("MediaStream Image")}} - -The **`imageWidth`** read-only property of the {{domxref("PhotoCapabilities")}} interface returns an object indicating the image width range supported by the user agent. - -## Value - -An object containing the following properties: - -- `max` - - : The maximum value of this setting. -- `min` - - : The minimum value of this setting. -- `step` - - : The minimum difference between consecutive values of this setting. - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} diff --git a/files/en-us/web/api/photocapabilities/index.md b/files/en-us/web/api/photocapabilities/index.md deleted file mode 100644 index 48be437d0286511..000000000000000 --- a/files/en-us/web/api/photocapabilities/index.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: PhotoCapabilities -slug: Web/API/PhotoCapabilities -tags: - - API - - Experimental - - Image - - Image Capture - - Interface - - Media - - MediaStream Image Capture API - - PhotoCapabilities - - Reference -browser-compat: api.PhotoCapabilities ---- -{{APIRef("MediaStream Image")}} - -The **`PhotoCapabilities`** interface of the [MediaStream Image Capture API](/en-US/docs/Web/API/MediaStream_Image_Capture_API) provides available configuration options for an attached photographic device. A `PhotoCapabilities` object is retrieved by calling {{domxref("ImageCapture.getPhotoCapabilities()")}}. - -## Properties - -- {{domxref("PhotoCapabilities.redEyeReduction")}} {{readonlyinline}} - - : Returns one of `"never"`, `"always"`, or `"controllable"`. The `"controllable"` value means the device's red-eye reduction is controllable by the user. -- {{domxref("PhotoCapabilities.imageHeight")}} {{readonlyinline}} - - : Returns an object indicating the image height range supported by the user agent. -- {{domxref("PhotoCapabilities.imageWidth")}} {{readonlyinline}} - - : Returns an object indicating the image width range supported by the user agent. -- {{domxref("PhotoCapabilities.fillLightMode")}} {{readonlyinline}} - - : Returns an array of available fill light options. Options may include `auto`, `off`, or `flash`. - -## Example - -The following example, extracted from [Chrome's Image Capture / Photo Resolution Sample](https://googlechrome.github.io/samples/image-capture/photo-resolution.html), uses the results from {{domxref("ImageCapture.getPhotoCapabilities()", "getPhotoCapabilities()")}} to modify the size of an input range. This example also shows how the {{domxref("ImageCapture")}} object is created using a {{domxref("MediaStreamTrack")}} retrieved from a device's {{domxref("MediaStream")}}. - -```js -const input = document.querySelector('input[type="range"]'); - -var imageCapture; - -navigator.mediaDevices.getUserMedia({video: true}) -.then(mediaStream => { - document.querySelector('video').srcObject = mediaStream; - - const track = mediaStream.getVideoTracks()[0]; - imageCapture = new ImageCapture(track); - - return imageCapture.getPhotoCapabilities(); -}) -.then(photoCapabilities => { - const settings = imageCapture.track.getSettings(); - - input.min = photoCapabilities.imageWidth.min; - input.max = photoCapabilities.imageWidth.max; - input.step = photoCapabilities.imageWidth.step; - - return imageCapture.getPhotoSettings(); -}) -.then(photoSettings => { - input.value = photoSettings.imageWidth; -}) -.catch(error => console.log('Argh!', error.name || error)); -``` - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} diff --git a/files/en-us/web/api/photocapabilities/redeyereduction/index.md b/files/en-us/web/api/photocapabilities/redeyereduction/index.md deleted file mode 100644 index 2c5faa418174daa..000000000000000 --- a/files/en-us/web/api/photocapabilities/redeyereduction/index.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: PhotoCapabilities.redEyeReduction -slug: Web/API/PhotoCapabilities/redEyeReduction -tags: - - API - - Experimental - - Image - - Image Capture - - Media - - MediaStream Image Capture API - - PhotoCapabilities - - Property - - Read-only - - Reference -browser-compat: api.PhotoCapabilities.redEyeReduction ---- -{{APIRef("MediaStream Image")}} - -The **`redEyeReduction`** read-only property of the -{{domxref("PhotoCapabilities")}} interface returns an enum indicating the red-eye -reduction capability of the source. - -## Syntax - -```js -const redEyeReduction = photoCapabilities.redEyeReduction -``` - -### Value - -One of `"never"`, `"always"`, or `"controllable"`. - -- `never` - - : Red-eye reduction is not available. -- `always` - - : Red-eye reduction is available in the source and it is always turned on. -- `controllable` - - : Red-eye reduction is available in the source and it is configurable via the - {{domxref("PhotoSettings")}} object. - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}}