Update HTML Media Capture implementation. |
||||||||
Issue descriptionChrome Version: 58.0.3015 OS: android What steps will reproduce the problem? The current implementation in Blink reflects an old version of the spec and needs to be updated. @capture attribute was a boolean, now it is an enum. Spec changes: https://github.com/w3c/html-media-capture/issues/4 What is the expected result? - What happens instead? -
,
Mar 6 2017
I am putting up a WIP CL full of Logs here (https://codereview.chromium.org/2735633004). adb logcat output is here(https://gist.github.com/riju/4138c153ab54e9a6c3c9cff892bb0dd1) and a shorter one here(https://gist.github.com/riju/569b238223e20a02be32a1c72086f7fb). My device is running "android version release = 6.0; sdkVersion: 23" camera.putExtra("android.intent.extra.USE_FRONT_CAMERA", true); or camera.putExtra("android.intent.extras.LENS_FACING_FRONT", 1); or camera.putExtra("android.intent.extras.CAMERA_FACING", Camera.CameraInfo.CAMERA_FACING_FRONT); did not have the desired effect, so tried to loop through all cameras and find the front facing one, and open the camera using -> manager.openCamera(mCameraId, mStateCallback, null) I get that Front camera is cameraID=1, still Camera always opens facing that side it was facing, when it was closed last time. Is there is a preferred way to open the camera facing front ?
,
Mar 6 2017
,
Mar 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/13d368e40bd49f076abb109ea3c875215098f744 commit 13d368e40bd49f076abb109ea3c875215098f744 Author: mcasas <mcasas@chromium.org> Date: Tue Mar 07 22:12:26 2017 Add [Measure] to HTMLInputElement |capture| To follow up usage before and after latest update to the http://www.w3.org/TR/html-media-capture/ spec. BUG= 698853 Review-Url: https://codereview.chromium.org/2735893002 Cr-Commit-Position: refs/heads/master@{#455243} [modify] https://crrev.com/13d368e40bd49f076abb109ea3c875215098f744/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/13d368e40bd49f076abb109ea3c875215098f744/third_party/WebKit/Source/core/html/HTMLInputElement.idl [modify] https://crrev.com/13d368e40bd49f076abb109ea3c875215098f744/tools/metrics/histograms/histograms.xml
,
Mar 9 2017
,
Mar 9 2017
,
Mar 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/97065e3acc9aed6ed78628114d19d327431f6b6e commit 97065e3acc9aed6ed78628114d19d327431f6b6e Author: Philip Jägenstedt <foolip@chromium.org> Date: Fri Mar 10 05:55:45 2017 Link to the new input.capture spec and add a TODO to reconcile BUG= 698853 R=mcasas@chromium.org Change-Id: I5d9b9e4f1dc7e985fe48a2392afb24eedae45b59 Reviewed-on: https://chromium-review.googlesource.com/452138 Reviewed-by: Miguel Casas-Sanchez <mcasas@chromium.org> Commit-Queue: Philip Jägenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#456005} [modify] https://crrev.com/97065e3acc9aed6ed78628114d19d327431f6b6e/third_party/WebKit/Source/core/html/HTMLInputElement.idl
,
Mar 10 2017
,
Mar 16 2017
Hi Miguel and qinmin,
Last few days, I prototyped a native Android app for Basic Camera operations.
camera.open(front_id) works, but it needs a surface for preview.
I decided against going that route for this bug, as even if I get the preview working, all the controls user expect(from camera) in the interface will be hard to add.
So intent and then launch the camera app should be the way to do.
Uploaded a WIP patchset to the CL
summary ->
====
Intent camera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
camera.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
camera.putExtra(MediaStore.EXTRA_OUTPUT, mCameraOutputUri);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
camera.putExtra("android.intent.extras.LENS_FACING_FRONT", 1);
} else {
camera.putExtra("android.intent.extras.CAMERA_FACING",
Camera.CameraInfo.CAMERA_FACING_FRONT);
}
====
Output:
I see intent as => #Intent;action=android.media.action.IMAGE_CAPTURE;launchFlags=0x3;i.android.intent.extras.LENS_FACING_FRONT=1;end
=====
But still camera opens with "last opened facing mode".
Any suggestions ?
,
Mar 22 2017
There is no standard, documented intent extra for the camera facing, when using ACTION_IMAGE_CAPTURE; only what's documented in the reference can be counted to be tested: https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE Various Android OEMs may respect some kind of extra for this, but there's likely a variety of names for it; and if a user has set some other camera application (from the Play Store) as the default camera, that application may not respect that extra (or any other). So a facing field cannot be relied upon, unless you know exactly what camera app will be receiving the intent.
,
Mar 23 2017
thanks @etalvala for the information. Looks like iOS has some UIImagePickerController where you can specify to open the camera (UIImagePickerControllerSourceTypeCamera) and specify that you want front facing (UIImagePickerControllerCameraDeviceFront). I was expecting something similar in Android. @finnur is working on a File/Photo picker (https://bugs.chromium.org/p/chromium/issues/detail?id=656015) and I wanted to use the "LAUNCH_CAMERA" part for this bug, but if the underlying Android API is not supported, let's see how far we can progress.
,
Mar 23 2017
Yes, I am working on a File/Photo picker, and although the user will be able to launch the camera from it, the functionality around the camera intent should remain the same as it does in the current Chromium codebase. I don't think you have/should have much of a dependency on my work.
,
Mar 23 2017
@finnur: Yes right, just wanted to keep in the loop.
,
Apr 12 2017
,
Apr 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8ccbf0490f18b6a6e3e4d004fbc27683cc215636 commit 8ccbf0490f18b6a6e3e4d004fbc27683cc215636 Author: foolip <foolip@chromium.org> Date: Thu Apr 27 17:56:09 2017 Import HTML Media Capture web-platform-tests R=rijubrata.bhaumik@intel.com,mcasas@chromium.org BUG= 698853 Review-Url: https://codereview.chromium.org/2848533002 Cr-Commit-Position: refs/heads/master@{#467735} [modify] https://crrev.com/8ccbf0490f18b6a6e3e4d004fbc27683cc215636/third_party/WebKit/LayoutTests/W3CImportExpectations
,
May 15 2017
The CL for implementing the HTML Media Capture spec change has landed. https://chromium.googlesource.com/chromium/src/+/08c2a170239dae6559f696d033fa1baf8bbef4ac
,
Oct 23 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by mcasas@chromium.org
, Mar 6 2017