From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../web/api/cameracontrol/autofocus/index.html | 61 ------------ files/pt-br/web/api/cameracontrol/index.html | 108 --------------------- files/pt-br/web/api/devicestorage.get/index.html | 58 ----------- .../web/api/devicestorage.onchange/index.html | 30 ------ 4 files changed, 257 deletions(-) delete mode 100644 files/pt-br/web/api/cameracontrol/autofocus/index.html delete mode 100644 files/pt-br/web/api/cameracontrol/index.html delete mode 100644 files/pt-br/web/api/devicestorage.get/index.html delete mode 100644 files/pt-br/web/api/devicestorage.onchange/index.html (limited to 'files/pt-br/web/api') diff --git a/files/pt-br/web/api/cameracontrol/autofocus/index.html b/files/pt-br/web/api/cameracontrol/autofocus/index.html deleted file mode 100644 index 1ce3b547d3..0000000000 --- a/files/pt-br/web/api/cameracontrol/autofocus/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: CameraControl.autoFocus() -slug: Web/API/CameraControl/autoFocus -translation_of: Archive/B2G_OS/API/CameraControl/autoFocus ---- -

{{APIRef("Camera API")}}{{ non-standard_header() }}{{B2GOnlyHeader2('privileged')}}

- -

Resumo

- -

This method attempts to focus the camera. If the camera is able to attempt to focus, a success callback is issued, regardless of whether or not the focusing attempt succeeds. If unable to attempt to focus, an error callback is performed instead.

- -

The success or failure of the focus operation is indicated by the value of a parameter passed into the callback function.

- -

Sintaxe

- -
CameraControl.autoFocus(onsuccess[, onerror]);
- -

Parametros

- -
-
onsuccess
-
A callback function called when a focus attempt is made
-
onerror {{optional_inline()}}
-
An optional callback function that accepts an error string as an input parameter; this is called if it's not possible to attempt to focus the camera.
-
- -

Exemplo

- -
function onFocusPossible( success ) {
-  if ( success ) {
-    console.log("The image has been focused");
-  } else {
-    console.log("The image has not been focused");
-  }
-}
-
-function onFocusNotPossible( error ) {
-  console.log("The camera is not able to focus anything");
-  console.log( error );
-}
-
-function onAccessCamera( camera ) {
-  camera.autoFocus(onFocusPossible, onFocusNotPossible);
-};
-
-var options = {
-  camera: navigator.mozCameras.getListOfCameras()[0]
-};
-
-navigator.mozCameras.getCamera(options, onAccessCamera)
-
- -

Especificações

- -

Not part of any specification; however, this API should be removed when the WebRTC Capture and Stream API has been implemented.

- -

Leia mais

- - diff --git a/files/pt-br/web/api/cameracontrol/index.html b/files/pt-br/web/api/cameracontrol/index.html deleted file mode 100644 index e0b5bdd2c0..0000000000 --- a/files/pt-br/web/api/cameracontrol/index.html +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: CameraControl -slug: Web/API/CameraControl -tags: - - API - - B2G - - DOM - - DOM Reference - - Firefox OS - - Graphics - - JavaScript - - NeedsTranslation - - Non-standard - - Reference - - TopicStub - - WebAPI - - camera -translation_of: Archive/B2G_OS/API/CameraControl ---- -

{{APIRef("Camera API")}}

- -

{{ non-standard_header() }}

- -

{{B2GOnlyHeader2('privileged')}}

- -

When you use the {{domxref("CameraManager.getCamera()")}} method to get a reference to a camera, you specify a callback function to be invoked on success. That function receives as a parameter a CameraControl object. You can use its methods and properties to manage and make use of the camera.

- -

Properties

- -
-
{{domxref("CameraControl.capabilities")}} {{readonlyinline}}
-
A {{domxref("CameraCapabilities")}} object indicating all the capabilities for the given camera.
-
{{domxref("CameraControl.effect")}}
-
A string defining the effect to be used by the camera (none by default). Its value must be one of the values available in {{domxref("CameraCapabilities.effects")}}.
-
{{domxref("CameraControl.exposureCompensation")}} {{readonlyinline}}
-
A value used to compensate the camera exposure. This attribute is read-only; to change the exposure, you need to call the {{domxref("CameraControl.setExposureCompensation()")}} method.
-
{{domxref("CameraControl.flashMode")}}
-
A string that defines how the flash, if any, is to be used; this is auto by default if the device has a flash, none otherwise. When set, its value must be chosen from the list of options specified by  {{domxref("CameraCapabilities.flashModes")}}.
-
{{domxref("CameraControl.focalLength")}} {{readonlyinline}}
-
A number that express the camera's focal length in millimeters.
-
{{domxref("CameraControl.focusAreas")}}
-
An Array of one or more objects that define where the camera will perform auto-focusing.
-
{{domxref("CameraControl.focusDistanceFar")}} {{readonlyinline}}
-
This value is a distance in meter used with {{domxref("CameraControl.focusDistanceNear")}} to defined the image's depth of field. The value for this property may be Infinity.
-
{{domxref("CameraControl.focusDistanceNear")}} {{readonlyinline}}
-
This value is a distance in meter used with {{domxref("CameraControl.focusDistanceFar")}} to defined the image's depth of field.
-
{{domxref("CameraControl.focusDistanceOptimum")}} {{readonlyinline}}
-
This value is a distance in meter where the subject will appear sharpest.
-
{{domxref("CameraControl.focusMode")}}
-
A string that defines which kind of focus mode the camera should use (auto or fixed by default). Its value must be chosen from {{domxref("CameraCapabilities.focusModes")}}.
-
{{domxref("CameraControl.meteringAreas")}}
-
An Array of one or more objects that define where the camera will perform auto-focusing.
-
{{domxref("CameraControl.onShutter")}}
-
A handler for the camera's "shutter" event, to trigger a shutter sound and/or a visual shutter indicator.
-
{{domxref("CameraControl.onClosed")}}
-
A handler called when a new CameraControl object in the same app takes over the camera.
-
{{domxref("CameraControl.onRecorderStateChange")}}
-
A function to call when the recorder changes state, either because the recording process encountered an error, or because one of the recording limits (see {{domxref("CameraControl.startRecording()")}}) was reached.
-
{{domxref("CameraControl.sceneMode")}}
-
A string that defines which scene mode the camera is to use (auto by default). Its value must be chosen from {{domxref("CameraCapabilities.sceneModes")}}.
-
{{domxref("CameraControl.whiteBalanceMode")}}
-
A string that defines which white balance mode the camera is to use (auto by default). Its value must be chosen from {{domxref("CameraCapabilities.whiteBalanceModes")}}.
-
{{domxref("CameraControl.zoom")}}
-
A number that defines which kind of zoom factor mode the camera is to use (1 by default). Its value must be chosen from {{domxref("CameraCapabilities.zoomRatios")}}.
-
- -

Methods

- -
-
{{ domxref("CameraControl.autoFocus()") }}
-
Tells the camera to attempt to focus the image.
-
{{ domxref("CameraControl.getPreviewStream()") }}
-
Gets a video stream from the camera; you can use this in an arbitrary context.
-
{{ domxref("CameraControl.getPreviewStreamVideoMode()") }}
-
Gets a video stream from the camera based on a specific video mode.
-
{{ domxref("CameraControl.release()") }}
-
Releases the camera so that other applications can use it.
-
{{ domxref("CameraControl.resumePreview()") }}
-
Resumes the preview video stream after it's been paused by a call to {{domxref("CameraControl.takePicture()")}}.
-
{{ domxref("CameraControl.setExposureCompensation()") }}
-
Lets you specify the exposure compensation factor.
-
{{ domxref("CameraControl.startRecording()") }}
-
Lets you start recording a video stream.
-
{{ domxref("CameraControl.stopRecording()") }}
-
Lets you stop recording a video stream.
-
{{ domxref("CameraControl.pauseRecording()") }}
-
Pauses the recording of a video stream.
-
{{ domxref("CameraControl.resumeRecording()") }}
-
Resumes the recording of a video stream that has previously been paused.
-
{{ domxref("CameraControl.takePicture()") }}
-
Lets you capture a single image, receiving it as a {{domxref("Blob")}}.
-
- -

Specification

- -

{{page("/en-US/docs/Web/API/Navigator.MozCameras","Specification")}}

- -

Permissions

- -

{{page("/en-US/docs/Web/API/Navigator.MozCameras","Permissions")}}

- -

See also

- - diff --git a/files/pt-br/web/api/devicestorage.get/index.html b/files/pt-br/web/api/devicestorage.get/index.html deleted file mode 100644 index 9258c4da29..0000000000 --- a/files/pt-br/web/api/devicestorage.get/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: DeviceStorage.get -slug: Web/API/DeviceStorage.get -tags: - - API - - B2G - - Device Storage - - Firefox OS - - Method - - Non Standard - - Non-standard - - Não Padrão - - Reference - - Referencia - - WebAPI - - metodo -translation_of: Archive/B2G_OS/API/DeviceStorage/get ---- -

{{ non-standard_header() }}

-

{{ B2GOnlyHeader2('privileged') }}

-

Sumário

-

O metodo get é usado para obter um arquivo somente-leitura de uma dada área de armazenamento.

-

Caso o pedido seja bem-sucedido, o resultado do pedido result é um objeto {{domxref("File")}} contendo os dados do arquivo original do dispositivo.

-

Sintaxe

-
var instanciaDeDOMRequest = instanciaDeDeviceStorage.get(nomeDoArquivo);
-

Parametros

-
-
- nomeDoArquivo
-
- Uma string representando o nome completo (caminho + nome do arquivo) do arquivo a ser obtido.
-
-

Retorno

-

Retorna um objeto {{domxref("DOMRequest")}} para manipular o sucesso ou o erro da operação.

-

Exemplo

-
var sdcard = navigator.getDeviceStorage("sdcard");
-
-var pedido = sdcard.get("meuArquivo.txt");
-
-pedido.onsuccess = function () {
-  var name = this.result.name;
-  console.log('O arquivo "' + name + '" foi obtido com sucesso da área de armazenamento do sdcard');
-}
-
-request.onerror = function () {
-  console.warn('Nao foi possivel obter o arquivo: ' + this.error);
-}
-
-

Especificação

-

Não é parte de nenhuma especificação.

-

Veja também

- diff --git a/files/pt-br/web/api/devicestorage.onchange/index.html b/files/pt-br/web/api/devicestorage.onchange/index.html deleted file mode 100644 index 1b1b1db375..0000000000 --- a/files/pt-br/web/api/devicestorage.onchange/index.html +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: DeviceStorage.onchange -slug: Web/API/DeviceStorage.onchange -translation_of: Archive/B2G_OS/API/DeviceStorage/onchange ---- -

{{ ApiRef() }}

-

{{ non-standard_header() }}

-

{{ B2GOnlyHeader2('privileged') }}

-

Resumo

-

A propriedade onchange é usado para especificar um manuseador de eventos para receber eventos {{event("change")}}. Estes eventos são disparados cada vez que um arquivo é criado, modificado ou excluído na area de armazenamento.

-

Sintaxe

-
instanceOfDeviceStorage.onchange = funcRef
-

Onde funcRef é uma função para ser chamada quando o evento {{event("change")}} ocorre. Estes eventos são do tipo {{domxref("DeviceStorageChangeEvent")}}.

-

Exemplo

-
var sdcard = navigator.getDeviceStorage('sdcard');
-
-sdcard.onchange = function (change) {
-  var reason = change.reason;
-  var path   = change.path;
-
-  console.log('O arquivo "' + path + '" foi ' + reason);
-}
-

Especificação

-

Não faz parte de qualquer especificação.

-

Veja também

- -- cgit v1.2.3-54-g00ecf