Skip to content

Commit 106ddbd

Browse files
author
Oles Rubinovsky
committed
Audio fix
1 parent 75f5b4d commit 106ddbd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

hotel/audio/audio.mp3

-2.26 MB
Binary file not shown.

hotel/js/common.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ $(document).ready(function(){
6464
})
6565
}
6666
$(window).load(function () {
67-
// if ($('audio').is('#bg_audio')) {
68-
// $('#bg_audio').onloadeddata = function(){
69-
// }
70-
// }
67+
if ($('audio').is('#bg_audio')) {
68+
$('#bg_audio').on('canplay', function(){
69+
$('#preloader').fadeOut(500);
70+
});
71+
}
7172
setTimeout(function(){
7273
$('#preloader').fadeOut(500);
73-
$('#bg_audio').play();
7474
window.sr = ScrollReveal({
7575
reset: true,
7676
duration: 1000,
@@ -120,6 +120,6 @@ $(document).ready(function(){
120120
},400);
121121
setTimeout(function(){
122122
$('#preloader').fadeOut(500);
123-
}, 3000)
123+
}, 3000)
124124
});
125125
})

0 commit comments

Comments
 (0)