chat notifications sound audio for webpage using js
Page 1 of 1
chat notifications sound audio for webpage using js
- Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>J~Net Audio test</title>
<script type="text/javascript">
function playSound(filename){
document.getElementById("sound").innerHTML='<audio autoplay="autoplay"><source src="' + filename + '.mp3" type="audio/mpeg" /><source src="' + filename + '.ogg" type="audio/ogg" /><embed hidden="true" autostart="true" loop="false" src="' + filename +'.mp3" /></audio>';
}
</script>
</head>
<body>
<button onclick="playSound('notify');">Play</button>
<div id="sound"></div>
</body>
</html>
Similar topics
» Sound FX And Sound Clips
» Include file containing sound if time is less than code
» jami free chat for linux free vid chat app that also works on Raspbery Pi
» Linux Web Server Sound Clips With Jquery AI Bot Function
» Safely Power Off RPI 3 From A Webpage Toggle Switch Jquery PHP & Python
» Include file containing sound if time is less than code
» jami free chat for linux free vid chat app that also works on Raspbery Pi
» Linux Web Server Sound Clips With Jquery AI Bot Function
» Safely Power Off RPI 3 From A Webpage Toggle Switch Jquery PHP & Python
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum