.htaccess - HTML5 <audio> tag do not work/play in IE10 -
i have page display audio .ogg/.mp3-files listening in browser (it purchased products being displayed on "receipt"-page).
the files super in chrome, opera, safari , firefox , can play them, pause, restart , everything.
today use quick fix , forces browser if ie simulate ie7 version , works, of course prtty ugly-looking. can skip <meta http-equiv="x-ua-compatible" content="ie=emulateie7">
, use compatibility view , same result.
in ie10 win7 (got latest version) displayed , cannot press play-button: http://snag.gy/kanry.jpg can have at: http://energyshop.se/testry.php/
also, myclient uses older version of ie , same her.
i can add if ihit f12 , switch compatibility view of ie10 audio working , im able listen them - not unclick compatibility view.
this code used audio (test code) (and heres: http://pastebin.com/enrpj8cx full code version of pdt.php):
<!doctype html> <html> <head> <title>tack för ert köp!</title> <meta http-equiv="x-ua-compatible" content="ie=9"/> <link rel="stylesheet" type="text/css" href='/phpstyles.css' /> </head> <body> <?php echo("<audio id='testry' controls preload='auto'>"); echo("<source src='/1.mp3' />"); echo("<source src='1.mp3' />"); echo("<source src='1.mp3' />"); echo("<source src='/1.mp3' type='audio/mpeg' />"); echo("<source src='1.mp3' type='audio/mpeg' />"); echo("<source src='/1.mp3' type='audio/mp3' />"); echo("<source src='1.mp3' type='audio/mp3' />"); echo("your browser not support audio tag."); echo("</audio>"); ?> </body> </html>
and here .htaccess: http://pastebin.com/2mz8qwev
also, here head, meta , doctype page (its pdt.php)
<!doctype html> <html> <head> <title>tack för ert köp!</title> <link rel="stylesheet" type="text/css" href='/phpstyles.css' /> <script src="http://api.html5media.info/1.1.5/html5media.min.js"></script> </head>
i know ie9+ supports .mp3 , have updated whats up? anyone?
ive seen similar issue 1 before. dealing .ogg , .mp3 file types in ie9 + html5 audio.
problem resolved tweaking mime type declarations in .htaccess file while filetypes worked in other browsers fine - ie9 alone picky work with...
going investigate further - more info soon.
i curious hosting situation? (win / linux - self hosted / shared?) assumed shared linux because of php files common scenario.
edit:
depending on hosting situation - (you own hardware / vps / or using shared hosting) people have found windows based hosting providers web.config files in fact overwriting mime type declarations but unable verfiy hosting situation linux based
after bit of searching found few other documented cases of issue , other solutions involved:
for shared / hosted sites, developer converted mp3 files .m4a had working mime types within ie9
additionally if interested this microsoft developer network article - details bit of reason why ie9 behaves way
this stack question similar issue on apache tomcat server
Comments
Post a Comment