Skip to content

Commit

Permalink
Update mobile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aaravaggarwal3535 authored Nov 23, 2024
1 parent ca6bc03 commit 4a44e3e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,17 @@ function createEmojis() {
setInterval(createEmojis, 1000);


// window.onload = function() {
// const audio = document.getElementById('background-music');
// audio.volume = 0.5;
// audio.play().catch(error => {
// console.log('Audio playback failed:', error);
// });
// };
window.onload = function() {
const audio = document.getElementById('background-music');
audio.volume = 0.5;
audio.play().catch(error => {
console.log('Audio playback failed:', error);
});
};

// document.addEventListener('click', function() {
// const audio = document.getElementById('background-music');
// audio.play().catch(error => {
// console.log('Audio playback failed:', error);
// });
// });
document.addEventListener('click', function() {
const audio = document.getElementById('background-music');
audio.play().catch(error => {
console.log('Audio playback failed:', error);
});
});

0 comments on commit 4a44e3e

Please sign in to comment.