diff --git a/web/src/App.css b/web/src/App.css index ada726e..e25fd0f 100644 --- a/web/src/App.css +++ b/web/src/App.css @@ -4111,3 +4111,55 @@ min-width: 160px; } } + +/* A join request waiting for a decision. TS6 shows the viewer "waiting for + access" the whole time this is on screen, so it should not be subtle. */ +.ts-stream-request { + display: flex; + align-items: center; + gap: 0.4rem; + padding: 0.45rem 0.55rem; + border-top: 1px solid var(--ts-border, #2a2f3a); + background: var(--ts-accent-soft, rgba(90, 140, 255, 0.12)); + font-size: 0.82rem; +} + +.ts-stream-request-who { + flex: 1; + min-width: 0; + display: flex; + flex-direction: column; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.ts-stream-request-who em { + opacity: 0.7; + font-size: 0.75rem; + font-style: normal; +} + +.ts-stream-request button { + flex: none; + padding: 0.2rem 0.5rem; + border: 1px solid var(--ts-border, #2a2f3a); + border-radius: 4px; + background: var(--ts-surface, #1b1f27); + color: inherit; + cursor: pointer; + font-size: 0.78rem; +} + +.ts-stream-request button:hover { + border-color: var(--ts-accent, #5a8cff); +} + +.ts-stream-request-allow { + background: var(--ts-accent, #5a8cff) !important; + color: #fff; +} + +.ts-stream-request-block { + opacity: 0.65; +} diff --git a/web/src/App.tsx b/web/src/App.tsx index de0ed3d..ab231ac 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -5660,6 +5660,7 @@ function AppInner() { const streamViewerRef = useRef(null); const [publishState, setPublishState] = useState("idle"); const [publishViewers, setPublishViewers] = useState([]); + const [publishPending, setPublishPending] = useState<[number, string][]>([]); const [publishError, setPublishError] = useState(null); const publisherRef = useRef(null); const publishPreviewRef = useRef(null); @@ -6624,6 +6625,7 @@ function AppInner() { publisherRef.current = null; setPublishState("idle"); setPublishViewers([]); + setPublishPending([]); removeSession(sessionId, { skipSocketClose: true }); break; } @@ -7931,6 +7933,7 @@ function AppInner() { publisherRef.current = null; setPublishState("idle"); setPublishViewers([]); + setPublishPending([]); }; const handleStreamButton = () => { @@ -7941,6 +7944,9 @@ function AppInner() { setStreamSettingsOpen(true); }; + const publishClientName = (clid: number) => + clients.find((c) => c.id === clid)?.name ?? `#${clid}`; + const handleStartPublishing = (options: StreamPublishOptions) => { if (ownClientId === null) return; setStreamSettingsOpen(false); @@ -7955,9 +7961,11 @@ function AppInner() { if (state === "stopped" || state === "idle") { publisherRef.current = null; setPublishViewers([]); + setPublishPending([]); } }, onViewersChange: setPublishViewers, + onPendingChange: setPublishPending, onError: setPublishError, }); publisherRef.current = publisher; @@ -9636,6 +9644,30 @@ function AppInner() { {/* muted: this is our own capture playing back locally */}