mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42: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
|
<button
|
||||||
className={`ts-icon-button${publishState === "live" ? " ts-mic-on" : ""}`}
|
className={`ts-icon-button${publishState === "live" ? " ts-mic-on" : ""}`}
|
||||||
onClick={handleStreamButton}
|
onClick={handleStreamButton}
|
||||||
disabled={!connected || ownClientId === null}
|
// DemoSocket has no answer for setupstream, so in demo mode the
|
||||||
title={`${publishState === "live" ? t("publish.stop") : t("publish.start")} (${t("publish.alpha")})`}
|
// 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" ? "🛑" : "🖥️"}
|
{publishState === "live" ? "🛑" : "🖥️"}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -378,6 +378,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"tree.streaming": "Überträgt einen Stream",
|
"tree.streaming": "Überträgt einen Stream",
|
||||||
"publish.alpha": "Alpha",
|
"publish.alpha": "Alpha",
|
||||||
"publish.alphaTitle": "Alpha – instabil, kann sich jederzeit ändern oder brechen",
|
"publish.alphaTitle": "Alpha – instabil, kann sich jederzeit ändern oder brechen",
|
||||||
|
"publish.demoUnavailable": "Übertragen ist in der Demo nicht verfügbar – dafür braucht es einen echten TeamSpeak-6-Server.",
|
||||||
"publish.alphaNote":
|
"publish.alphaNote":
|
||||||
"Streaming ist Alpha. Es spricht TeamSpeak 6s Stream/Call-Protokoll, das nicht dokumentiert ist – Verbindungsaufbau, Bildqualität und Zuschauerverwaltung können fehlschlagen oder sich ohne Vorankündigung ändern. Nicht für produktive Nutzung gedacht.",
|
"Streaming ist Alpha. Es spricht TeamSpeak 6s Stream/Call-Protokoll, das nicht dokumentiert ist – Verbindungsaufbau, Bildqualität und Zuschauerverwaltung können fehlschlagen oder sich ohne Vorankündigung ändern. Nicht für produktive Nutzung gedacht.",
|
||||||
"publish.start": "Bildschirm übertragen",
|
"publish.start": "Bildschirm übertragen",
|
||||||
@@ -1015,6 +1016,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"tree.streaming": "Broadcasting a stream",
|
"tree.streaming": "Broadcasting a stream",
|
||||||
"publish.alpha": "Alpha",
|
"publish.alpha": "Alpha",
|
||||||
"publish.alphaTitle": "Alpha - unstable, may change or break at any time",
|
"publish.alphaTitle": "Alpha - unstable, may change or break at any time",
|
||||||
|
"publish.demoUnavailable": "Streaming is not available in the demo - it needs a real TeamSpeak 6 server.",
|
||||||
"publish.alphaNote":
|
"publish.alphaNote":
|
||||||
"Streaming is alpha. It speaks TeamSpeak 6's undocumented Stream/Call protocol, so connecting, picture quality and viewer handling can fail or change without notice. Not meant for production use.",
|
"Streaming is alpha. It speaks TeamSpeak 6's undocumented Stream/Call protocol, so connecting, picture quality and viewer handling can fail or change without notice. Not meant for production use.",
|
||||||
"publish.start": "Share your screen",
|
"publish.start": "Share your screen",
|
||||||
|
|||||||
Reference in new issue
Block a user