[whatwg] Do we really need to introduce a <device> element for giving access to webcams and mikes?
Julien Cayzac
julien.cayzac at gmail.com
Mon May 3 19:01:14 PDT 2010
Hi,
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
here.
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 -->
</video>
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.
Thanks,
Julien.
--
Julien Cayzac
http://julien.cayzac.name/
skype://jcayzac?chat
More information about the whatwg
mailing list