mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
web: broadcast screen and camera at the same time
Publisher state was a single slot; it is now one publisher per source, each with its own tile (preview, viewers, join requests). The stream button opens the dialog with the source that is not running yet preselected and only stops everything once both run. StreamPublisher used to claim any own notifystreamstarted, so a second broadcast would have stolen the first one's id. It now only takes an id while it is starting and has none, and the app starts one publisher at a time so that stays unambiguous. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
968a266684
commit
ebe162fafb
2 files changed
+100
-61
No files matched your search
+9
-1
@@ -176,7 +176,15 @@ export class StreamPublisher {
|
||||
case "notifystreamstarted":
|
||||
// Everyone in the channel sees this, so the clid decides whether it
|
||||
// is the answer to our own setupstream.
|
||||
if (Number(event.args.clid) === this.opts.ownClientId && event.args.id) {
|
||||
// Several publishers can run at once (screen + camera), so only one
|
||||
// still waiting for its own id takes it; the app starts them one at
|
||||
// a time so this is never ambiguous.
|
||||
if (
|
||||
this.state === "starting" &&
|
||||
this.streamId === null &&
|
||||
Number(event.args.clid) === this.opts.ownClientId &&
|
||||
event.args.id
|
||||
) {
|
||||
this.streamId = event.args.id;
|
||||
this.setState("live");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user