In association with heise online

20 June 2011, 09:03

MP3 and PDF plug-in dependencies engineered away

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Zoom Pdf.js rendering a page in Firefox 4.0
Two different projects are working to engineer away plug-in dependencies for PDF files and MP3 audio in Firefox and other browsers. PDF files are typically rendered by Adobe's Reader but this plugin is quite heavyweight and has been plagued with security holes in recent times. Google addressed the problem by incorporating its own, non-Adobe plug-in into Chrome, but Mozilla's Andreas Gal is taking the plug-in out of the equation with his pdf.js plan. Pdf.js will render PDF files in HTML5 with JavaScript using Canvas and SVG APIs.

Gal hopes "that a browser-native PDF renderer written on the web platform allows web technologies to subsume PDF". The code has been developed in the open over the last month and, at the time of Gal's announcement, it lacked, for example, Type1 PostScript font support.

It is expected that pdf.js will implement the most commonly used PDF features within three months and at that point, there will be a release of a pdf.js Firefox extension. Ultimately, Gal hopes that it will ship with Firefox where it will improve usability and security for users, but gives no schedule for that. Pdf.js is licensed under a BSD licence and the project is looking for external contributors. For more detail, developers should consult the project wiki.

Zoom JSMad plays an MP3 with no native support
The other project looking to de-plug-in the browser is jsmad, a pure JavaScript MP3 decoder which runs on Firefox 4.0 and later. A demo page plays music and uploaded mp3 files. It makes use of the Web Audio API and Audio Data API.

As the project is based around these standards, it provides a snapshot of current HTML5 audio support in browsers. Jsmad works out of the box on Firefox 4.0, and works in Firefox 5, 6 and Aurora with one configuration change to work around a bug. In Chrome 12 dev (Linux),13 (OSX) and Canary on Windows it works with some distortion due to a forced sample rate, if the WebAudio API is enabled. Opera, Safari and the iOS and Android browsers all lack the required APIs so are unable to work.

Author of jsmad, Amos Wenger, says he hopes his work will open up a "whole world of realtime audio applications implemented in JavaScript" such as dj mixers, samplers and sequencers. Wenger says that jsmad has been created to "push the limits of what is being done with JavaScript, much in the spirit of pdf.js". Jsmad is available under a GPLv2 licence and in the future the developers plan to enhance buffering, optimise the code more, and support MPEG layer I and II.


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit