Improve handling of backchannel audio in camera wizard (#21250)

* Improve handling of backchannel audio in camera wizard

* Cleanup

* look for backchannel on all registered streams on save

avoids potential issues with a timeout in stream registration

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
This commit is contained in:
Nicolas Mowen
2025-12-13 07:12:37 -07:00
committed by GitHub
co-authored by Josh Hawkins
parent 6b9b3778f5
commit 8ddcbf9a8d
7 changed files with 137 additions and 59 deletions
@@ -237,7 +237,18 @@ export default function CameraWizardDialog({
const streamUrl = stream.useFfmpeg
? `ffmpeg:${stream.url}`
: stream.url;
go2rtcStreams[streamName] = [streamUrl];
if (wizardData.hasBackchannel ?? false) {
// Add two streams: one with #backchannel=0 and one without
// in order to avoid taking control of the microphone during connections
go2rtcStreams[streamName] = [
`${streamUrl}#backchannel=0`,
streamUrl,
];
} else {
// Add single stream as normal
go2rtcStreams[streamName] = [streamUrl];
}
});
if (Object.keys(go2rtcStreams).length > 0) {