javascript - JS playing sound on IE -


i have simple code playing sound effect in js in onmouseover event. works this

<script type="text/javascript">     var sonido=document.getelementbyid("neonclip"); </script> <audio preload id="neonclip">     <source src="http://www.mysite/neon.ogg" type="audio/ogg" /> </audio> 

and onmouseover bit:

onmouseover="document.getelementbyid('neonclip').play();" 

problem works in firefox/opera/chrome not on ie, need work in major browsers. know problem sound file format, ie can't play .ogg. need add .mp3 maybe, how should it? adding if detecting browser in script?


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -