From 95b64fbe9b8dc8509f77b0f0ce54f61be0936b09 Mon Sep 17 00:00:00 2001 From: Nexos Creator <112468782+nexoscreator@users.noreply.github.com> Date: Sat, 13 Jul 2024 06:30:44 +0530 Subject: [PATCH 1/2] Update index.html --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 52b29ef..89c2538 100644 --- a/index.html +++ b/index.html @@ -88,6 +88,7 @@

+ - \ No newline at end of file + From 225ba5f66178706742a1bcd1dcfa3415cde91b9f Mon Sep 17 00:00:00 2001 From: Nexos Creator <112468782+nexoscreator@users.noreply.github.com> Date: Sat, 13 Jul 2024 06:31:47 +0530 Subject: [PATCH 2/2] Create autoplay.js --- js/autoplay.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 js/autoplay.js diff --git a/js/autoplay.js b/js/autoplay.js new file mode 100644 index 0000000..5f43562 --- /dev/null +++ b/js/autoplay.js @@ -0,0 +1,9 @@ +document.addEventListener("DOMContentLoaded", function() { + const musicPlayer = document.getElementById("disc"); + + // Autoplay the music when the page loads + musicPlayer.play().catch(error => { + console.error("Autoplay failed:", error); + // Autoplay might fail due to browser restrictions, inform the user if needed. + }); +});