blob: 8095699cd21c103695e3f7ba994324ecdd1b3df2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Webcam Private API.
namespace webcamPrivate {
enum PanDirection { stop, right, left };
enum TiltDirection { stop, up, down };
enum Protocol { visca };
dictionary ProtocolConfiguration {
Protocol? protocol;
};
dictionary WebcamConfiguration {
double? pan;
double? panSpeed;
PanDirection? panDirection;
double? tilt;
double? tiltSpeed;
TiltDirection? tiltDirection;
double? zoom;
};
callback WebcamIdCallback = void(DOMString webcamId);
callback WebcamConfigurationCallback =
void(WebcamConfiguration configuration);
interface Functions {
// Open a serial port that controls a webcam.
static void openSerialWebcam(DOMString path, ProtocolConfiguration protocol,
WebcamIdCallback callback);
// Close a serial port connection to a webcam.
static void closeWebcam(DOMString webcamId);
static void get(DOMString webcamId, WebcamConfigurationCallback callback);
static void set(DOMString webcamId, WebcamConfiguration config);
// Reset a webcam. Note: the value of the parameter have no effect, it's the
// presence of the parameter that matters. E.g.: reset(webcamId, {pan: 0,
// tilt: 1}); will reset pan & tilt, but not zoom.
static void reset(DOMString webcamId, WebcamConfiguration config);
};
};
|