[whatwg] exposing metadata on replaced elements (was: <video> feedback)

Silvia Pfeiffer silviapfeiffer1 at gmail.com
Mon Sep 17 19:19:14 PDT 2012


Hi Ralph, all,

> On Mon, 11 Jun 2012, Ralph Giles wrote:
>>
>> Recently, we've been considering adding a 'tags' or 'metadata' attribute
>> to HTML media elements in Firefox, to allow webcontent access to
>> metadata from the playing media resource. In particular we're interested
>> in tag data like creator, title, date, and so on.
>>
>> My recollection is that this has been discussed a number of times in the
>> past, but there was never suffient motivation to support the interface.
>> Our particular motivation here is webapps that present a media file
>> library. While it's certainly possible to parse the tag data out
>> directly with javascript, it's more convenient if the HTML media element
>> does so, and the underlying platform decoder libraries usually provide
>> this data already.
>
> My recommendation would be to develop a specification for this (or use the
> one(s) already available for this purpose), and in that specification
> define how it is added to HTMLMediaElement, much as you suggest:
>
>> partial interface HTMLMediaElement {
>>   [...]
>> };
>
> (I don't have the bandwidth to define how to extract this kind of thing
> from each video format. Even trying to define what little the spec already
> says has required hours of reading obscure specifications and that's
> without even testing to see if those specs match reality.)

I think we have a more generic problem than just for media elements.

None of our elements that pull in external resources (including img,
object/embed, video, audio, track) expose metadata to the Web page and
the Web developer is required to implement a XHR to get this kind of
information.

While we have somewhat of a proposal for exposing metadata to media
elements through the W3C media annotations WG [1] with the
getMediaProperty() function, we have no such thing for any of the
other resource types. Also, it is not clear that this function is
appropriate.

I suggest we need to develop a generic solution for this problem.

Cheers,
Silvia.

[1] http://www.w3.org/TR/2011/WD-mediaont-api-1.0-20111122/#async-api


More information about the whatwg mailing list