nsIDOMNavigatorUserMedia.idl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #include "nsISupports.idl"
  5. #include "nsIVariant.idl"
  6. [scriptable, builtinclass, uuid(ba3b2e08-1c07-4cd3-8822-f4d7e35ff2ae)]
  7. interface nsIMediaDevice : nsISupports
  8. {
  9. readonly attribute DOMString type;
  10. readonly attribute DOMString name;
  11. readonly attribute DOMString id;
  12. readonly attribute DOMString mediaSource;
  13. readonly attribute DOMString rawId;
  14. readonly attribute boolean scary;
  15. };
  16. [scriptable, function, uuid(24544878-d35e-4962-8c5f-fb84e97bdfee)]
  17. interface nsIGetUserMediaDevicesSuccessCallback : nsISupports
  18. {
  19. void onSuccess(in nsIVariant devices);
  20. };
  21. [scriptable, function, uuid(f2a144fc-3534-4761-8c5d-989ae720f89a)]
  22. interface nsIDOMGetUserMediaSuccessCallback : nsISupports
  23. {
  24. /*
  25. * value must be a nsIDOMBlob if picture is true and a
  26. * DOMLocalMediaStream if either audio or video are true.
  27. */
  28. void onSuccess(in nsISupports value);
  29. };
  30. [scriptable, function, uuid(39e96c61-2636-4f0e-918e-9bb64276492a)]
  31. interface nsIDOMGetUserMediaErrorCallback : nsISupports
  32. {
  33. void onError(in nsISupports error);
  34. };