Below is an awesome method. we are passing in the audio data itself as arguments. Now to get this audio base 64 data, the below site can be used. Nice one!
https://dopiaza.org/tools/datauri/index.php
function beep() {
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3....");
snd.play();
}
beep();
references:
https://stackoverflow.com/questions/879152/how-do-i-make-javascript-beep
https://dopiaza.org/tools/datauri/index.php
function beep() {
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3....");
snd.play();
}
beep();
references:
https://stackoverflow.com/questions/879152/how-do-i-make-javascript-beep
No comments:
Post a Comment