New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 752974 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

mediaStreamTrack.takePhoto() does not work on surface pro 4

Reported by user.t...@iwecloud.com, Aug 7 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36

Steps to reproduce the problem:
1. go to the demo site https://googlechrome.github.io/samples/image-capture/grab-frame-take-photo.html
2. click the button get user media, it lanches the camera
3. then click the button "take photo"

What is the expected behavior?
in the canvas on tap of the button "take photo", it should show a photo

What went wrong?
it does not show a photo, and in the block "live output", it shows "{}"

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3112.90  Channel: stable
OS Version: 10.0
Flash Version:
 
Components: -Blink>GetUserMedia Blink>ImageCapture
Cc: mcasas@chromium.org chfremer@chromium.org
This may not be specific to the Surface Pro 4. I tried on my Windows laptop on a Chrome 59 build, and had the same issue. GrabFrame did work though.

mcasas@: With PhotoState collection currently disabled, is this the expected behavior?


You have to enable the webcam inside Chrome by going to the "I" next to the URL box to enable the setting.

Comment 4 by hdodda@chromium.org, Aug 14 2017

Cc: hdodda@chromium.org
Labels: Needs-Triage-M60 M-62
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on windows 10 using chrome M60 #60.0.3112.90 and M62 #62.0.3185.0.

This is a non-regression issue as this feature is not available till M54 and issue is seen from M55.

Marking this as untraiged , so that it would get addressed by respective team.

Note : This is working fine in Mac and linux OS.

Thanks!
Labels: -Needs-Triage-M60

Comment 6 by mcasas@chromium.org, Oct 23 2017

Owner: chfremer@chromium.org
Status: Assigned (was: Untriaged)
chfremer@chromium.org can you please take a look?
I experienced the same issue with my Surface Pro 4.

VideoCaptureDeviceWin::SetPhotoOptions() because of VideoCaptureDeviceWin::InitializeVideoAndCameraControls().

  bool VideoCaptureDeviceWin::InitializeVideoAndCameraControls() {
    ComPtr<IKsTopologyInfo> info;
    HRESULT hr = capture_filter_.CopyTo(info.GetAddressOf());
    if (FAILED(hr)) {
      SetErrorState(FROM_HERE, "Failed to obtain the topology info.", hr);
      return false;
    }
  
And here is the logged error:

  [1808:9516:0129/164605.050:ERROR:video_capture_device_win.cc(906)] Failed to obtain the topology info.: No such interface supported (0x80004002)

I think it is because Surface cameras expect to be used via MediaFoundation.
The cast to IKsTopologyInfo is not supported.

I think that, if the provided mojom::PhotoSettingsPtr is empty, then SetPhotoOptions should not fail.

chfremer@, would you accept a CL with this fix?
Or maybe IKsTopologyInfo is not available on some types of camera and we could just catch the "No such interface supported" error code.

Sign in to add a comment