[whatwg] <INCLUDE> and links with @rel=embed

Tab Atkins Jr. jackalmage at gmail.com
Tue May 18 11:38:35 PDT 2010


On Tue, May 18, 2010 at 11:20 AM, bjartur <svartman95 at gmail.com> wrote:
> --------
>
> First of all I think we should use <a rel="embed" href="uri-ref"> instead of <source>. I'm not aware of previous proposals of that on this list. Feel free to provide links if it's already been proposed.

That's syntax; like I said, syntax has never been a problem.

> Second, all the responses I've seen so far have been along the lines of "it's the HTML5 way" (implying it's more of an XHTML 1 way, or [insert unfashionable tech here] way) or that video is so important that it deserves first-class treatment, and for the sake of completeness <audio> has to be included as well (though interactive content, text and 3D models don't deserve to be "first-class").

Then you haven't looked into it enough.

The reason why a single inclusive multimedia element is bad is because
different types of media have different requirements.  The javascript
API that makes sense to expose for audio is different than the one you
want to expose for video.  Video needs subtitles, audio doesn't (it
needs transcription, but that's something different entirely, and can
be handled with a simple link).  Etc.

Theoretically, you can swap out what type of api you expose based on
what the currently active media is.  In practice, that's a horrible
idea and no one wants to try to do it again.  It's even harder to try
and sort out multiple additional resources that should be attached to
particular media, but not others, like subtitle tracks that should be
attached to a video but shouldn't be exposed to an audio, etc.


> Isn't interactive content not important enaugh? What about text? What if one want's to link to interactive maps? svg at src? <a class="embed"..> with .embed {content: url(attr(href)) }? AFAIK CSS doesn't support it, and if it does <a rel="embed"..> could be used as well, even without explicit browser support.

SVG can be embedded directly in HTML.  Otherwise, you can use <object>
or <iframe> as the generic handlers.  Note, though, that these latter
methods deal with their contents in an agnostic way.  You don't get
special apis exposed on <iframe> if you link to an SVG file, frex.  If
you want special handling of certain types of media, though, you
really want a specialized element like <audio> and <video> get.

~TJ


More information about the whatwg mailing list