Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
168 views
in Technique[技术] by (71.8m points)

html - Why doesn't Firefox support the MP3 file format in <audio>

Is there a particular reason why Firefox does not support playback of MP3 files in <audio> elements, only Ogg format?

Is it a licensing issue?

Are there any plans made for a possible future implementation?

Is it possible to develop an addon to support MP3 playback in <audio> elements?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Update October 2012: Wooohooo! Brendan Eich just announced on his blog that work for MP3 and H264 support in Firefox is underway. You can track the work on BugZilla: Support H.264/AAC/MP3 video/audio playback on desktop Firefox

Update February 2013: After much heavy lifting from Firefox developer Chris Pearce, this patch flips the switch to enable MP3, MP4, H.264, and AAC playback by default in HTML5 <audio> and <video> elements when running on Windows 7 and later. We should see some native web MP3 support in the next stable FF release.

Update April 2013: Woohooo! The latest stable Firefox has experimental support for MP3. To turn it on, type about:config in Firefox, find media.windows-media-foundation.enabled and set it to true. Restart Firefox, and you're all set; go to a site with HTML5 audio (e.g. my radio site) and you'll see Firefox is indeed playing the native MP3 and not resorting to a Flash fallback.

Update May 2013: At last! Firefox 21 was released today, and it includes native HTML5 MP3 support on Windows. I just verified it supports native MP3 audio out-of-the-box, provided your operating system supports it. I tested on Windows 8, but I believe this will automatically work on Windows 7 and Vista.

Update December 2013: Firefox 26 was released today, which gives native MP3 audio support for all versions of Windows going back to Windows XP.


The currently-accepted answer by Ian Devlin is obsolete. The new answer is: while Firefox has historically not supported native MP3 playback for licensing reasons, this will change in the future; we'll soon see a Firefox that plays MP3 natively via the HTML5 <audio> tag.

In March 2012, Mozilla did an about-face on this issue, stating publicly they'll support MP3 and H.264 in their native HTML5 implementation, provided the codec is already available on the end user's system.

In the linked article, Mozilla's director of research, Andreas Gal, makes the following public statements:

“We will support decoding any video/audio format that is supported by existing decoders present on the system, including H.264 and MP3. There is really no justification to stop our users from using system decoders already on the device, so we will not filter any formats.

I don’t think this bug significantly changes our position on open video. We will continue to promote and support open codecs, but when and where existing codecs are already installed and licensed on devices we will make use of them in order to provide people with the best possible experience.”

This is in contrast to their previous position, which didn't attempt MP3 and H.264 playback even if the operating system supported it.

Bottom line: Firefox will eventually support MP3s in its HTML5 <audio> implementation. As of September 2012, I see no information about when this will happen. It appears to be under development for Firefox on Droid; I speculate we'll see support in desktop Firefox soon afterwards. Edit October 2012: Indeed, this speculation was correct: native MP3 and H264 playback in desktop Firefox is now under development.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...