Why are my audio files not showing up in Firefox and IE?


i building website consist of audio files voice demos no longer 2 minutes in length. audio player shows , work great in safari. here coding looks like...

 

<audio controls="controlpanel">

    <source src="music/commercial demo.wav"type="audio/wav"/>

    <source src="music/commercial demo.ogg"type="audio/ogg"/>

    <source src="music/commercial demo.mp3"type="audio/mp3"/> </audio>

 

i've done reading , learned not web browsers use same file type why coded wav, ogg, , mp3. still no luck audio player showing in firefox or internet explorer. when page first loads in firefox audio players show for  second , disappear! coding incorrectly? read things firewalls , have mine down should not blocking anything.

 

here link site demos. can try opening in safari versus other web browsers , see problem. http://www.bristowvo.com/demos2.html

 

any insight appreciated! thanks!

firstly, you're using <audio> html5 tag, doctype shows xhtml1. change this:

 

 

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

 

 

to this:

 

 

<!doctype html>

 

 

browsers go quirks mode when see major doctype conflict such one.

 

secondly, html5 audio not supported/ native in browsers - older ones. can consider using 3rd party html5 player such http://mediaelementjs.com/ because have fallback mechanism ensure file works on older browsers.

 

another observation: there no space between 2 attributes in code.

 

    <source src="music/commercial demo.wav"type="audio/wav"/>

should ideally this:

 

    <source src="music/commercial demo.wav" type="audio/wav"/>

note space between src , type.



More discussions in Dreamweaver support forum


adobe

Comments