Here we go. It is a very helpful example for make user friendly application by using HTML5 audio tag. When an error occurs, users can be notified by a sound.
In index.html write this:
<body class="sapUiBody"> <div id="content"></div> <audio id="idErrorSound"> <source src="audio/ErrorSound.mp3"></source> </audio></body>
Now write a small javascript which can be called from your application when you found an error/mistake done from user end:
function playErrorSound() { var audio = document.getElementById("idErrorSound"); audio.play(); }
Now here we can see a small code snippet where we are calling this js written above:
if (error) { playErrorSound(); // open a dialog to give user a message }