javascript - OnHover HTML5 audio on Safari -


i created simple nav bar on-hover mp3/ogg audio playback. works on browsers except safari on windows, judging autor should work on too. can take on mac , let me know working http://goo.gl/h2k6pn

<audio id="aruba" controls preload="auto">   <source src="audio/aruba.mp3"></source>   <source src="audio/aruba.ogg"></source> </audio>  <ul class="top-level"> <li><a href="#" class="palm-tree" id="arubaplay">link</a></li> </ul> 

js

window.onload=function(){  // collecting audio files var aruba = document.getelementbyid('aruba'); var arubaplay=document.getelementbyid('arubaplay');  arubaplay.onmouseover=function(){  aruba.play();  return false; }; 

windows safari not support html audio tags without quicktime installed. link works on os x safari.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -