zebra-report: deploy camera permission probe telemetry

This commit is contained in:
russell@unturf.com 2026-06-08 08:02:51 -04:00
parent e4493f292d
commit d27b959436
No known key found for this signature in database

View file

@ -4618,6 +4618,30 @@ async function sfuPublishCamera(){
'camera open cancelled: '+(e.name||'Error')+' — '+e.message+
' (constraints: 1280x720@30 16:9'+(exact?' deviceId='+String(exact).slice(0,8):'')+')'
);
/* Diagnostic snapshot — runs AFTER getUserMedia returned, so the
* await doesn't break transient activation for any subsequent
* retry. Captures (1) Permissions API state for camera (what
* Firefox itself says about the permission, separate from
* getUserMedia's return), (2) document visibility (Firefox auto-
* denies for hidden documents), (3) user-activation state (gesture
* propagation). Lets us tell apart "saved deny" / "global pref
* block" / "no gesture" / "hidden doc" without another roundtrip.
* Fox ticket 0002. */
let permState = 'n/a', visState = 'n/a', activation = 'n/a';
try {
if (navigator.permissions && navigator.permissions.query){
const p = await navigator.permissions.query({ name: 'camera' });
permState = p.state;
}
} catch(_){}
try { visState = document.visibilityState || 'n/a'; } catch(_){}
try {
if (navigator.userActivation){
activation = (navigator.userActivation.isActive ? 'active' : 'inactive') +
'/hasBeenActive=' + (navigator.userActivation.hasBeenActive ? 1 : 0);
}
} catch(_){}
logLine('', 'camera permission probe: state='+permState+' vis='+visState+' activation='+activation);
/* OverconstrainedError + a saved deviceId is the canonical "saved
* device gone or renamed" case — retry once without deviceId so the
* user gets default camera rather than a permanent fail. */
@ -8161,8 +8185,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> &nbsp;·&nbsp; built <span class="stamp-date">2026-06-08</span><br>
md5 <span class="stamp-md5">dac485556cfbbfd960687ca80326869b</span><br>
sha256 <span class="stamp-sha">733bf1210df3b6fbd314fa4c22811823474d5e71ffef40ff5ccbc79de99c41b1</span><br>
md5 <span class="stamp-md5">f0683ffe29d81f94723827e7a30dfd79</span><br>
sha256 <span class="stamp-sha">82b472dbfb211e43d0e9a38c671fde545e87a242a8dd500115a6837d94b0d137</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>