W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2009

[whatwg] Quality Values for Media Source Elements

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Mon, 14 Dec 2009 10:59:51 -0500
Message-ID: <7c2a12e20912140759r39410fc5j635be5e4f1e4c8c0@mail.gmail.com>
On Mon, Dec 14, 2009 at 2:59 AM, Hugh Guiney <hugh.guiney at gmail.com> wrote:
> JavaScript is a crutch that far too many applications are relying on
> for major functionality lately. JavaScript should enhance a Web
> experience, not supplant it.

It depends on the application.  But in any event, HTML can never
possibly do everything JavaScript does, so at some point the answer
needs to be "use JavaScript".

> If no one uses content negotiation then there is no need to have the
> <source> element at all.

I don't follow.  If authors *were* willing to use content negotiation,
to the contrary, there would be no need for <source>.  You could just
write <video src=foo></video> in your markup, and configure your
server to serve foo.mp4 or foo.ogg depending on the incoming HTTP
headers.  But nobody wants to do that, so the configuration has to be
done in HTML instead.

> XHTML and HTML are interchangeable with any other two technologies in
> that example. PDF and Word, HTML and RSS, RSS and XHTML... the point
> isn't whether most site authors are offering those two in particular;
> the point is that on a platform that supports content negotiation, it
> makes no sense to outsource it to another technology, making authors
> reinvent the wheel simply because not enough people are using wheels.

It makes sense to reinvent the wheel if the wheel is square.  HTTP
content negotiation is a square wheel.

> It's simple for an end-user; not necessarily so simple for authors to implement.

Two or three different URLs with different versions of the resource
would do it.  You don't even need JavaScript.  But if you do use
JavaScript, it should be as simple as

<a href=lower_quality.html
onclick="document.getElementById('myvideo').src =
'lower-quality.ogg'">Lower-quality version</a>

(disclaimer: not tested).
Received on Monday, 14 December 2009 07:59:51 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:19 UTC