Mozilla developer Chris Double has published a preliminary implementation of hardware-accelerated media decoding support for Firefox on Android. In a message posted in the Mozilla issue tracker, Double said that the patch (which enables support for hardware decoding of H.264, AAC, and MP3 media content) worked successfully when tested on a Nexus S handset.

Seeking to avoid patent-encumbered technology that might have detrimental consequences for the open Web, Mozilla has historically resisted the pressure to support royalty-bearing codecs and media formats in Firefox. Mozilla changed its position on the matter earlier this year with a pragmatic compromise necessitated by the organization’s mobile ambitions.

Mozilla decided that, where available, Firefox should take advantage of the media decoding capabilities supplied by the underlying hardware and operating system. This approach means that Mozilla won’t have to license patent-encumbered codecs or include built-in decoders in the browser—it can just use the decoding capabilities that are already present in relevant environments.

On Android, that means using libstagefright (the platform’s multimedia framework) to support playback in Firefox. Double landed support for software-based decoding through libstagefright earlier this month. His new patch, which was published in the Mozilla issue tracker on Monday, builds on the earlier work to add hardware-accelerated decoding support where available.

The software decoding support appears to be on track for inclusion in Firefox for Android 17, which will enter the Aurora channel at the end of the month. The hardware acceleration support is still a preliminary patch. It will be a little while before these features are available to end users in a stable release, but the work is very promising.

Support for native H.264 decoding is a welcome addition to Firefox on Android, especially with Adobe moving to phase out mobile versions of the Flash player browser plug-in. Thanks to libstagefright-based H.264 support, Firefox users on Android will still be able to play much of the video content that is available for the mobile Web.