HTML5: Access to cameras and microphones
In the HTML5 development area, the World Wide Web Consortium (W3C) is producing more and more detailed drafts outside of the central specification. A new HTML Media Capture working draft has now been added to allow access to audio, still and video image content in HTML forms.
In April, the Consortium had released a first draft, entitled The Capture API, that describes a programming interface for devices. The new draft, which is considerably shorter than its predecessor, emphasises the connection to HTML by adding the accept
attribute to the well-known input
element. The permitted values for this attribute are image/*
, sound/*
and video/*
. These elements can be followed by the capture
parameter, which accepts the camera
, camcorder
, microphone
and filesystem
values. For example, for photo uploads, the corresponding input
element would look like this: <input type="file" accept="image/*;capture=camera">
.
(crve)