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"
8 interface nsIDOMWindow
;
9 interface nsIMediaDevice
;
12 #define NS_MEDIAMANAGERSERVICE_CID
{0xabc622ea, 0x9655, 0x4123, {0x80, 0xd9, 0x22, 0x62, 0x1b, 0xdd, 0x54, 0x65}}
13 #define MEDIAMANAGERSERVICE_CONTRACTID
"@mozilla.org/mediaManagerService;1"
16 [scriptable
, builtinclass
, uuid(24b23e01
-33fd
-401f
-ba25
-6e52658750b0
)]
17 interface nsIMediaManagerService
: nsISupports
19 /* return a array of inner windows that have active captures */
20 readonly attribute nsIArray activeMediaCaptureWindows
;
22 /* possible states for camera and microphone capture */
23 const unsigned short STATE_NOCAPTURE
= 0;
24 const unsigned short STATE_CAPTURE_ENABLED
= 1;
25 const unsigned short STATE_CAPTURE_DISABLED
= 2;
27 /* Get the capture state for the given window. This will not check
28 * descendants, such as iframes. Callers who need to check descendants should
29 * iterate descendants manually and call this on each.
31 void mediaCaptureWindowState
(in nsIDOMWindow aWindow
,
32 out unsigned short aCamera
,
33 out unsigned short aMicrophone
,
34 out unsigned short aScreenShare
,
35 out unsigned short aWindowShare
,
36 out unsigned short aBrowserShare
,
37 out Array
<nsIMediaDevice
> devices
);
39 /* Clear per-orgin list of persistent DeviceIds stored for enumerateDevices
40 sinceTime is milliseconds since 1 January 1970 00:00:00 UTC. 0 = clear all */
41 void sanitizeDeviceIds
(in long long sinceWhen
);