file
file copied to clipboard
Consider adding support for "capture" attribute
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.
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
@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.
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?
I'd also love to see this implemented. Does anyone already have a version one can use as a replacement?