Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Playing sound in new browsers

Status
Not open for further replies.

JerryH

Programmer
Jul 8, 2000
15
0
0
US
So I followed the directions at:


to use the embed command to play a wave file. Below is the code:


<html>
<body>
<script language=&quot;JavaScript&quot;><!--
function playSound() { document.firstSound.play(); }
//--></script>
<a href=&quot;javascript:playSound()&quot;>Play Sound</a><br>
<embed src=&quot;sound.wav&quot; hidden=true autostart=false loop=false name=&quot;firstSound&quot; mastersound>
</body>
</html>


The command works in older browsers (NS4 & IE5) but none of the new ones such as NS6+ and IE6. It appears that the &quot;<embed>&quot; and &quot;document.firstSound.play()&quot; are no longer supported. Does anyone know of a workaround that will work in the old as well as the new NS and IE browsers?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top