Reputation: 131
I have the following code:
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<audio controls>
<source src="_music/mysong.mp3" type="audio/mpeg" />
<source src="_music/mysong.ogg" type="audio/ogg" />
Your browser does not support audio playback
</audio>
</body>
</html>
It works fine in Chrome. When I try to play in Firefox, it does nothing and the console gives the error "All candidate resources failed to load. Media load paused."
The MIME types in IIS are set to "audio/mpeg" for .mp3 files and "video/ogg" for .ogg files.
What can I do to play audio in Firefox ?
Upvotes: 0
Views: 610
Reputation: 1
you can use
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
or you update the browser
Upvotes: 0