Don't confuse onload function with play function
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
6cb8ce8951
commit
30780b0284
1 changed files with 4 additions and 5 deletions
|
@ -1,13 +1,12 @@
|
|||
window.onload = function() {
|
||||
play("error");
|
||||
setTimeout(function () {
|
||||
play("error");
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
function play(audioId) {
|
||||
let audioElement = document.getElementById(audioId);
|
||||
setTimeout(function() {
|
||||
audioElement.play();
|
||||
}, 1000
|
||||
)
|
||||
audioElement.play();
|
||||
}
|
||||
|
||||
function close_button(href) {
|
||||
|
|
Loading…
Reference in a new issue