Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PRIMER.md
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ Automatic, from the show's location; there is no setting. `lib/units.js` reverse
| 0.33.280-beta.1 | **iPhone/iPad: the viewer page no longer runs out of memory with the player open.** Why: on an iPad (Safari and the ShowPilot app alike) the page reloaded after a few minutes of playing; the iOS memory report showed the page's web process at ~1.9 GB, killed at the per-process limit, while the page alone with the player closed was fine. The player's frosted-glass blur (`backdrop-filter` on `#of-listen-panel`, the fixed progress strip and the time pill) is re-rendered every frame over anything moving behind it (a template's falling snow, the live bulbs, the ticking time) and iOS's web engine holds on to that memory. On Apple touch devices (iPhone/iPod/iPad, including iPadOS's desktop user agent) a small stylesheet turns those blurs off; the panels keep their dark backgrounds. Other platforms unchanged. Player cache-buster 149. Checked: `node --check`; headless Chrome with an iPad user agent (style present, panel `backdrop-filter: none`) and an Android one (unchanged, `blur(8px)`). Main only (audio player). |
| 0.33.280-beta.2 | **Live player decorations no longer crash the page on iPhone/iPad.** Why: tests on an iPad narrowed beta.1's memory crash down: page alone fine, player with plain Christmas fine, player with Christmas Live crashed (Safari and the app). The live lights set a CSS variable (`--lvl` on each bulb, `--beat/--treble/--energy` on `#of-deco`) ~30×/s; that restyles the whole subtree including the bulbs' inline SVGs with gradient `<defs>`, and iOS's web engine kept the memory until the page hit its ~1.9 GB limit. Now `liveFrame` sets only the glow elements' own `opacity`/`transform` (`.ofd-halo` + `.ofd-hot` per bulb; `.ofd-nyhalo`, `.ofd-nyglint`, `.ofd-nyspots` for New Year's Live), the halos are `will-change: opacity, transform`, the CSS rules keep just the resting values, and inline values are cleared whenever live goes off (`liveOff()`), so the twinkle animation takes over again. Same formulas, same look. Apple touch devices update every 48 ms (~20/s) instead of 30 ms. beta.1's no-blur rule on iPhone/iPad stays (cheaper, not the cause). Player cache-buster 150. Checked: `node --check`; headless Chrome with a stub app bridge: Christmas Live (16 bands requested, halos/hot cores follow the fed levels, no variables on `#of-deco`, muting removes live and clears the inline values so `ofdGlow` resumes), New Year's Live (3 bands, halo/spots follow), plain Christmas (no live). Main only (audio player). |
| 0.33.280-beta.3 | **Player blur back on iPhone/iPad.** beta.1 turned off the player's `backdrop-filter` on Apple touch devices as a first guess at the iPad page crash; testing showed the cause was the live decorations' per-frame CSS variables (fixed in beta.2), and the crash still happened with the blur off. The `sp-ios-noblur` stylesheet is removed, so the player looks the same everywhere again. Player cache-buster 151. Checked: `node --check`. Main only (audio player). |
| 0.33.280-beta.4 | **iPhone: the automatic timing check can use the microphone again.** Why: reported in PR #71 by jddocea — on iPhone Safari the mic failed with "audio session category is not compatible with audio capture", because the player keeps the iOS audio session on `'playback'` (so it ignores the mute switch) and that mode doesn't allow recording. `ltGetMic()` now switches `navigator.audioSession.type` to `'play-and-record'` just before `getUserMedia`; `ltDetect()` already sets it back to `'playback'` when the mic closes (success and error paths). The PR's version changed all four `'playback'` assignments, which would have kept every iPhone listener in record mode (risking quieter/earpiece output) and cancelled the reset after measuring, so only the mic path changes. Player cache-buster 152. Checked: `node --check`. Credit: jddocea (diagnosis and first fix). Main only (audio player). |

**Plugin version history (this session):**
| Version | Change |
Expand Down
2 changes: 1 addition & 1 deletion lib/viewer-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ ${visitorMessages.BOX_CSS}${showButtons.CSS}</style>
<script>window.__SHOWPILOT__ = ${JSON.stringify(bootstrap)};</script>
<script src="/socket.io/socket.io.js"></script>
${cfg.debug_mic_measure === 1 ? '<script src="/sp-mic.js?v=4"></script>' : ''}
<script src="/rf-compat.js?v=151"></script>
<script src="/rf-compat.js?v=152"></script>
`;
if (html.includes('</body>')) {
html = html.replace('</body>', injection + '</body>');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "showpilot",
"version": "0.33.280-beta.3",
"version": "0.33.280-beta.4",
"description": "Self-hosted light show viewer control server. Falcon Player (FPP) plugin compatible. Replaces Remote Falcon for self-hosters.",
"main": "server.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion public/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2101,7 +2101,7 @@ <h1>ShowPilot <span class="login-brand-sub">Admin</span></h1>
<rect class="lp" x="8" y="-3" width="5" height="5" rx="1"/>
</svg>
<span class="app-brand-text">ShowPilot</span>
<span class="app-version">v0.33.280-beta.3</span>
<span class="app-version">v0.33.280-beta.4</span>
</span>
<span id="modePill" class="mode-pill off">OFF</span>
<span class="header-spacer"></span>
Expand Down
6 changes: 6 additions & 0 deletions public/rf-compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -4101,6 +4101,12 @@
}
async function ltGetMic() {
const base = { echoCancellation: false, noiseSuppression: false, autoGainControl: false };
// iOS Safari refuses the mic while the audio session is 'playback'
// ("audio session category is not compatible with audio capture").
// Switch to play-and-record only for the measurement; ltDetect() puts
// it back to 'playback' when the mic closes, so normal listening is
// unchanged. Feature-detected: a no-op outside Safari. (Thanks jddocea, #71)
try { if (navigator.audioSession) navigator.audioSession.type = 'play-and-record'; } catch (_) {}
let stream = await navigator.mediaDevices.getUserMedia({ audio: base });
let devices = [];
try {
Expand Down
Loading