Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend getPhotoSettings() to include additional EXIF data #209

Open
Joe-Palmer opened this issue Jun 5, 2019 · 5 comments
Open

Extend getPhotoSettings() to include additional EXIF data #209

Joe-Palmer opened this issue Jun 5, 2019 · 5 comments

Comments

@Joe-Palmer
Copy link

When I take a picture using the default camera app, I get loads of really useful information in the EXIF data, for example:

58587107-772fdd00-8254-11e9-8139-967a49947f3f

However, I can see no way to get this data from the Media Stream Image Capture APIs (please correct me if I am wrong).

So, I propose that getPhotoSettings() is extended to return additional information normally embedded as EXIF data. The values that would be most useful are the following:

  • Aperture Value
  • Exposure Time
  • F Number
  • Focal Length
  • Focal Length in 33mm Film
  • ISO Speed Rating

As getPhotoSettings() already returns the width and height, it seems like the best place to return this additional data. An alternative would be embed the information as EXIF data in the image returned by takePhoto() but this does not feel like a great solution as you would then have to takePhoto() and then decode the EXIF data every time you wanted to access these values.

Thoughts and comments? I am very keen on this feature so would be happy to help in any way to get it implemented. More details on what I am doing are in issue #208 and this proposal would solve that issue.

Thanks for your consideration.

@riju
Copy link
Collaborator

riju commented Aug 6, 2020

Thanks @Joe-Palmer. This might increase the Fingerprinting vector. Unless there's a big number of users asking for this feature, we might not put this in the spec at this current time.

@Joe-Palmer
Copy link
Author

Interesting point. Although all the fixed values will be the same for the same model and the variable values will be dependant on the ambient conditions so I can't see how this would give any more fingerprinting capability than the user agent. Or am I missing something?

@riju
Copy link
Collaborator

riju commented Aug 20, 2020

getPhotoSettings() returns the width and height, but the EXIF data reveal a bit more information about the camera device. We did conteplate a bit in #154

I agree that most of the values you listed are variable and can be changed by the user, but still there is a possibility of leaking information about the camera hardware (we already do that by extending MediaTrackCapabilities), so I have to run it through a privacy expert.

I understand this is something we can do in the native land, but I would label this as an enhancement and we would likely take up this request based on -

  • Proof that more customers like you want this and concrete use cases, which are not yet possible.
  • Make sure the benefits/interest outweigh the costs. User has explicitly given the site permission to use the camera using gUM, but user might not want to give site the right to know more about the camera hardware (through exif metadata).

@jan-ivar : thoughts ?

@Joe-Palmer
Copy link
Author

We have looked at the MediaTrackCapabilities and as far as we can see, it is not possible to read the values (from the auto focus/exposure process) without setting them first.

What we are trying to determine is the ambient brightness of the environment. We do this in our native apps by reading these camera values after letting the camera auto expose (as this process is effectively calculating the ambient brightness to correctly expose the image) but unfortunately we cannot do the same in our web app.

The other option is to access the reading from the ambient lighting sensor (for devices that have them) and good progress was made in making this available in Chrome but it seems to have stalled. I gave a more detailed description of our use case in that discussion: w3c/ambient-light#13 (comment)

If there are any other ideas on how best to get a brightness reading in the browser, we'd be very open to them.

@jan-ivar
Copy link
Member

jan-ivar commented Aug 21, 2020

We have looked at the MediaTrackCapabilities and as far as we can see, it is not possible to read the values (from the auto focus/exposure process) without setting them first.

Hmm, I'm not seeing track settings exposed until after takePhoto in Chrome using https://jsfiddle.net/jib1/2ps47umf/32/show but this sounds like a bug. @riju I see no spec support for this behavior, or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants