[Bug 9619] New: HTML Device Spec - Could Use More Example Code

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9619

           Summary: HTML Device Spec - Could Use More Example Code
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec proposals
        AssignedTo: dave.null@w3.org
        ReportedBy: markmsmith@hotmail.com
         QAContact: public-html-bugzilla@w3.org
                CC: ian@hixie.ch, mike@w3.org, public-html@w3.org


Looking at the HTML Device Spec, Editor's Draft 26 April 2010
(http://dev.w3.org/html5/html-device/) it's quite difficult to figure out how
to use the API to interact with streaming video from a web cam.

As far as I can tell, the API currently supports the following use case:

Display a Web Cam's Video Stream in a Video Tag:
1) Declare a device tag of type media
2) Specify an onchange event handler for the tag
3) When invoked, the change handler is passed a Stream object, which provides a
url and a record() method
4) Set the url as the src attribute of the video tag, with the video tag then
taking care of retrieving the video from this url and decoding it.

However, I don't see how you would take the contents of the stream using the
File API and do preprocessing on it before passing it to a video tag or canvas.
 For example, if you wanted to do the same as this
https://developer.mozilla.org/En/Manipulating_video_using_canvas
but without playing the original video in a video tag first.

The record() method on the stream only gives a StreamRecorder which (as far as
I can tell), only gives you a File after calling stop() on it, ending the
stream.  This isn't helpful, since you want to continue processing the stream
live, rather than just grabbing recordings from it and processing them.  Are
you supposed to be get a File from the Stream's url?

Here's my use case
Display a Modified Video Stream:
1) Declare a device tag of type media
2) Get a Stream from onchange
3) Open a File from the Stream's url (?)
4) Processes the data from the stream in javascript using a FileStream object
(render to canvas?)
5) Render the modified stream either to a canvas or pipe it to a new File for
display in a Video tag.

Feel free to shoot me down if this is way off for what the spec is intended to
support, I was just curious to see how far the boundaries could be pushed.  I
know that the spec is still at a very early stage, but I was considering trying
to mock up an implementation with a web cam's byte stream being passed from
Flash using the Flash-ajax bridge.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 29 April 2010 16:01:17 UTC