What you are asking for is covered by the
HTML Media Capture standard
This standard is better described in
with even a demonstration image that seems to point to
an Apple desktop:
The new standard is an evolution of
<input> tag on the PC, currently only used for uploading files.
The new HTML
<input> tag may either select a file of a
certain type, or capture data from the matching device.
This is done by adding
One useful attribute here is
The capture attribute specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept attribute.
accept attribute is defined as:
accept attribute takes as its value a comma-separated list of one or more file types, or unique file type specifiers, describing which file types to allow.
Here is an example of HTML code that uses these attributes:
<label for="soundFile">What does your voice sound like?:</label>
<input type="file" id="soundFile" capture="user" accept="audio/*">
<label for="videoFile">Upload a video:</label>
<input type="file" id="videoFile" capture="environment" accept="video/*">
<label for="imageFile">Upload a photo of yourself:</label>
<input type="file" id="imageFile" capture="user" accept="image/*">
If the HTML file does not use these attributes, then all it can do is
select a file from disk, created in advance by, for example, the
These tags will let you record when they will be correctly
implemented by Chrome. Unfortunately, at the moment they do
not work on the desktop.
Already working on Android Chrome, I hope that it's
only a matter of time for it to arrive on the desktop.
as can be seen in this
You need to wait for the Chrome developers to implement them for the desktop - we can't do that.