Commit Graph

4 Commits

Author SHA1 Message Date
prlanzarin
1ada7dc57e fix(audio): output device changes not effective in local echo test
Output device changes aren't working in 2.6's echo test when artifical delay
is on due to the fact that the feedback audio is being played via the WebAudio
context rather the the HTMLMediaElement. Since output device change works
via HTMLMediaElement's setSinkId, it's basically a no-op.

This commit fixes the issue by piping the AudioContext destination
through the main audio element rather than using WebAudio directly for
playback. An additional stub media element (muted) is added to circumvent one
of Chrome's WebAudio issue.
The alternative would be to use AudioContext's setSinkId, but it isn't
supported by Firefox (setSinkId enabled) and Chrome < 110.

This should work with FF (setSinkId enabled) and a wide array of Chromium
versions.
2023-03-20 17:38:06 -03:00
Daniel Schreiber
cc21f1598b Copy in fixups from review
thanks @prlanzarin for reviewing:
https://github.com/bigbluebutton/bigbluebutton/pull/16107#pullrequestreview-1241137609
2023-01-23 20:31:53 +01:00
Daniel Schreiber
10c04f4843 audio: add delay for loopback test
If BBB 2.6 is used without headphones, the audio test works differently
than in 2.5. In 2.5 audio traffic is routed to freeswitch and then
returned to the browser. This adds usually some latency which makes it
easy to hear you audio quality. In 2.6 there is a local loopback. As
there is almost no latency, it is either difficult or even impossible to
check your own audio quality as echo cancellation of the browser will
filter out your own signal.

This patch adds a delay node to the audio loopback test, which makes is
easier to check your quality.
2023-01-23 19:54:44 +01:00
prlanzarin
bae731e59e fix(audio): PC loopback workaround for local echo in Chrome
Works around the fact that Chrome doesnt have AEC on streams that dont go through PCs
2022-04-13 14:37:39 +00:00