[whatwg] Feature Request: Media Elements as Targets for Links

Nils Dagsson Moskopp nils at dieweltistgarnichtso.net
Sun Nov 25 09:47:18 PST 2012

Silvia Pfeiffer <silviapfeiffer1 at gmail.com> schrieb am Mon, 26 Nov 2012
00:01:52 +1100:

> Can you provide an example markup and an example URL that you think
> will solve your use case?

Example markup. Assume I have an audio element in a blog:

<audio id="episode1">
  <source src="episode1.oga" type="audio/ogg; codecs=vorbis">
  <source src="episode1.mp3" type="audio/mpeg">

Someone could comment it like:

<a href="#t=01:23" target="audio">When Alice mentioned Bob</a> …

When someone clicks the link, the browsing context would not change,
but the media element would jump to that point (and possibly play).

> I'm asking because we don't use the name attribute any more in HTML5,
> because we have the id attribute on all elements. Thus, it is always
> possible to hyperlink directly to a video element using a hash on a
> URL and the value of the id element. But I still wonder what you
> think is missing.

I want to hyperlink directly to a embedded media content at a specific
time while preserving the context without going through brittle
JavaScript hoops. Maybe an element-specific second-hash is possible?

Something like <http://example.org/podcast.html#episode1#t=01:23> could
link to the audio element on the page at a specific point in time. (I
am just conjecturing now, though – is that even legal URL synthax?)

Nils Dagsson Moskopp // erlehmann

More information about the whatwg mailing list