I am using jPlayer to embed two audio files in my page, basically the code is cut'n'pasted from this page. One is a wav, the other an mp3. Everything works fine staged locally (mac), but when I upload it to the server, the audio files fail in odd ways.
Chrome starts the wav file 30 seconds in—even though the location scrubber starts from the beginning—and ends early, so I suspect the javascript gets the correct length of the sound file regardless. The mp3 never even starts playing. It pretends to load, but then it doesn't.
Safari works fine, somehow.
Firefox plays fine, too. Maybe because it falls back on the flash option of the players?
IE8 plays the mp3, but not the wav, and fails to display the progress bar for the former.
I thought at first it was an issue with how I uploaded the files. Initially I had used Transmit, which ought to be wise about ascii vs binary. I tried scping the files, but they were still acting screwy.
I thought then maybe the mime type was not correctly set, so I added two lines to the .htaccess file in my assets folder, but that changed nothing. Here's what the htaccess file looks like, maybe I forgot something that I also need to include?
# prevent CGI and PHP executing in assets; php_flag doesn't actually do anything
# since lower-level settings trump any attempt to turn it off in htaccess.
# I'll leave it here for posterity.
deny from all
Options -ExecCGI
php_flag engine 0
# Break other files
<Files ~ "\.(gif|GIF|jpe?g|JPE?G|png|PNG|docx?|DOCX?|pdf|PDF|swf|SWF|flv|FLV|ppt|PPT|pps|PPS|mp3|MP3|wav|WAV)$">
order deny,allow
allow from all
</Files>
AddType audio/x-wav wav
AddType audio/mpeg mp3
Ideas?
EDIT: I tried changing the mime type to application/octet-stream for both wav and mp3 and that didn't seem to do anything to the player application; if I linked directly to the audio files, it would download them.