Click here to Skip to main content
15,901,368 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using below code from an another javascript function which is in loop calling below PlaySound function. This function is working fine. But after removing alert it is just working first time and in the next subsequent call this is not working.

Please help

<script type="text/javascript">
function PlaySound(Filename) {

alert("");



document.getElementById("dummy").innerHTML =
<embed src=\"" + Filename + ".wav" + "\" hidden=\"true\" autostart=\"true\" loop=\"false\" />";
}
</script>
Posted

1 solution

use html 5 video tag


C#
<video width="400" controls>
  <source src="mov_bbb.mp4" type="video/mp4">
  <source src="mov_bbb.ogg" type="video/ogg">
  Your browser does not support HTML5 video.
</video>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900