ImageCapture PhotoCapabilities zoom properties sometimes all zero |
|||||
Issue descriptionChrome Version : Android Chrome Canary 54.0.2791.0 URLs (if applicable) : https://simpl.info/ic OS version : 6.0.1 Network (such as Cable/DSL/Dial up etc): Google-T and home wifi Audio/Video format (if applicable): N/A Special chrome flags (if applicable): Experimental Web Platform features enabled from chrome://flags Behavior in Safari (if known): N/A Behavior in Firefox (if known): N/A Video issue, Audio issue, both, neither? Video <b>Flash or HTML5? <right-clicking most players will either reveal some text</b> with “Flash”; otherwise likely HTML5> N/A If the browser or renderer crashed (“Aw, Snap”), please add any crash IDs from chrome://crashes (possibly after enabling crash reporting per http://support.google.com/chrome/bin/answer.py?hl=en&answer=96817) What steps will reproduce the problem? (1) Open https://simpl.info/ic in Canary on Android. (2) (3) What is the expected result? Get non-zero values for PhotoCapabilities (and therefore see the range input zoom slider). What is the actual result? Sometimes zoom property values are all zero, so the zoom slider is not displayed. Tried adding setTimeout, but not sure that actually makes any difference. Any additional information (anything else which may help us debug the issue)? Ongoing email thread with mcasas@. Please attach the HTML5/JavaScript code or audio/video files as well as screenshot and/or videos (if applicable) navigator.mediaDevices.getUserMedia(constraints).then(function(stream) { console.log('getUserMedia() got stream: ', stream); window.stream = stream; // global scope visible in browser console if (window.URL) { video.src = window.URL.createObjectURL(stream); } else { video.src = stream; } imageCapture = window.imageCapture = new ImageCapture(stream.getVideoTracks()[0]); setTimeout(getCapabilities, 100); }); function getCapabilities() { imageCapture.getPhotoCapabilities().then(function(capabilities) { console.log('Camera capabilitities:', capabilities); if (capabilities.zoom.max > 0) { zoomInput.min = capabilities.zoom.min; zoomInput.max = capabilities.zoom.max; zoomInput.value = capabilities.zoom.current; zoomInput.classList.remove('hidden'); } }).catch(function(error) { console.log('navigator.getUserMedia error: ', error); }); }
,
Jul 13 2016
,
Jul 29 2016
The error is legit: Device start is done in parallel with JS getUserMedia() being correctly resolved, so there is a race. Will work on this soon-ish.
,
Jul 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/13c7a2dfcd26e94f607a169de86b937fa21fb236 commit 13c7a2dfcd26e94f607a169de86b937fa21fb236 Author: mcasas <mcasas@chromium.org> Date: Fri Jul 29 18:15:03 2016 ImageCapture: add WebRtcImageCaptureBrowserTest content_browsertest This CL adds a content_browsertest for ImageCapture: WebRtcImageCaptureBrowserTest, with one test case, CreateAndGetCapabilities, that is parameterized to exercise the FakeVideoCaptureDevice and, in the very near future, the system's device if implemented (i.e., Android). WebRtcImageCaptureBrowserTest needs access to the physical webcam, but in general content_browsertests are always using the Fake. WebRtcWebcamBrowserTest has the necessary infrastructure to do this, so it's made public and reused as base class for the former. Also, this CL moves content/test/webrtc_content_browsertest_base.{cc,h} to content/browser/media/webrtc/ since they are purely internal to content_browsertests. BUG= 627537 , 518807 TEST=new content_browsertests WebRtcImageCaptureBrowserTest.CreateAndGetCapabilities/0 (all platforms) Review-Url: https://codereview.chromium.org/2190523004 Cr-Commit-Position: refs/heads/master@{#408690} [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/capture/image_capture_impl.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_audio_debug_recordings_browsertest.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_browsertest.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_browsertest_audio.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_browsertest_data.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_capture_from_element_browsertest.cc [rename] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_content_browsertest_base.cc [rename] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_content_browsertest_base.h [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_datachannel_browsertest.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_getusermedia_browsertest.cc [add] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_image_capture_browsertest.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_ip_permissions_browsertest.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_media_recorder_browsertest.cc [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_webcam_browsertest.cc [add] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/browser/media/webrtc/webrtc_webcam_browsertest.h [modify] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/content_tests.gypi [add] https://crrev.com/13c7a2dfcd26e94f607a169de86b937fa21fb236/content/test/data/media/image_capture_test.html
,
Aug 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81 commit bd1933b1b5ee7a3557401fe79f63f38e3d5deb81 Author: mcasas <mcasas@chromium.org> Date: Fri Aug 05 04:11:14 2016 ImageCapture: Queue up requests while device not ready Calls to ImageCapture methods (e.g. takePhoto(), getPhotoCapabilities()) might be lost if racing against either: - device creation (in VideoCaptureManager) - actual device capture (in VideoCaptureDeviceAndroid) So, this CL: - adds a "queue" of image capture-related requests in VideoCaptureManager, where we store such requests _if_ the capture device is not ready (but it's known) -- these are served OnDeviceStarted(). - adds a similar "queue" of requests in VideoCaptureDeviceAndroid, where we store requests is the device has not captured anything yet (Android API needs the device up and running for many operations). - adds a takePhoto() content_browsertest for Android and FakeVideoCaptureDevice, factoring Js code appropriately. BUG= 518807 , 627537 TEST=added new content_browsertest: out/gn/bin/run_content_browsertests(_incremental) --gtest_filter=*WebRtcImageCaptureBrowserTest* or out/gn/content_browsertests --gtest_filter=*WebRtcImageCaptureBrowserTest* Review-Url: https://codereview.chromium.org/2193213003 Cr-Commit-Position: refs/heads/master@{#409988} [modify] https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81/content/browser/renderer_host/media/video_capture_manager.cc [modify] https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81/content/browser/renderer_host/media/video_capture_manager.h [modify] https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81/content/browser/webrtc/webrtc_image_capture_browsertest.cc [modify] https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81/content/test/data/media/image_capture_test.html [modify] https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81/media/capture/video/android/video_capture_device_android.cc [modify] https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81/media/capture/video/android/video_capture_device_android.h [modify] https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81/media/capture/video/fake_video_capture_device.cc
,
Aug 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5baed5f27510f85dc8a44dfd8f0c62f35a5808d7 commit 5baed5f27510f85dc8a44dfd8f0c62f35a5808d7 Author: guidou <guidou@chromium.org> Date: Fri Aug 05 10:20:34 2016 Revert of ImageCapture: Queue up requests while device not ready (patchset #4 id:380001 of https://codereview.chromium.org/2193213003/ ) Reason for revert: Speculative revert. Suspect of breaking Android Tester bots. Will revert if it doesn't fix it. See https://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/35590 https://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/30080 https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28K%20Nexus5%29/builds/9093 https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/14332 Original issue's description: > ImageCapture: Queue up requests while device not ready > > Calls to ImageCapture methods (e.g. takePhoto(), getPhotoCapabilities()) > might be lost if racing against either: > - device creation (in VideoCaptureManager) > - actual device capture (in VideoCaptureDeviceAndroid) > > So, this CL: > - adds a "queue" of image capture-related requests in > VideoCaptureManager, where we store such requests _if_ the > capture device is not ready (but it's known) -- these are > served OnDeviceStarted(). > > - adds a similar "queue" of requests in VideoCaptureDeviceAndroid, > where we store requests is the device has not captured anything > yet (Android API needs the device up and running for many > operations). > > - adds a takePhoto() content_browsertest for Android and > FakeVideoCaptureDevice, factoring Js code appropriately. > > BUG= 518807 , 627537 > TEST=added new content_browsertest: > out/gn/bin/run_content_browsertests(_incremental) --gtest_filter=*WebRtcImageCaptureBrowserTest* > or > out/gn/content_browsertests --gtest_filter=*WebRtcImageCaptureBrowserTest* > > Committed: https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81 > Cr-Commit-Position: refs/heads/master@{#409988} TBR=emircan@chromium.org,nick@chromium.org,mcasas@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 518807 , 627537 Review-Url: https://codereview.chromium.org/2219813002 Cr-Commit-Position: refs/heads/master@{#410023} [modify] https://crrev.com/5baed5f27510f85dc8a44dfd8f0c62f35a5808d7/content/browser/renderer_host/media/video_capture_manager.cc [modify] https://crrev.com/5baed5f27510f85dc8a44dfd8f0c62f35a5808d7/content/browser/renderer_host/media/video_capture_manager.h [modify] https://crrev.com/5baed5f27510f85dc8a44dfd8f0c62f35a5808d7/content/browser/webrtc/webrtc_image_capture_browsertest.cc [modify] https://crrev.com/5baed5f27510f85dc8a44dfd8f0c62f35a5808d7/content/test/data/media/image_capture_test.html [modify] https://crrev.com/5baed5f27510f85dc8a44dfd8f0c62f35a5808d7/media/capture/video/android/video_capture_device_android.cc [modify] https://crrev.com/5baed5f27510f85dc8a44dfd8f0c62f35a5808d7/media/capture/video/android/video_capture_device_android.h [modify] https://crrev.com/5baed5f27510f85dc8a44dfd8f0c62f35a5808d7/media/capture/video/fake_video_capture_device.cc
,
Aug 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1eb7bf07344d04a9687dbb57980c304535021901 commit 1eb7bf07344d04a9687dbb57980c304535021901 Author: mcasas <mcasas@chromium.org> Date: Fri Aug 05 16:40:12 2016 Reland: ImageCapture: Queue up requests while device not ready This CL is a reland of https://crrev.com/2193213003, that got reverted due to timeouts in a few Android bots, probably because TakePhoto() takes too much time in these bots if done without a specific and small resolution (which currently not implemented). Disabling these tests FTM. Original CL description------------------------------------------------- ImageCapture: Queue up requests while device not ready Calls to ImageCapture methods (e.g. takePhoto(), getPhotoCapabilities()) might be lost if racing against either: - device creation (in VideoCaptureManager) - actual device capture (in VideoCaptureDeviceAndroid) So, this CL: - adds a "queue" of image capture-related requests in VideoCaptureManager, where we store such requests _if_ the capture device is not ready (but it's known) -- these are served OnDeviceStarted(). - adds a similar "queue" of requests in VideoCaptureDeviceAndroid, where we store requests is the device has not captured anything yet (Android API needs the device up and running for many operations). - adds a takePhoto() content_browsertest for Android and FakeVideoCaptureDevice, factoring Js code appropriately. BUG= 518807 , 627537 TEST=added new content_browsertest: out/gn/bin/run_content_browsertests(_incremental) --gtest_filter=*WebRtcImageCaptureBrowserTest* or out/gn/content_browsertests --gtest_filter=*WebRtcImageCaptureBrowserTest* TBR=emircan@chromium.org, ncarter@chromium.org Review-Url: https://codereview.chromium.org/2212343003 Cr-Commit-Position: refs/heads/master@{#410080} [modify] https://crrev.com/1eb7bf07344d04a9687dbb57980c304535021901/content/browser/renderer_host/media/video_capture_manager.cc [modify] https://crrev.com/1eb7bf07344d04a9687dbb57980c304535021901/content/browser/renderer_host/media/video_capture_manager.h [modify] https://crrev.com/1eb7bf07344d04a9687dbb57980c304535021901/content/browser/webrtc/webrtc_image_capture_browsertest.cc [modify] https://crrev.com/1eb7bf07344d04a9687dbb57980c304535021901/content/test/data/media/image_capture_test.html [modify] https://crrev.com/1eb7bf07344d04a9687dbb57980c304535021901/media/capture/video/android/video_capture_device_android.cc [modify] https://crrev.com/1eb7bf07344d04a9687dbb57980c304535021901/media/capture/video/android/video_capture_device_android.h [modify] https://crrev.com/1eb7bf07344d04a9687dbb57980c304535021901/media/capture/video/fake_video_capture_device.cc
,
Aug 5 2016
This should be fixed by #7, dutton@ could you please verify? thx
,
Nov 23 2016
,
Dec 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ba3e7171459cfa4bc9c0c26329a88ff3a4c21bd6 commit ba3e7171459cfa4bc9c0c26329a88ff3a4c21bd6 Author: mcasas <mcasas@chromium.org> Date: Tue Dec 06 19:27:12 2016 ImageCapture: queue requests if device is not started (Linux,CrOs) This CL is the continuation of https://crrev.com/2193213003 for CrOs. Said CL added a queue of image-capture related requests in VideoCaptureManager and in VideoCaptureDeviceAndroid, this CL adds such a queue in VideoCaptureDeviceLinux, otherwise (see bug) there is a race between the photo related requests and the device startup, which can take a while and happens asynchronously. BUG= 670262 , 627537 Review-Url: https://codereview.chromium.org/2557623002 Cr-Commit-Position: refs/heads/master@{#436684} [modify] https://crrev.com/ba3e7171459cfa4bc9c0c26329a88ff3a4c21bd6/media/capture/video/linux/video_capture_device_linux.cc [modify] https://crrev.com/ba3e7171459cfa4bc9c0c26329a88ff3a4c21bd6/media/capture/video/linux/video_capture_device_linux.h |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dutton@chromium.org
, Jul 12 2016