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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find the properties of .wav file

Status
Not open for further replies.

pratibha14

Technical User
Mar 2, 2004
30
hi

how can we know that given .wav file playing using embed tag is completed or not. And what are the properties and events related with .wav file.

One more thing, says that embed.play can take two parameters while that doesn't work in IE.

So tell me how can we change the src dynamically in embed tag. as
document.embedname.src='something.wav'
doesn't work in following code. it still plays the online.wav

<script language="JavaScript">

function playSound()
{
document.guitar.src='ring.wav'
self.document.guitar.play()
}

function stopSound()
{
self.document.guitar.stop()
}

</script>

<html>
<head>
<title> Play Wave file </title>
</head>

<body>
<span id=test></span>
<embed name="guitar" src="online.wav" loop=true autostart=false hidden=true mastersound>

<input type="radio" name="continous" value="continous" checked onclick="document.myForm.onetime.checked=false"> Continous Play <br>
<input type="radio" name="onetime" value="onetime" onclick="document.myForm.continous.checked=false"> One Time Play <br>
Enter Any Integer Value: <input type="text" name="txtSize" size="20"/> <br>
<input type="submit" value="Start" name="submit" onclick="playSound();">
<input type="reset" value="Stop" name="reset" onclick="stopSound();">
</body>
</html>

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top