[whatwg] Microphone Device API

Bjartur Thorlacius svartman95 at gmail.com
Sun Feb 20 15:48:32 PST 2011

On 2/17/11, Sebastian Herrlinger <sebastian at formzoo.com> wrote:
> The only way to really access a device and do anything with it and its data
> would be JS,
Not in the OP case, which is about sending finite audio streams, encoded
in one of specified formats to a server for storage and distribution.

The simplest, and IMO best, way to achieve that is by using <input type=file
accept="audio/mpeg, audio/etc">, but note that the spec forbids MIME types
containing a semicolon.

> so I question the device element completely (but providing an alternative)
> as in:
> I add a video to the page with a "video" element and a "src",
> so the video is loaded from the given source and rendered to the screen.
> Then I add a device to the page and tell it to be a webcam. Now what?
> This is not ment to be markup,
> which gets more obvious when we start talking about the file system or a usb
> port.
> Why would I add a usb device to the page?
Yes, this would be madness, but I don't see what use cases you're trying to

> Depending on the level of access this would mean full access to almost any
> device,
> which could end up in writing drivers for devices,
> but if it would be too restrictive the specification will have to provide
> standard interfaces for most common devices.

> But if the user allows access to the device, he should trust the site.
A user should never give a random host on the Internet access to a device.
How is a user to know whether authorizing GTalk to record a voice message will
permanently grant Google access to a user's microphone or not? I wouldn't want
Google to record all conversations I have when I've got
open, nor would I want Google to use my camera when I'm on
http://www.google.com/images?q=*coughs* 'cause I upload videos on YouTube.

But if it's the user who initiates the recording, this is a non-issue.

More information about the whatwg mailing list