Html5 audio doesn't work for mp3s.
I can't seem to get tag <audio> working with mp3s on my system(FF 24, Win 7 x64). I tried some wav files, those work ok. But whenever i try to play mp3 file, the html5 player just flashes for a few milliseconds and then disappears. So, is there a bitrate limitation (or any other limitation) for html5 audio tag on mp3s? Here's an example of code and one of the mp3 files I am trying to use - http://dindo.wz.cz/jukebox.html .
(file http://dindo.wz.cz/Galaxy32Star4.mp3 )
The console (ctrl+shift+k) gives these errors (rough translation):
[14:07:48.861] Type HTTP "Content-Type" "audio/mpeg" is not supported. Loading of media http://dindo.wz.cz/Galaxy32Star4.mp3 has failed. @ http://dindo.wz.cz/jukebox.html
[14:07:48.862] Couldn't load any of candidate sources. Loading of media was suspended. @ http://dindo.wz.cz/jukebox.html
p.s: Even the w3c example doesn't work when i remove the ogg source. (http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_audio_all).
Modifié le
Solution choisie
yes it appears that windows 7n ships without the necessary codecs that firefox relies on the playback of mp3/mp4 content: http://support.microsoft.com/kb/968211
you might want to try if you can get around installing the "WindowsMedia Feature Pack" by testing if it's working by using the aurora version of firefox, since firefox 26 will introduce DShow as another method to decode mp3 files. i'm not sure if this is somehow depending on the presence of WindowsMedia-related files on your pc again though...
https://www.mozilla.org/firefox/aurora/
Lire cette réponse dans son contexte 👍 0Toutes les réponses (13)
hello Leprechaunius, is your windows 7 system fully updated (service pack 1)? the sample you have provided works fine for me...
Hi, yes, I have fully updated sp1 system.
can you replicate the issue, when you create a new profile for testing purposes?: Profile Manager - Create, remove or switch Firefox profiles
Yes, the problem still persists even in new profile.
Works here as well on Linux with Firefox 25 (Firefox 24 doesn't support mp3 on Linux).
Are all media prefs set at their default value?
Do you have the proper codecs installed to support mp3?
Does it help if you disable the VLC plugin?
All values in about:config, that start with 'media.' are on their default values.
Tried to disable VLC plugin, nothing changed.
To answer your codec question - I think so, though I am not sure how to check this. But I can play mp3s on my system with no problems using VLC or Winamp. I have Windows 7 N edition - sold in Europe without Windows Media Player (more info here ) Do you think that's the issue? If so, is there a way to support mp3 playback without installing WMP?
Solution choisie
yes it appears that windows 7n ships without the necessary codecs that firefox relies on the playback of mp3/mp4 content: http://support.microsoft.com/kb/968211
you might want to try if you can get around installing the "WindowsMedia Feature Pack" by testing if it's working by using the aurora version of firefox, since firefox 26 will introduce DShow as another method to decode mp3 files. i'm not sure if this is somehow depending on the presence of WindowsMedia-related files on your pc again though...
Modifié le
I tried the new Aurora, nothing changed. (Although I hope the DShow feature was on by default, since I couldn't find it in config.)
I don't want to install this microsoft feature pack, so I guess I will have to live without this neat feature. And hope someday firefox will integrate its own mp3 decoding library. Anyway I am marking your post as solution. Thank you guys.
What is the value of media.directshow.enabled in Aurora?
- http://mxr.mozilla.org/mozilla-aurora/search?string=directshow&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-aurora
- Bug 908862 - MP3 file no longer plays with new DirectShow backend
It is set to true. So the feature is just broken and will be fixed? On bugzilla it's marked as RESOLVED FIXED, so... Should I file a bug or something to help?
I'm not seeing evidence that this code has landed on Aurora, so maybe check it with the latest Nightly build as well.
Okay, nightly didn't help either. I can try again in a week or two and post update on the topic. Thanks.
I had missed that you hadn't installed WindowsMedia.
Unless you install that media pack then you won't be able to play MP3 file via HTML5 audio tags as that requires WindowsMedia to be installed properly and working.
Without this support then you can only play MP3 files embedded via the object tag and a plugin that can play these files.