Media/getUserMedia: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 6: Line 6:
* Needed to unblock WebRTC
* Needed to unblock WebRTC


* Need [https://wiki.mozilla.org/Media/getUserMedia/Desktop_gUM_UI| UI for desktop]
* Need [https://wiki.mozilla.org/Media/getUserMedia/Desktop_gUM_UI UI for desktop]


* Includes the following uses of getUserMedia:
* Includes the following uses of getUserMedia:

Revision as of 16:11, 18 October 2012

getUserMedia Implementation Roadmap

Goal

  • Implement getUserMedia on Desktop, then Android, then B2G
  • Needed to unblock WebRTC
  • Includes the following uses of getUserMedia:
  getUserMedia({picture:true}, onsuccess(Blob blob), onerror);
  getUserMedia({video:true,audio:true}, onsuccess(MediaStream stream), onerror);
  video.src = stream;
  audio.src = stream;
  • Appropriate permission, notification and status UIs.

Phase 1

  • Define common abstraction "MediaEngine" for device access across multiple platforms.
  • Implement a fallback backend for MediaEngine (when hardware support not available, returnMediaStream with white noise, for example).
  • Write DOM bindings for getUserMedia (backed with Fallback MediaEngine).
    • Cross-platform: bug 752353 [Anant]
      • (split code from bug 691234 into this one)
      • Dependent on MediaStreams need Notify callbacks:
  • Implement MediaEngine backend

Phase 2

  • Define "chrome" extensions to MediaStreams for privileged JS code use. This includes CameraControl features .
    • Android and Desktop: bug(s) to be created
  • Implement MediaEngine backends:
    • Android: bug ??? (either based on Android NDK/SDK, or, webrtc.org code).
    • Desktop: bug 691234 [Anant] (based on webrtc.org code).
  • Implement image capture {picture:true} API

Phase 3

  • Implement permissions, notification & status UI

Once UI lands, getUserMedia may be pref'ed on.

Phase 4 and beyond

  • Implement file backend for MediaEngine.
  • Refactor getUserMedia{picture:true} implementations to use MediaEngine + privileged MediaStreams and CameraControl APIs.