W3C home > Mailing lists > Public > public-device-apis@w3.org > June 2010

RE: Updates to File API and blob url schemes

From: Adrian Bateman <adrianba@microsoft.com>
Date: Fri, 11 Jun 2010 16:01:40 +0000
To: Robin Berjon <robin@berjon.com>
CC: Web Applications Working Group WG <public-webapps@w3.org>, public-device-apis <public-device-apis@w3.org>
Message-ID: <104E6B5B6535E849970CDFBB1C5216EB2F1F2B5B@TK5EX14MBXC132.redmond.corp.microsoft.com>
On Friday, June 11, 2010 7:22 AM, Robin Berjon wrote:
> On Jun 11, 2010, at 15:43 , Adrian Bateman wrote:
> > Do you think the URL scheme should be specified for each use of Blob or
> > more broadly? For example, Blob is used in the File Reader API but also
> > possibly in the Capture API in a different way. It might be useful to be able
> > to use a different scheme for these different purposes to help the user agent
> > route requests to the appropriate handler.
> I'd like to make sure that I follow. Without putting words into your mouth,
> are you suggesting that if I obtain such a pointer from a file, I would get
> file-blob:DEADBEEF but if I got it from a capture it would be capture-
> blob:C00lDBABE?

That might be one approach. I wondered whether the proposal here was a single unifying scheme for all future uses of Blob without necessarily knowing whether that would work or whether each spec that consumes the Blob interface could express an approach (which could be the same as the File one).

> There are several reasons why I'm not in favour of that:
>   - it exposes too much of the underlying implementation, presumably it's not
> the end of the world to have a single object proxying for various providers
>   - it introduces a debauchery of new schemes, all of which then have to be
> not only specified by registered
>   - more importantly: it's none of the author's business where I'm giving him
> my picture from. If he's asking to use capture but I tell my UA to override
> that and use a file instead, the script should have no way of finding out.

These are good reasons and I'm really just thinking out loud. I've seen some discussions about how live webcam capture might use this interface to provide a URL for the video feed that you could potentially assign to a <video> src attribute. I'm not sure if this is just an abuse of something that's not really a Blob but might the script want to be able to check if it's getting a video? Perhaps the URL could have a content type in a similar fashion to data:.


Received on Friday, 11 June 2010 16:03:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:44 UTC