mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-02 17:32:50 +08:00
Don't offer streaming in demo mode
DemoSocket answers a fixed set of gateway messages and silently drops the rest, setupstream among them. Clicking the button on the public demo would therefore prompt the visitor to pick a screen, start the capture, and then leave the panel at "starting" forever with no error - which reads as a broken feature rather than an absent one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
9652a3efe5
commit
e7d5b3be0a
2 files changed
+11
-2
No files matched your search
+9
-2
@@ -9088,8 +9088,15 @@ function AppInner() {
|
||||
<button
|
||||
className={`ts-icon-button${publishState === "live" ? " ts-mic-on" : ""}`}
|
||||
onClick={handleStreamButton}
|
||||
disabled={!connected || ownClientId === null}
|
||||
title={`${publishState === "live" ? t("publish.stop") : t("publish.start")} (${t("publish.alpha")})`}
|
||||
// DemoSocket has no answer for setupstream, so in demo mode the
|
||||
// panel would sit at "starting" forever - after the browser has
|
||||
// already asked the visitor to pick a screen. Don't offer it.
|
||||
disabled={!connected || ownClientId === null || DEMO_MODE}
|
||||
title={
|
||||
DEMO_MODE
|
||||
? t("publish.demoUnavailable")
|
||||
: `${publishState === "live" ? t("publish.stop") : t("publish.start")} (${t("publish.alpha")})`
|
||||
}
|
||||
>
|
||||
{publishState === "live" ? "🛑" : "🖥️"}
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user