Đang xem các bài viết theo từ khóa

đảo Bé

Thương nhớ Lý Sơn

Thiên nhiên ban tặng cho Quảng Ngãi một hòn đảo mang tên Lý Sơn. Cái nắng, cái gió miền Trung đã hun đúc cho hòn đảo này…
document.addEventListener("DOMContentLoaded", function () { const audio = document.getElementById("articleAudio"); const button = document.getElementById("mobileAudioButton"); if (!audio || !button) { return; } button.addEventListener("click", function () { if (audio.paused) { audio.play().then(function () { button.classList.add("playing"); button.querySelector("span").textContent = "⏸️"; button.setAttribute( "aria-label", "Tạm dừng audio" ); }).catch(function (error) { console.log("Không thể phát audio:", error); }); } else { audio.pause(); button.classList.remove("playing"); button.querySelector("span").textContent = "🔊"; button.setAttribute( "aria-label", "Phát audio" ); } }); /* Khi audio phát hết */ audio.addEventListener("ended", function () { button.classList.remove("playing"); button.querySelector("span").textContent = "🔊"; button.setAttribute( "aria-label", "Phát audio" ); }); });