feat(theatre): an experimental web browser on the theatre screen

In a theatre, "Browser" puts a web page on the screen for that player
alone, beside "Your Video". The desktop client (1.3.3) draws it in a
sandboxed webview of its own over the game page, which tells it where,
what the game draws over it, and where to go; nothing of it goes to the
server.

- off by default: the admin panel's Debug tab turns it on for everyone
  (setting theatreBrowser). the server marks the game page with
  data-theatre-browser="on" as it sends it (lib/http.js), and the page
  shows the button only when the server allows it and the client says it
  can draw it, so older clients never see a button that does nothing.
- the boxes over the screen share one style (.aj-box), and a clicked
  button no longer keeps Chromium 87's focus ring.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
BurrowdevandClaude Opus 5.5 committed 2026-10-21 20:50:44 +03:00
1 parent 64eab1f8ad
commit 9720d309fa
4 files changed
+272 -19

No files matched your search

+11
View File
@@ -1091,6 +1091,12 @@
<label class="check"><input id="debug-onsale" type="checkbox"> Everything on sale</label>
<p class="status" id="debug-sale-status" role="status"></p>
</section>
<section>
<h2>Theatre browser (experimental)</h2>
<label class="check"><input id="debug-theatre-browser" type="checkbox"> Players may open a web browser on the theatre screen</label>
<p class="hint">For each player alone, on desktop client 1.3.3 or newer; nothing they see reaches the server. The client's browser is an old Chrome, so a bad site could harm a player's computer.</p>
<p class="status" id="debug-browser-status" role="status"></p>
</section>
</div>
</div>
@@ -2609,6 +2615,7 @@
$("debug-player").value = player;
}
$("debug-onsale").checked = data.everythingOnSale;
$("debug-theatre-browser").checked = data.theatreBrowser;
if (debugRooms.length !== data.rooms.length) {
debugRooms = data.rooms;
renderDebugRooms();
@@ -2621,6 +2628,10 @@
setStatus($("debug-status"), result.data.ok || result.data.error || "That did not work.", !result.ok);
});
$("debug-room").addEventListener("dblclick", () => $("debug-go").click());
$("debug-theatre-browser").addEventListener("change", async () => {
const result = await api("debug", {action: "theatreBrowser", on: $("debug-theatre-browser").checked});
setStatus($("debug-browser-status"), result.data.ok || result.data.error || "That did not work.", !result.ok);
});
$("debug-onsale").addEventListener("change", async () => {
const result = await api("debug", {action: "everythingOnSale", on: $("debug-onsale").checked});
setStatus($("debug-sale-status"), result.data.ok || result.data.error || "That did not work.", !result.ok);