W3C home > Mailing lists > Public > public-device-apis@w3.org > April 2011

Re: Mobile Firefox handling of camera input

From: Kyle Huey <me@kylehuey.com>
Date: Wed, 20 Apr 2011 08:41:34 -0400
Message-ID: <BANLkTinXzUp34NKQJk_Au2dcfuvN=wApeA@mail.gmail.com>
To: Dominique Hazael-Massieux <dom@w3.org>
Cc: public-device-apis@w3.org
I'll preface this by saying that I don't think we plan to ship capture
functionality in the next version of Firefox Mobile.

What you're looking at is an implementation detail.  The "moz-device" scheme
is hooked up internally to the appropriate platform specific glue layer
(gstreamer on Linux, DirectShow on Windows, etc.) and provides a URI from
which a feed from the camera (or other device) can be loaded.  moz-device
URIs can only be loaded by "chrome" code (the browser's privileged XUL and
JavaScript).  Using this, we can set up a capture dialog that has a <video
src="moz-device?...."> (and whatever else we want) and we have our
capture/preview UI.

The API that would be exposed to content from this setup is roughly what
Hixie describes in
If the accept attribute is a type that we can capture we will provide the
user the choice between getting media from the file system or from the

We're not really sure how a capture attribute/MIME type parameter that's
supposed to provide a hint to the UA will play into all of this yet,
especially given that some of the file picker or capture dialogs may be
native.  Our UI story on all of this still needs a lot of work, which is one
of the reasons I don't think we'll be shipping this in the immediate future.

- Kyle

On Wed, Apr 20, 2011 at 8:13 AM, Dominique Hazael-Massieux <dom@w3.org>wrote:

> Hi,
> Looking at the Mozilla's bugzilla, it looks like the next version of
> Firefox mobile will enable access to camera input, but using a different
> approach of what we've been pushing so far:
> https://bugzilla.mozilla.org/show_bug.cgi?id=451674
> This apparently uses a device: URI scheme to plug camera input into e.g.
> an image or a video tag:
> <img src="moz-device:camera?type=image/png>
> <video src="moz-device:camera?type=video/x-raw-yuv"></video>
> I wonder if anyone from Mozilla would like to chime in on this
> approach...
> Dom
Received on Wednesday, 20 April 2011 12:42:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:48 UTC