Html5 Audio with JavaScript won't work any browser other than chrome Basically on button press I want to be able to switch the current track to another. This works finally in Chrome but not in any other browser? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>MediaPlayer Won't Work in Any browser other than chrome</title> <script type="text/javascript"> function Test(){ var Mp3Me= document.getElementById('Mp3Me'); Mp3Me.src = "http://media.rolandus.com/mp3/v-piano_vintage_piano_1.mp3"; } </script> </head> <body> <audio id="Mp3Me" autoplay autobuffer controls> <source src="Batman.mp3" type="audio/mpeg"> </audio> <a href="javascript:Test()">Start Piano Track</a> </body> </html>
audio
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)