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

Consider adding support for "capture" attribute #13

Open
danabrams opened this issue Feb 14, 2019 · 4 comments
Open

Consider adding support for "capture" attribute #13

danabrams opened this issue Feb 14, 2019 · 4 comments

Comments

@danabrams
Copy link

Input nodes on mobile browsers support a capture attribute that allows easy access to the camera and or microphone to take an image or make a short recording instead of a plain, old file-selector. Supporting this attribute would enable all sorts of cool mobile apps.

Here's a site with examples of each version: http://anssiko.github.io/html-media-capture/

On desktop browsers, it just defaults back to the regular file-picker. The inconsistency between mobile and desktop may absolutely be a reason not to do this.

Bringing this up because someone on Elm-slack specifically asked about how to capture images this way from a mobile browser, and the other way of doing it is a huge, painful workaround with a lot of port-side code.

@catz
Copy link

catz commented Apr 2, 2019

audio capturing via microphone works very different across mobile devices. mostly good on android devices (shows recorder) and do not work at all in iOS. Record Audio In HTML5

@danabrams
Copy link
Author

@catz The link you've provided seems to mostly be about the media api. The capture attribute simply allows mobile devices to pull up their cameras instead of going to a file selector.

I did a test, but iOS doesn't have an audio capture interface, so capture brings it to the photo capture interface. It seems like support for this might have to be an attribute like imageCapture or videoCamera to exclude audio.

@Augustin82
Copy link

From what I've seen, it would be a rather simple feature to implement. Can we hope for this feature to be shipped anytime soon?

@pmiddend
Copy link

I'd also love to see this implemented. Does anyone already have a version one can use as a replacement?

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

No branches or pull requests

4 participants