|
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/. */ |
|
4 |
|
5 #include "nsISupports.idl" |
|
6 #include "nsIVariant.idl" |
|
7 #include "nsIDOMMediaStream.idl" |
|
8 |
|
9 [scriptable, builtinclass, uuid(4af2bdb7-1547-4d10-8886-02a78c3c0b83)] |
|
10 interface nsIMediaDevice : nsISupports |
|
11 { |
|
12 readonly attribute DOMString type; |
|
13 readonly attribute DOMString name; |
|
14 readonly attribute DOMString id; |
|
15 readonly attribute DOMString facingMode; |
|
16 }; |
|
17 |
|
18 [scriptable, function, uuid(24544878-d35e-4962-8c5f-fb84e97bdfee)] |
|
19 interface nsIGetUserMediaDevicesSuccessCallback : nsISupports |
|
20 { |
|
21 void onSuccess(in nsIVariant devices); |
|
22 }; |
|
23 |
|
24 [scriptable, function, uuid(f2a144fc-3534-4761-8c5d-989ae720f89a)] |
|
25 interface nsIDOMGetUserMediaSuccessCallback : nsISupports |
|
26 { |
|
27 /* |
|
28 * value must be a nsIDOMBlob if picture is true and a |
|
29 * nsIDOMLocalMediaStream if either audio or video are true. |
|
30 */ |
|
31 void onSuccess(in nsISupports value); |
|
32 }; |
|
33 |
|
34 [scriptable, function, uuid(2614bbcf-85cc-43e5-8740-964f52bdc7ca)] |
|
35 interface nsIDOMGetUserMediaErrorCallback : nsISupports |
|
36 { |
|
37 void onError(in DOMString error); |
|
38 }; |