dom/webidl/CameraManager.webidl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* vim: set ts=2 et sw=2 tw=80: */
michael@0 3 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 5 * You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6 */
michael@0 7
michael@0 8 enum CameraMode { "picture", "video" };
michael@0 9
michael@0 10 /* Used for the dimensions of a captured picture,
michael@0 11 a preview stream, a video capture stream, etc. */
michael@0 12 dictionary CameraSize
michael@0 13 {
michael@0 14 unsigned long width = 0;
michael@0 15 unsigned long height = 0;
michael@0 16 };
michael@0 17
michael@0 18 /* Pre-emptive camera configuration options. */
michael@0 19 dictionary CameraConfiguration
michael@0 20 {
michael@0 21 CameraMode mode = "picture";
michael@0 22 CameraSize previewSize = null;
michael@0 23 DOMString recorderProfile = "cif"; // or some other recording profile
michael@0 24 // supported by the CameraControl
michael@0 25 };
michael@0 26
michael@0 27 callback CameraErrorCallback = void (DOMString error);
michael@0 28
michael@0 29 callback GetCameraCallback = void (CameraControl camera,
michael@0 30 CameraConfiguration configuration);
michael@0 31
michael@0 32 [Func="nsDOMCameraManager::HasSupport"]
michael@0 33 interface CameraManager
michael@0 34 {
michael@0 35 /* get a camera instance; 'camera' is one of the camera
michael@0 36 identifiers returned by getListOfCameras() below.
michael@0 37 */
michael@0 38 [Throws]
michael@0 39 void getCamera(DOMString camera,
michael@0 40 CameraConfiguration initialConfiguration,
michael@0 41 GetCameraCallback callback,
michael@0 42 optional CameraErrorCallback errorCallback);
michael@0 43
michael@0 44 /* return an array of camera identifiers, e.g.
michael@0 45 [ "front", "back" ]
michael@0 46 */
michael@0 47 [Throws]
michael@0 48 sequence<DOMString> getListOfCameras();
michael@0 49 };

mercurial