Bug 1824856 - migrate android build-bundle tasks from firefox-android. r=bhearsum...
[gecko.git] / dom / media / nsIMediaManager.idl
blob68334b2e6af22c3b6d030ee992cbecf9fdc28845
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 interface nsIArray;
8 interface nsIDOMWindow;
9 interface nsIMediaDevice;
11 [scriptable, builtinclass, uuid(24b23e01-33fd-401f-ba25-6e52658750b0)]
12 interface nsIMediaManagerService : nsISupports
14 /* return a array of inner windows that have active captures */
15 readonly attribute nsIArray activeMediaCaptureWindows;
17 /* possible states for camera and microphone capture */
18 const unsigned short STATE_NOCAPTURE = 0;
19 const unsigned short STATE_CAPTURE_ENABLED = 1;
20 const unsigned short STATE_CAPTURE_DISABLED = 2;
22 /* Get the capture state for the given window. This will not check
23 * descendants, such as iframes. Callers who need to check descendants should
24 * iterate descendants manually and call this on each.
26 void mediaCaptureWindowState(in nsIDOMWindow aWindow,
27 out unsigned short aCamera,
28 out unsigned short aMicrophone,
29 out unsigned short aScreenShare,
30 out unsigned short aWindowShare,
31 out unsigned short aBrowserShare,
32 out Array<nsIMediaDevice> devices);
34 /* Clear per-orgin list of persistent DeviceIds stored for enumerateDevices
35 sinceTime is milliseconds since 1 January 1970 00:00:00 UTC. 0 = clear all */
36 void sanitizeDeviceIds(in long long sinceWhen);