Internet & Networking > Web design

how to get properties of wave file in html

(1/1)

pratibha:
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

Navigation

[0] Message Index

Go to full version