W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2010

[whatwg] Do we really need to introduce a <device> element for giving access to webcams and mikes?

From: Julien Cayzac <julien.cayzac@gmail.com>
Date: Tue, 4 May 2010 11:01:14 +0900
Message-ID: <r2k8ac6caaf1005031901l88661783vc258369ff250929@mail.gmail.com>

I've been reading lately about the new proposed <device> element, and
was wondering if it was needed at all.
IMHO, a video originating from an attached camera is not different
from a video originating from the network, so <video> could be used
Displaying the webcam in a page could be done like this:

<video autoplay controls>
    <source src="webcam:640,480,25" /> <!-- 640x480, 25fps -->
    <source src="webcam:320,240,*" /> <!-- will be tried if the webcam
doesn't support the above settings -->
    <source src="mire.mp4" /> <!-- no webcam attached? show this video
instead -->

Same could be done with <audio> for adding microphone support, and in
both cases the browser should notify the user the page is requesting
permission to access these devices.

Now, I am aware HTMLMediaElement doesn't offer any methods to actually
query the data it serves or to get notified as more incoming data gets
received, which makes my proposal useless. Still, such methods could
be used in other scenarios, like a browser-based video editing app, so
adding them would make sense in my opinion.

Julien Cayzac
Received on Monday, 3 May 2010 19:01:14 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:23 UTC