Reputation:
I was adding audio to an HTML5 website. The audio works fine with FireFox and IE but does not show up and play in FireFox. Any ideas why and solution? Thanks in advance.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<audio controls="controls" autoplay="autoplay">
<source src="cd.mp3" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>
</body>
</html>
Upvotes: 8
Views: 10905
Reputation: 2599
You can't play MP3 files with such a code in Firefox.
See https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
Upvotes: 1
Reputation: 17843
Firefox doesn't support MP3. It won't show the fallback message because it supports the audio tag. https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements#MPEG_H.264_(AAC_or_MP3)
Upvotes: 6