zebra-report: deploy — chimes play in background tabs
This commit is contained in:
parent
a044099de5
commit
051213e273
1 changed files with 12 additions and 6 deletions
|
|
@ -2902,9 +2902,11 @@ function stopMeter(uuid){ meterCtl.delete(uuid); }
|
|||
* autoplay policy is satisfied. Each tone uses a short exponential
|
||||
* fade-out to avoid click artifacts.
|
||||
*
|
||||
* Tones are skipped if the page is hidden (background tab) — the
|
||||
* idea is to notify the LIVE user, not interrupt them when they
|
||||
* stepped away.
|
||||
* Tones play even when the tab is in the background — the doorman /
|
||||
* mod use case wants to know a guest just arrived without having to
|
||||
* watch the tab. Browsers throttle some background work but Web
|
||||
* Audio scheduling is preserved as long as the AudioContext was
|
||||
* created after a user gesture (the 'enter' click counts).
|
||||
* ================================================================== */
|
||||
let _toneCtx = null;
|
||||
function _toneCtxGet(){
|
||||
|
|
@ -2913,8 +2915,12 @@ function _toneCtxGet(){
|
|||
return _toneCtx;
|
||||
}
|
||||
function playToneBlip(freq, durationMs, type){
|
||||
if (typeof document !== 'undefined' && document.hidden) return;
|
||||
const ctx = _toneCtxGet(); if (!ctx) return;
|
||||
/* if the user gesture was throttled (some mobile browsers suspend
|
||||
* the context on tab hide), nudge it back to running before
|
||||
* scheduling — resume() on a suspended context restarts the
|
||||
* timeline so the tone actually fires. */
|
||||
if (ctx.state === 'suspended'){ try { ctx.resume(); } catch(_){} }
|
||||
try {
|
||||
const t0 = ctx.currentTime;
|
||||
const osc = ctx.createOscillator();
|
||||
|
|
@ -4091,8 +4097,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');
|
|||
|
||||
<footer style="margin:2.2rem auto 0;font-size:0.65rem;color:#999;line-height:1.7;word-break:break-all;font-family:monospace">
|
||||
<span id="pi-seal" style="color:#777;cursor:default;user-select:none" title="">page integrity</span> · built <span class="stamp-date">2026-06-03</span><br>
|
||||
md5 <span class="stamp-md5">319e1c7b25a69f68c0c1b327e3bc24ad</span><br>
|
||||
sha256 <span class="stamp-sha">fcdbe9ca01318641fbc2af9a9ed32d651cdfedb29e7435b73bbb341050641d3e</span><br>
|
||||
md5 <span class="stamp-md5">52efb36e064b33523d89ed5d4669c095</span><br>
|
||||
sha256 <span class="stamp-sha">e8c6ff205eed77ea3501a0fcc86a9378c6c20578bad013de4cd7d1acfc01ce88</span><br>
|
||||
<span style="color:#bbb">hashes are of this page with these two fields zeroed — to verify, blank them and re-hash</span><br>
|
||||
<span style="color:#bbb">one self-contained file — <strong>save a copy</strong> and verify against these hashes; point at your own servers with ?signal= and ?turncred=, or <a href="host-your-own.html" style="color:#999">host your own community</a></span>
|
||||
</footer>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue