Changes

Jump to: navigation, search

Media/getUserMedia

22 bytes added, 23:14, 10 January 2013
Total rewrite; still needs more work
= getUserMedia Implementation Roadmap =
== Goal ==
* Need Define and implement navigator.getUserMedia with the W3C's WebRTC WG and Media Capture Task Force* Current editor's draft: [http://dev.w3.org/2011/webrtc/editor/getusermedia.html| W3 getUserMedia Editor's Draft]* Scenarios: [https://wikidvcs.mozillaw3.org/Mediahg/dap/raw-file/getUserMediatip/Desktop_gUM_UI UI for desktop] media-stream- Donecapture/scenarios.html| W3 MediaStream Capture Scenarios]
== Status ==* Implement getUserMedia on Desktop, then Android, then B2G -- Implemented on Desktop(Windows, Mac and Linux), defaults to enabled in FF20 and FF21** Currently prefixed as mozGetUserMedia() since the spec is still in flux** For FF19 and FF18, you need to set <b><tt>media.navigator.enabled</tt></b> to true, or <tt><b> media.peerconnection.enabled</b></tt> to true.* Permissions UI is supported, allowing selecting a device or rejecting permission, with notifications that a tab is using a mic or camera, and a global dropdown of all tabs using mics/cameras.* Persistent permissions are not yet supported* Explicit revocation of permission currently requires navigating away or closing the tab.* Supports multiple tabs getting data from the same mic or camera (if the user allows)* Capture resolution currently fixed to 640x480 for video; 16000Hz for audio* No echo cancellation is turned on in getUserMedia, so connecting an captured audio stream to an audio element may cause feedback
* Needed Minimal constraints supported: (Note: all of these booleans default to unblock WebRTC'false')<pre> video: true/false audio: true/false fake: true/false picture: true/false</pre>
* Includes the following uses of getUserMediaExample use in FF:
<pre>
getUserMediamozGetUserMedia({picture: true}, onsuccess(Blob blob), onerror);
getUserMediamozGetUserMedia({video: true, audio: true}, function (MediaStream stream) { video.mozSrcObject = stream; }, function (err) { dump("mozGetUserMedia error: " + err); } );
</pre>
* Appropriate permission, notification and status UIs. - done == Phase 1 == * Implement image capture {picture:true} API** AndroidDemos: {{bug|738528}} [Anant]** B2G: {{bug|749886}} [Fabrice] * Define common abstraction "MediaEngine" for device access across multiple platforms.** Cross-platform: {{bug|750943}} [Suhas/Anant]*** (crypt's version in {{bug|739566}})  * Define "chrome" extensions to MediaStreams for privileged JS code (and B2G's) use. This includes CameraControl features (httpshttp://wiki.mozilla.org/WebAPI/CameraControl)github.** B2G: {{bug|752352}} [Fabrice] * Implement a fallback backend for MediaEngine (when hardware support not available, returnMediaStream with white noise, for example).** Cross-platform: {{bug|752351}} [Anant] * 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: **** Cross-platform: {{bug|759908}} * Implement MediaEngine backend ** B2G: {{bug|740997}} [Fabrice] (based on Gonk) == 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 NDKcom/SDK, or, webrtc.org code).** Desktop: {{bug|691234}} [Anant] (based on webrtc.org code). * Implement image capture {picture:true} API** Desktop: {{bug|749887}} [???]*** ({{bug|692955}} tracking <input> on Desktop, reuse possible. {{bug|748835}} tracking UI). == Phase 3 ==* Implement permissions, notification & status UI** Android: {{bug|749881}} ** B2G: {{bug|749882}} ** Desktop: {{bug|729522}} and {{bug-landing|748835}} -- since the camera/mic UI for WebRTC and Camera API are becoming almost the same, these bugs may now be duplicates [???demos including mozGetUserMediaOnce UI lands, getUserMedia may be pref'ed on.
== Phase 4 and beyond Differences from Chrome webkitGetUserMedia() ==Includes, but not limited to:* Implement file backend Name :-)* Firefox leaves the mic/camera active (light on, etc) until the application explicitly calls mediastream.stop(). Chrome turns them on when assigned to a media element or PeerConnection, and off again when removed.** Note that if an application drops all references to a MediaStream but does not call stop(), the camera will remain active for MediaEnginesome period of time (or until you navigate to another page in the tab or close the tab).* Refactor getUserMedia{picture:true} implementations * This behavior may change in the future* Both now support window.URL.createObjectURL(stream), though Mozilla recommends against using it unless you have to use MediaEngine + privileged MediaStreams and CameraControl APIs. We expect Chrome to support srcObject = stream soon (perhaps prefixed as we are currently)* **This list needs to be expanded**
Confirm
325
edits

Navigation menu