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