HTML5 media elements in ELinks

Text web browsers — programs that output web pages to text consoles and virtual terminals — are nowadays considered obsolete relicts from an earlier age by most, due to the rise of modern GUIs. Peeking under the hood, this may not be necessarily true: ELinks, an experimental fork from a browser called Links sports some features even most modern graphical browsers dont have out of the box, like Bittorrent support or regex searching.

With a small enhancement I wrote, it can now also make use of the HTML5 media elements — the standards-based way of embedding audio and video files in web pages. To keep things simple, I decided to copy the handling for the object element — a link is inserted, that, when activated (via enter key or mouse click), gives you a choice between downloading the file to disk or viewing it in your favorite media player (probably with AAlib output enabled).

Of course, despite being usable, this is not a real implemention of the media element API by any stretch (Elinks does not even do the playback). Also, several features are still missing:

  • There is no parsing for the source element.
  • The video element’s poster attribute is not considered either.
  • Scripting involving media elements is not possible at all.

An archive containing the patched ELinks 0.12~pre5 source and a binary for Linux on x86 is available for Download. To illustrate how the Youtube HTML5 Demo looks in this version of ELinks, here is a screenshot:

ELinks web browser displaying the Youtube HTML5 Demo

22. Oktober 2009 von erlehmann
Kategorien: Bastelei, Software | Schlagwörter: , | Schreibe einen Kommentar

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert

Before you post, please prove you are sentient.

Was ist der Vorname von Franz Beckenbauer?