W3C home > Mailing lists > Public > public-media-capture@w3.org > November 2011

RE: use cases not covered by media capture under DAP

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Wed, 30 Nov 2011 19:21:59 +0000
To: Brian LeRoux <b@brian.io>, "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <9768D477C67135458BF978A45BCF9B38381BEB4F@TK5EX14MBXW602.wingroup.windeploy.ntdev.microsoft.com>
>-----Original Message-----
>From: brian.leroux@gmail.com [mailto:brian.leroux@gmail.com] On Behalf Of
>Brian LeRoux
>Sent: Wednesday, November 30, 2011 11:07 AM
>To: public-media-capture@w3.org
>Subject: use cases not covered by media capture under DAP
>
>Hey guys, I'm Brian and I work on the PhoneGap project. [1] We implemented
>Media Capture. [2] It doesn't cover a number of use cases so we have a
>complementary API of our own utility that covers the common cases for image
>capturing discovered by PhoneGap app authors.
>[3]

Nice to meet you!



>Perhaps these real world cases can be of use.
>
>In particular things we see all the time:
>
>- image source (many camera sensors common now, select from photo
>lib/gallary VERY common)

Can you clarify this? Are you saying that the camera loads an image from the local file system? For what purpose? 


>- image destination (local to app, to the SD card, filesystem, as base64
>string)

In the W3C the Blob is the best we've got for a generic transfer mechanism. There are already established ways of extracting data from a Blob via the FileReader API [4] (dataURI, string, typedarray, etc.). The Streams API proposal [5] also lets you do most of the same for a Stream content (including extracting chunks into Blobs). 

Of course, once you've got a Blob, the web platform generally doesn't allow script to arbitrarily write to the user's file system. However, with the user's permission, such writes should be allowed (the user stays in control, though). There's some current work in this area, for example the File API: Writer spec, section 9 which describes some of the proposed limitations [6].

>- image quality
>- image rotation
>- image encoding
>
>[1] http://phonegap.com
>[2]
>http://docs.phonegap.com/en/1.2.0/phonegap_media_capture_capture.md.html#Ca
>pture
>[3] http://docs.phonegap.com/en/1.2.0/phonegap_camera_camera.md.html#Camera
>
[4] http://www.w3.org/TR/FileAPI/#FileReader-interface
[5] http://dvcs.w3.org/hg/webapps/raw-file/tip/StreamAPI/Overview.htm
[6] http://www.w3.org/TR/file-writer-api/
Received on Wednesday, 30 November 2011 19:22:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:24:34 UTC