I am trying to implement background music on a website using the audio object, which is controlled by a JavaScript, I have posted a question about this before, @LazyOne explained that IIS will not serve unknown MIME types, and neither will the VS development server.I have now uploaded the site to an IIS 7 server, the MIME type for ogg is in place and when the site in accessed the server returns a 206 partial content (mozilla.org mentions that 206 responses are normal and expected for ogg files) and assessing the file directly works fine in Firefox (i.e. if you go to domain.com/music/file.ogg, it plays in the browser).  and the file plays fine in the background if the autoplay attribute is set, but it does not play via JavaScript.Here is the JavaScript in question and relevant html:audioMusic.volume = 0.15;function playMusic(){       audioMusic.play();}function stopMusic(){    audioMusic.pause();}Relevant html:<html xmlns=http://www.w3.org/1999/xhtml><head>    <title></title></head><body>  <a href=javascript:void(0) onclick=playMusic()>on</a>  <a href=javascript:void(0) onclick=stopMusic()>off</a> <audio id=audioMusic loop=loop preload=auto>   <source src=/Music/music.ogg type=audio/ogg />   <source src=/Music/music.mp3 type=audio/mp3 />     </audio>  <script type=text/javascript src=/Scripts/music.js></script></body></html>More interesting facts: the playMusic() function is called in firefox, if you add an alertat the beginning it does off, but it is not able to execute:audioMusic.play()I have also tried document.getElementById(audioMusic).play();  Both document.getElementById(audioMusic).play() andaudioMusic.play() work in Chrome and IE, but not in firefoxI am using Firefox 5.0.1 (the latest)Question: how to control the audio element via JavaScript in Firefox? 
Using  in Firefox with JavaScript
javascript;html5;firefox;audio
Well, I still don't know exactly why Firefox didn't want play that file, but if anyone is having the same issue - I ended up using jPlayer. You can download it from: http://www.jplayer.org/TODO:Place the jPlayer files in your scripts folder, then you can use this html page to implement the player on your website: http://pastebin.com/mhdt2m7WMake sure to change the file names and directories as needed, namely the music file location and the location of your scripts folder.Good luck.