Why do I still get giant gray 'X's instead of an audio player, even with the correct MIME type for my Ogg Vorbis file, whether coded in the audio tag or as a source?
I uploaded Saturnalia.ogg to my site and used the audio tag to try to display it on my test page. I'd love to ditch the ultra-slow Flash players I currently use, but I don't want to leave most of my site's users wondering what the files sound like, where they are, and why are there giant gray Xs ruining my layout. The audio files work fine in Safari and Opera, and IE uses the correct fallback text. I've tried both coding the file into the audio tag and into source tags. I've set controls="controls" and tried both type="audio/ogg" and type="audio/vorbis". I've tried with and without autoplay.
According to Mozilla, audio tags are supported, but I'm not seeing any of that support on my site.
All Replies (5)
Make sure that the server sends the file(s) with the correct MIME type.
See:
I don't own the server. My CODES use the correct MIME type, so I don't see why the server would change it. Since all my testing on different browsers goes through the same server, and all but Firefox works properly, I don't think it's a server issue. If it was the server, Safari, Opera, and Chrome would not show a properly functioning player and IE would not show the correct fallback text.
I checked all 3 links before posting this question.
After 3 weeks of troubleshooting headache, I've pretty much given up hope that there is a short, elegant solution to the issue. In the meantime, I'm forcing it to work as a Java applet (Cortado). Now my issues are turning off autoplay and forcing the controls to display, mouseover or not. They currently display ONLY for a mouseover and play automatically-not a horribly huge issue, considering the loading icon pops up and a pop up asks if you wish to verify the certificate in order to play the applet, letting the user know SOMETHING is there...except for 3 albums playing automatically at the same time will be VERY annoying to the average user.
I want to encourage users to visit my site, not drive them away. I would prefer that the audio tags work properly without the need for Java or Flash.
http://desolosubhumus.webs.com/test.html (page not available through links in the site until it works properly)
The file http://desolosubhumus.webs.com/dsh.ogg is send as text/plain, so Firefox won't play is as an audio file.
cor-el দ্বারা পরিমিত
Where are you seeing that?
Earlier:
<audio src="dsh.ogg" controls="controls" type="audio/ogg">Your browser does not support the HTML5 audio tag.</audio>
Now:
[<object type="application/x-java-applet" width="580" height="15px" controls="controls">
<param name="archive" value="cortado.jar" />
<param name="code" value="com.fluendo.player.Cortado.class" />
<param name="url" value="http://desolosubhumus.webs.com/dsh.ogg" />
You need to install Java to play this file.
</object>]
<audio src="dsh.ogg" type="audio/ogg">
You need to install Java to play this file.
</audio>
- p tags removed for readability
I know the audio tag should open before the object tag opens and close after the object tag closes, and that I shouldn't need duplicate fallback text, but it wouldn't show up that way. The way I have it set up now finally works on Firefox, IE (plays, not fallback text), Opera, Safari, and Chrome. I'm still trying to tweak the code to make it more standard (audio tags in the proper places), to clean it up so it's not such a huge chunk, and to see if I can get the applet to stay visible (which may not be possible, as the only way I've made it work is as a Cortado VIDEO instead of a purely audio file), and to make it stop autoplaying instead of playing when the user chooses play. Perhaps a Kate stream for track labels and a play button image set directly behind the applet when the play button actually is.
desolo দ্বারা পরিমিত