Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to get properties of wave file in html  (Read 8927 times)

0 Members and 1 Guest are viewing this topic.

pratibha

  • Guest
how to get properties of wave file in html
« on: September 08, 2004, 12:34:57 AM »
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, http://www.phpfreaks.com/javascript_manual/page/li...
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

  <input type="radio" name="onetime" value="onetime" onclick="document.myForm.continous.checked=false"> One Time Play

  Enter Any Integer Value: <input type="text" name="txtSize" size="20"/>

  <input type="submit" value="Start" name="submit" onclick="playSound();">
     <input type="reset" value="Stop" name="reset" onclick="stopSound();">
</body>
</html>

thanks in advance