Media/getUserMedia Roadmap

From MozillaWiki
Jump to: navigation, search

getUserMedia Implementation Roadmap

Moved here from Media/getUserMedia; much of this page is out-of-date.

Goal

  • Implement getUserMedia on Desktop, then Android, then B2G -- Implemented on Desktop, defaults to enabled in FF20 and FF21
  • Needed to unblock WebRTC
  • Includes the following uses of getUserMedia:
  getUserMedia({picture: true}, onsuccess(Blob blob), onerror);

  getUserMedia({video: true, audio: true}, 
               function (MediaStream stream) { video.mozSrcObject = stream; },
               function (err) { dump("mozGetUserMedia error: " + err); } );
  • Appropriate permission, notification and status UIs. - done

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.