Re: New approach to HTML Media Capture

On Thu, Apr 21, 2011 at 6:11 PM, Ian Hickson <ian@hixie.ch> wrote:
> For both of these use cases, getUserMedia() seems like a much better
> solution than <input type=file>. The former can work in real-time, the
> latter cannot.

I agree that I don't see any strong use-cases for a declarative
mechanism for allowing upload specifically from cameras or
microphones, if a scripted mechanism is available.  (Does
getUserMedia() allow taking photos?  It looks like it's only for audio
and video right now.)

> That's a UI issue. There's no reason <input type="file" accept="image/*">
> shouldn't make the camera a prominent or even default part of the UI.

Different uses of <input type="file" accept="image/*"> will have
different probabilities that the user will want to use their camera.
For Google Goggles, the user is practically certain to want to use
their camera to take the image.  For a software distribution website
that asks the user to upload a screenshot of the software, the user is
certain to *not* want to use their camera, because the site doesn't
want a photograph at all.  The author needs to be able to provide the
correct UI to users, using their knowledge of what sort of file they
actually want.

However, this seems like it would be adequately addressed by a script
mechanism such as getUserMedia(), if it supported photographs.

Received on Thursday, 21 April 2011 22:42:45 UTC