[whatwg] exposing metadata on replaced elements (was: <video> feedback)
Rick Waldron
waldron.rick at gmail.com
Mon Sep 17 20:19:00 PDT 2012
On Monday, September 17, 2012 at 10:19 PM, Silvia Pfeiffer wrote:
> 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()
>
>
If the function is going to retrieve meta data, why is it named with words that don't include "meta" or "data"?
Additionally, is it possible to avoid making the API async? This seems like async for the sake of it. If this data is actually the meta data of the media resource, then it make sense for this to be readily available after any loadedmetadata event and therefore can be accesse via sync API.
This may not it with "the plan"...
Rick
> 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