audio in internet explorer and cross-browser
I have an audio element in a webpage for a client and i have coded it as well as i开发者_JAVA百科 can but i still can't get it to work on All browsers. I know cross browser and browser editions (i.e. internet explorer 6,7,8,9 ) with audio is tricky but there has to be an answer here. Can this be done and without needing browser plugins? Here is my current code.
<audio preload="auto" autobuffer autoplay="autoplay">
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.mp3"/>
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.ogg" />
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.wav" />
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.au" />
<source src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.wma" />
<!-- browser compatibility fallbacks -->
<object>
<param name="autostart" value="true">
<param name="src" value="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.wav">
<param name="autoplay" value="true">
<param name="controller" value="false">
<embed src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.wav" controller="false" HIDDEN="TRUE" autoplay="true" autostart="True" type="audio/wav" />
<embed src="http://brodysfurniture.com/wp-content/themes/Brodys/images2/08_Track_8.mp3" controller="false" HIDDEN="TRUE" autoplay="true" autostart="True" type="audio/mpeg" />
</object>
<!-- End browser compatibility fallbacks -->
</audio>
I would look here for some answers. I personally have made a page that uses the native <audio>
element but provides a WMP fall back for the less tech savvy users that insist on using old deprecated software.
精彩评论