fix(rmeets): replace Jitsi MI button with custom toolbar link + serve favicon.ico
Jitsi's built-in meetingintelligence toolbar button hit their paid API (404). Replaced with customToolbarButtons entry that opens our own MI page. Also serve favicon.png for /favicon.ico requests (was 503). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d9f5546b74
commit
9002e0ffb3
|
|
@ -755,9 +755,12 @@ routes.get("/:room", (c) => {
|
||||||
"raisehand","tileview","toggle-camera",
|
"raisehand","tileview","toggle-camera",
|
||||||
"fullscreen","chat","settings",
|
"fullscreen","chat","settings",
|
||||||
"participants-pane","select-background",
|
"participants-pane","select-background",
|
||||||
"sharedvideo","shareaudio","meetingintelligence",
|
"sharedvideo","shareaudio",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
customToolbarButtons: [
|
||||||
|
{ icon: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-4h2v-2h-2v2zm1-10c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z'/%3E%3C/svg%3E", id: "mi-btn", text: "Intelligence" },
|
||||||
|
],
|
||||||
interfaceConfigOverwrite: {
|
interfaceConfigOverwrite: {
|
||||||
SHOW_JITSI_WATERMARK: false,
|
SHOW_JITSI_WATERMARK: false,
|
||||||
SHOW_BRAND_WATERMARK: false,
|
SHOW_BRAND_WATERMARK: false,
|
||||||
|
|
@ -771,6 +774,12 @@ routes.get("/:room", (c) => {
|
||||||
// Remove loading spinner — iframe is already injected by the constructor
|
// Remove loading spinner — iframe is already injected by the constructor
|
||||||
var loadingEl = document.querySelector(".loading");
|
var loadingEl = document.querySelector(".loading");
|
||||||
if (loadingEl) loadingEl.remove();
|
if (loadingEl) loadingEl.remove();
|
||||||
|
// Custom toolbar button → open our MI page
|
||||||
|
api.addEventListener("toolbarButtonClicked", function(e) {
|
||||||
|
if (e.key === "mi-btn") {
|
||||||
|
window.open("${meetsBase}/meeting-intelligence", "_blank");
|
||||||
|
}
|
||||||
|
});
|
||||||
api.addEventListener("readyToClose", function() {
|
api.addEventListener("readyToClose", function() {
|
||||||
try { window.close(); } catch(e) {}
|
try { window.close(); } catch(e) {}
|
||||||
document.getElementById("jitsi-container").innerHTML =
|
document.getElementById("jitsi-container").innerHTML =
|
||||||
|
|
|
||||||
|
|
@ -4050,6 +4050,12 @@ const server = Bun.serve<WSData>({
|
||||||
if (adminHtml) return adminHtml;
|
if (adminHtml) return adminHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── favicon.ico → favicon.png fallback ──
|
||||||
|
if (url.pathname === "/favicon.ico") {
|
||||||
|
const staticResponse = await serveStatic("favicon.png");
|
||||||
|
if (staticResponse) return staticResponse;
|
||||||
|
}
|
||||||
|
|
||||||
// ── Static assets (before Hono routing) ──
|
// ── Static assets (before Hono routing) ──
|
||||||
if (url.pathname !== "/" && !url.pathname.startsWith("/api/") && !url.pathname.startsWith("/ws/")) {
|
if (url.pathname !== "/" && !url.pathname.startsWith("/api/") && !url.pathname.startsWith("/ws/")) {
|
||||||
const assetPath = url.pathname.slice(1);
|
const assetPath = url.pathname.slice(1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue