Autosave: 20260322-150724
This commit is contained in:
parent
04bd70e7d8
commit
a03fa77672
@ -169,9 +169,6 @@ try {
|
||||
<div class="header">
|
||||
<h1 class="m-0"><i class="bi bi-hospital"></i> Hospital Queue Status / حالة انتظار المستشفى</h1>
|
||||
<div class="clock" id="clock">00:00:00</div>
|
||||
<button id="audioBtn" class="btn btn-warning position-absolute top-0 start-0 m-3" style="z-index: 1001;" onclick="enableAudio()">
|
||||
<i class="bi bi-volume-mute-fill"></i> Enable Sound
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid p-4">
|
||||
@ -188,18 +185,10 @@ try {
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let audioEnabled = false;
|
||||
let audioEnabled = true;
|
||||
const announcedIds = new Set();
|
||||
let isFirstRun = true;
|
||||
|
||||
function enableAudio() {
|
||||
audioEnabled = true;
|
||||
document.getElementById('audioBtn').style.display = 'none';
|
||||
// Play a silent utterance to unlock audio context on mobile
|
||||
const u = new SpeechSynthesisUtterance('');
|
||||
window.speechSynthesis.speak(u);
|
||||
}
|
||||
|
||||
function updateClock() {
|
||||
const now = new Date();
|
||||
document.getElementById('clock').innerText = now.toLocaleTimeString();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user