Skip to content

Mesh: keep sound when crossing to a third device - #196

Open
hughesyadaddy wants to merge 1 commit into
InukaAsith:mainfrom
hughesyadaddy:fix/mesh-audio-own-route
Open

hughesyadaddy wants to merge 1 commit into
InukaAsith:mainfrom
hughesyadaddy:fix/mesh-audio-own-route

Conversation

@hughesyadaddy

Copy link
Copy Markdown
Contributor

Fixes #194

Root cause: In mesh mode, sound and mic use the selection facade. An edge crossing calls hub.select() (mac/mesh/kvm.js ~L671/745, windows/mesh/kvm.js ~L526/657), and hub._select refreshes that route, which emits closed on the old device and welcome/client on the new one. mac/audio.js, windows/sound.js and shared/mic.js stop send/receive on closed, so A↔B audio drops as soon as the cursor moves to C.

Change: Sound and mic get their own hub route, like phoneRoute(). While a session is live, the route stays on that device across selection changes; when the session ends, it follows the selected device again. Two-device behaviour is unchanged. Route moves to shared/hub-route.js so Mac, Windows and Linux hubs share it.

Tests: New three-computer test shared/test/hub-audio-route.test.js (select(C) doesn't close the A↔B audio route; route follows selection after the session ends), a case in linux/mesh/test/hub.test.js, and shared/test/mic.js still passes.

Give sound and microphone their own hub route so crossing to a third
device no longer tears down an active audio session between two others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-device: moving the cursor to a third computer stops sound between the other two

1 participant