mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
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:
1 parent
64eab1f8ad
commit
9720d309fa
4 files changed
+272
-19
No files matched your search
+3
-1
@@ -1104,7 +1104,9 @@ const handle = async (req, res) => {
|
||||
// not to be put in a frame of anyone's; the client shows it in a view of its own.
|
||||
res.setHeader("X-Frame-Options", "DENY");
|
||||
res.setHeader("Referrer-Policy", "no-referrer");
|
||||
send(res, 200, await fs.promises.readFile(path.join(config.publicDir, "game.html")), MIME[".html"]);
|
||||
// the admin's switch for the theatre browser (lib/panel.js), for the page to read
|
||||
send(res, 200, String(await fs.promises.readFile(path.join(config.publicDir, "game.html")))
|
||||
.replace("<html>", panel.theatreBrowserOn() ? '<html data-theatre-browser="on">' : "<html>"), MIME[".html"]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user