Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

Html5 audio doesn't work for mp3s.

  • 13 件の返信
  • 11 人がこの問題に困っています
  • 29 回表示
  • 最後の返信者: cor-el

more options

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).

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).

この投稿は Leprechaunius により に変更されました

選ばれた解決策

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/

この回答をすべて読む 👍 0

すべての返信 (13)

more options

hello Leprechaunius, is your windows 7 system fully updated (service pack 1)? the sample you have provided works fine for me...

more options

Hi, yes, I have fully updated sp1 system.

more options

can you replicate the issue, when you create a new profile for testing purposes?: Profile Manager - Create, remove or switch Firefox profiles

more options

Yes, the problem still persists even in new profile.

more options

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?

more options

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?

more options

選ばれた解決策

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/

この投稿は philipp により に変更されました

more options

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.

more options

What is the value of media.directshow.enabled in Aurora?


more options

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?

more options

I'm not seeing evidence that this code has landed on Aurora, so maybe check it with the latest Nightly build as well.

more options

Okay, nightly didn't help either. I can try again in a week or two and post update on the topic. Thanks.

more options

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.