- From: Ralph Giles <giles@mozilla.com>
- Date: Mon, 11 Jun 2012 14:53:05 -0700
- To: whatwg@whatwg.org
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. As such I wanted to raise the issue here and get design feedback and levels of interest for other user agents. Here's a first idea: partial interface HTMLMediaElement { readonly attribute object tags; }; Accessing media.tags provides an object with a key: value data, for example: { 'title': 'My Movie', 'creator': 'This User', 'date': '2012-06-18', 'license': 'http://creativecommons.org/licenses/by-nc-sa/' } The keys may need to be filtered, since the files can contain things like base64-encoded cover art, which makes the object prohibitively large. The keys may need to be mapped to some standard scheme (i.e. dublic core) since vocabularies vary from format to format. This is nice because it's easy to access, can be simply enumerated, and extensible. Which is helpful when if gets added the <img> for exif data. -r
Received on Monday, 11 June 2012 21:55:19 UTC