Commit Graph

191 Commits

Author SHA1 Message Date
Tainan Felipe
aa27e8be68 Refactor: migrate audio captions to TS + Graphql 2023-09-21 10:48:00 -03:00
Tiago Jacobs
5cf2293c38
refactor (typescript): fix typescript build errors (#18454) 2023-08-14 17:52:35 -03:00
Gustavo Trott
3758dd89e2 Merge 2.7 into Develop 2023-07-31 11:24:25 -03:00
Tainan Felipe
9869ee7f2b Refactor: actions bar audio button 2023-07-24 15:56:40 -03:00
prlanzarin
80414a9cc4 feat(audio): add userdata-bbb_fullaudio_bridge
Allows controlling which audio bridge should be used, per user
2023-05-31 17:07:10 -03:00
prlanzarin
b3eebbb926 fix(audio): retry gUM without pre-set deviceIds on OverconstrainedError(s)
There are some situations where previously set deviceIds (
local/session storage) may become stale. This causes an unexpected
behavior where audio is temporarily borked until the user clears their
local storage.
This issue has been seen more recently on Safari endpoints when switching
back-and-forth breakout rooms in environments running under iframes.
Also seen randomly on endpoints with virtual input devices.

This centralizes audio gUM calling into a single method that retries the
gUM procedure without pre-set deviceIds only if the initial call fails
due with an OverconstrainedError - hopefully circumventing the issue.
2022-09-15 19:25:30 +00:00
prlanzarin
ec1879f96b fix(audio): add inputDeviceId enforcement for post-join/gUM
Extract the deviceId again from the stream to guarantee consistency
between stream DID vs chosen DID. That's necessary in scenarios where,
eg, there's no default/pre-set deviceId ('') and the browser's
default device has been altered by the user (browser default != system's
default).
2022-08-24 14:39:09 +00:00
prlanzarin
89e814d570 fix(audio): centralize device change code, add rollbacks, surface errors
There's no rollback procedure in case a device switch fails right now,
nor does the code entrypoints that call the switching procedures wait
for resolution or failure before marking the new device as chosen. That
may cause inconsistent states in a couple of ways:
  - No rollback: switch fails, audio is still on but no actual
    microphone input is being transmitted
  - Not waiting for resolutions: inconsistent chosen devices on failures
Device switching errors are also not surfaced to the end user

This commit:
  - Adds device rollback and proper resolution/failure response
    awaits to try and make the state a bit more consistent.
  - Centralizes the input device switching code to be reused between
    different bridges
  - Centralizes device ID state management in audio-manager to try and
    mantain them a bit more consistent across the board
  - Surface device switching failures to the end user
  - Guarantee device IDs are set to the session storage on all
    appropriate scenarios
2022-08-24 13:28:27 +00:00
prlanzarin
ac71167ba5 refactor(audio): add debug logs for microphone device changes
In/out device changes are mostly silent which makes it hard to track
them to look for problems.
2022-08-23 14:50:50 +00:00
prlanzarin
ccc95583ee refactor(audio): restore trickle candidate filtering in new audio bridge
+ better error handling, log messages for that code
2022-04-25 16:45:18 +00:00
prlanzarin
459e1a9514 refactor(audio): remove old listen only bridge (kurento.js)
- Remove the old listen only bridge (kurento.js), superseded by the equivalent
  and equally stable (AS FAR AS LISTEN ONLY IS CONCERNED) sfu-audio-bridge
  - Rename FullAudioBridge.js -> sfu-audio-bridge.js
    * A more generic name that better represents the capabilities and
      the nature of the bridge
    * The bridge name identifier in configuration is still the same
      ('fullaudio')
  - Remove the FreeSWITCH listen only fallback
  - Temporarily disable the "trickle ICE" pair gathering feature used
    in SIP.js (which was always experimental, nonstandard and disabled
    by default)
  - Updates to settings.yml keys in places where relevant
2022-04-20 20:46:32 +00:00
prlanzarin
0d85905c83 fix(audio): centralize default in/out device id definitions, make them an empty string
"default" is not an universally valid default value for deviceIds which was causing issues with Firefox and Safari in some specific scenarios where exact deviceId constraints were being used
2022-04-11 19:23:32 +00:00
Anton Georgiev
3cee20c489 fix: Drop old postMessage leftover 2022-04-07 15:27:41 +00:00
prlanzarin
adc13add67 refactor(audio): remove duplicated loadBridges method definition
Seems to have been introduced by a partial merge commit

There were a bunch of style changes introduced by that partial commit as well; I kept those changes to avoid introducing further conflicts between v2.4-2.5...
2022-02-22 13:42:20 -03:00
Anton Georgiev
797fc49633 TEMP 2021-12-09 20:37:05 +00:00
Ramón Souza
16fd642e33 interrupt connection proccess if audio modal is closed 2021-12-03 11:45:07 +00:00
Maxim Khlobystov
b7cf670aec Remove the support for iframe postMessage API (recording and self-muting) 2021-11-29 22:53:12 +00:00
Mario Jr
9578efbcd3 fix(audio): prevent audio to hang when user is transferred to breakout room
When joining breakouts, we now wait for the bridge to be loaded before
automatically start user's audio.
This problems happens only on fullaudio bridge
2021-11-09 15:04:10 -03:00
Mario Jr
70815fad4f feat(audio): add meta param for selecting fullaudio bridge
This can be passed through API. For example, for setting fullaudio bridge, you
can pass the param "meta_fullaudio-bridge=fullaudio"
2021-11-09 12:09:36 -03:00
Mario Jr
cf2d595f12 fix(audio): correctly retrieve Object class from bridge module 2021-11-09 12:08:31 -03:00
Mario Jr
5c85f4c5b2 fix(audio): promisify loadBridges function
New bridges were being loaded with undefined value, since we didn't
wait for this to fully load before instantiating it
2021-11-09 12:08:25 -03:00
Mario Jr
86ef834476 fix(audio): bridges can be dynamically imported
Added bridge whitelist , to allow bridge modules to be dynamically imported.
2021-11-09 12:08:18 -03:00
Mario Jr
7e218c3eca feat(audio): add bridge configurable scheme
we are now able to switch between audio bridges, by selecting it in
config files.
2021-11-09 12:08:09 -03:00
Anton Georgiev
1622425cbc Merge branch 'develop' of github.com:bigbluebutton/bigbluebutton into 2.4-into-develop 2021-10-22 19:12:58 +00:00
Anton Georgiev
6e0c74e02f style: Pulled latest fonts, audio icon swap 2021-10-18 20:26:01 +00:00
Anton Georgiev
24d672a832 Merge branch 'v2.4.x-release' of github.com:bigbluebutton/bigbluebutton into merge-24-dev 2021-10-14 15:13:17 +00:00
Anton Georgiev
7c11600518
Merge pull request #13266 from mariogasparoni/dynamic-bridges
feat(audio): add bridge configurable scheme
2021-09-22 16:00:46 -04:00
Mario Jr
1c08fc852a fix(audio): audio controls crash when ending call during brekout audio transfer
Restored the old behavior when ending breakout rooms while user is in the
breakout audio transfer, which is to the trigger the reconnection to the audio
in the main room.
This behavior could be improved by (instead of reconnecting) transfering user
back to the main room, but this requires some changes in akka-apps/fsesl
which can be treated in a different issue.

Closes #13242
2021-09-21 11:22:05 -03:00
Mario Jr
7d3a03854e fix(audio): correctly retrieve Object class from bridge module 2021-09-09 10:15:06 -03:00
Mario Jr
da92122a90 fix(audio): promisify loadBridges function
New bridges were being loaded with undefined value, since we didn't
wait for this to fully load before instantiating it
2021-09-08 16:24:15 -03:00
Mario Jr
b74e4c6ca5 fix(audio): bridges can be dynamically imported
Added bridge whitelist , to allow bridge modules to be dynamically imported.
2021-09-01 13:22:43 -03:00
Mario Jr
4fcd051223 feat(audio): add bridge configurable scheme
we are now able to switch between audio bridges, by selecting it in
config files.
2021-08-31 15:50:53 -03:00
Mario Jr
8997b68a3c Support firefox and other browser in network stats monitor
For browsers that don't support headerBytesSent in RTCOutboundRtpStreamStats
neither headerBytesReceived in RTCInboundRtpStreamStats, we are now able
to calculate upload and download rates.
We are also able to get transportStats information for browsers that
don't support iceTransport attribute of RTCDtlsTransport.
2021-08-25 16:27:46 -03:00
Mario Jr
00e01c1872 add screenshare's peer information to video stats in connection status modal
Added support for getStats in screenshare's service. This works similar
to the getStats for video provider, and the information retrieved from
screenshare is added to the video information for cameras.
2021-08-23 12:36:01 -03:00
Mario Jr
148704cdec fix docs for getStats in audio and video services 2021-08-23 11:07:12 -03:00
Mario Jr
a4f7447b65 Add information about using turn in audio stats
This information is also retrieved when copying data to clipboard
2021-08-17 16:54:49 -03:00
Mario Jr
65e6e70d24 update audio-manager docs for getStats and related functions 2021-08-13 09:46:19 -03:00
Mario Jr
cf366e5090 Get user and audio data, shows it and allows it to be copied to clipboard
Using getStats api and peer information to retrieve upload/download rates
and transport information
2021-08-12 16:39:04 -03:00
Mario Jr
4e1eb7318d chore(audio): add audio join time in extraInfo of server log 2021-07-09 13:43:43 -03:00
Mario Jr
c4abd274e8 feat(audio): add option for enabling/disabling kms's trickle for mic 2021-07-02 12:51:00 -03:00
Mario Jr
287c4eb682 feat(audio): use kurento's trickle-ice to improve mic negotiation
Here's what we do when user activates mic:
1 - When we do something similar to listenonly's joining process
until we find a valid candidate-pair. The information about this
local candidate is store.
2 - We then start a new userAgent, and as soon as browser finds
a candidate with the same local ip address, we leave only this
candidate in the SDP and send this to FreeSWITCH. SDP should
contain only a single candidate.
3 - The rest of signaling process is basically the same.
2021-07-01 16:26:44 -03:00
Anton Georgiev
36b67971ee
Merge pull request #12054 from mariogasparoni/fix-12023-and-other-two-fixes
fix: mic selection (firefox/all browsers) and muted alert when mic is changed
2021-04-20 13:40:54 -04:00
Anton Georgiev
5566941ad1
Merge pull request #12003 from ramonlsouza/issue-11985
Fix join webcam breakout room
2021-04-16 10:46:04 -04:00
Mario Jr
e8d59ed14a fix: mic selection (firefox/all browsers) and muted alert when mic is changed
This commit contains three fixes: one already reported and two detected
during the investigation of the solution.
This started as a fix for firefox (#12023), but i also fixed the muted
alert/banner when device changes: the banner wasn't detecting device changes,
unless audio was deactived/actived.

There's another fix for the microphone stream: we now keep sender's track
disabled if it was already disabled for the sender's track of the previous
selected device.

Also did small refactor for eslint checking.

Some technical information: in sip bridge (bridge/sip.js), setInputStream and
liveChangeInputDevice function were both fully turned into promises, which
guarantees we have everything ready when it resolves to the respective values.
This helps AudioManager (audio-manager/index.js) to sequentially sets and
tracks the state of the current microphone stream (inputStream), when calling
liveChangeInputDevice function: we first set the current stream to null,
creats a new one and then set it to the newly created value - this is needed
because MutedAlert (muted-alert/component.jsx) can then gracefully
allocate/deallocate the cloned stream when it is set to a non-null/null value
(the cloned stream is used for speech detection with hark).
In MutedAlert we also make sure to enable the cloned stream's audio
tracks, just in case the user change the device when muted (audio track is
disabled in this case), which also leaves the cloned stream muted (we then
enable the track to allow speech detection).

Closes #12023
2021-04-16 10:45:40 -03:00
Ramon Souza
32dec42264 fix join webcam breakout room 2021-04-12 15:59:43 -03:00
Ramon Souza
d90e889394 fix active poll refresh crash 2021-04-12 13:57:02 -03:00
Mario Jr
951fc0ade8 fix: MEDIA_ERROR when joining room using Firefox
Firefox doesn't create a  device called 'default' and we were trying
to set this when user is joining the room. We don't do this anymore, letting
devices to be changed when there's some user request.

Moved outputDeviceId inputDeviceId information to be managed in bridge
(just like we do with inputDeviceId), we don't store this duplicated
information in audio container anymore.

Fixed the eslint warning in "playAlertSound(url) { ..."

We are safe to let users try to change input/output devices because the
device list is retrieved from enumerateDevices.
2021-04-01 15:53:43 -03:00
Mario Jr
60378e8c63 Merge branch 'develop' into merge-update-pr-10129 2021-03-29 19:07:27 -03:00
Mario Jr
cddca95ad1 Fixes and improvements on pr #10129 - dynamic change audio device
Allow listenonly users to change output devices
Fixed dynamic audio device change for firefox
Fixed shortcuts for audio join/leave
Show (with a bold font) the current selected device
[performance] Prevent calling mediaDevices.enumerateDevices every time we render
the selector. This adds a delay (~200ms, on my chrome setup) to render this component
[performance] Do not call enumerateDevices to search for new devices, instead we listen on mediaDevices.deviceChange event
Small refactoring and fixed a few errors that were being throw in browser's console
Fixed device selection when this is done in audio-settings modal
Fallback to default device when current device is removed
Truncate device name length
Renamed "Input","Output" labels to "Microphone","Speakers", respectively
Update eslint rule for accessKey
2021-03-29 18:55:17 -03:00
Mario Jr
cec88c996d Merge remote-tracking branch 'tainan/issue-9723' into merge-update-pr-10129 2021-03-29 18:52:12 -03:00