+++ This bug was initially created as a clone of Bug #905699 +++ +++ This bug was initially created as a clone of Bug #905696 +++ When implementing constraints for bug 882145, we'll need the UI to support being told that a specific device should be the default one shown to the user. No string or other changes should occur; it's solely changing the default from the first device to a specified one. API TBD in bug 882145. This bug is for B2G; it's especially useful on mobile devices for an app to specify 'front' or 'back' cameras as the default depending on the app in question.
Hi SC, can you handle this one? We need to pass the chosen camera(in media constrain) as default selected one in permission dialog
Bug 898949 is already filed for displaying available cameras in prompt UI. I suppose this bug should either modify this sequence of the available cameras or carry a default index for UI. I'll take this bug.
Assignee: nobody → schien
Depends on: 898949
1. Mapping front/back camera to user/environment facing mode. 2. Invoke GetUserMediaDevices() with MediaStreamConstraints.
Test page, "Video" for no constraints and "Front" for facingMode='user' http://people.mozilla.org/~schien/gum-test.html
Comment on attachment 802961 [details] [diff] [review] media-constraint-for-b2g.patch Review of attachment 802961 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/MediaPermissionGonk.cpp @@ +443,5 @@ > + JS::Rooted<JS::Value> temp(cx); > + rawConstraints.ToObject(cx, JS::NullPtr(), &temp); > + > + dom::RootedDictionary<dom::MediaStreamConstraintsInternal> constraints(cx); > + NS_ENSURE_TRUE(constraints.Init(cx, temp), NS_ERROR_FAILURE); GetConstraints() actually expects MediaStreamConstraintsInternal, not raw MediaStreamConstraints, so you should be able to pass in |constraints| here directly to GetConstraints() without going through rawConstraints or temp. The rest looks good, with the caveat that I still need bz to approve all this. :-)
Attachment #802961 - Flags: feedback?(jib) → feedback+
Attachment #802961 - Flags: feedback?(rjesup) → feedback+
Add the mapping of facing mode for Firefox OS. NOTE: bug 915705 already contains the modification for MediaStreamConstraints on Firefox OS.
Attachment #805000 - Flags: review?(rjesup) → review+
No longer depends on: 898949
Ready to land this code. https://tbpl.mozilla.org/?tree=Try&rev=87f65c82b47f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.