Commit Graph

199 Commits

Author SHA1 Message Date
Mario Jr
f9dbefe764 feat(audio): basic funcionality for fullaudio bridge
This commit allows user to join/leave audio using the fullaudio bridge.
This is still under development, but to use this now we must set values of
skipCheck to false, and defaultFullAudioBridge to fullaudio. This
depends on newest version of bbb-webrtc-sfu
2021-11-09 12:09:18 -03:00
Mario Jr
42778adeaf feat(audio): add base code for fullaudio bridge
This bridge will work with bbb-webrtc-sfu to handle microphone audio.
2021-11-09 12:08:45 -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
Mario Jr
7ed1cbfc30 Merge branch 'v2.4.x-release' into fix-13242 2021-09-29 09:20:58 -03:00
Mario Jr
519883e89a update(audio): adjust reference to ignoreCallState flag 2021-09-24 14:48:22 -03:00
prlanzarin
1cb412529d feat(webrtc): add EXPERIMENTAL option to disable ICE candidate signaling
ICE lite servers (eg mediasoup) dont need candidates signaled out-of-band; neither does KMS in certain scenarios

Disable their signaling saves us some ticks in bbb-webrtc-sfu and some bandwidth all around
2021-09-24 17:24:06 +00: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
prlanzarin
58a8e99195 feat: add media server configuration via metadata
Applies to video, listen only and screen sharing

New metadata values: media-server-video, media-server-listenonly, media-server-screenshare; parameter is a String
2021-08-31 00:39:45 +00:00
prlanzarin
c57fb0b388 feat(audio): add media server adapter config for listen only in bbb-html5
Allows configuring, via bbb-html5, which media server adapter will be used by listen only; server wide
2021-08-31 00:24:41 +00:00
Anton Georgiev
4ecb24b4fa Merge branch 'v2.3.x-release' of github.com:bigbluebutton/bigbluebutton into merge-aug30 2021-08-30 18:11:16 +00:00
Anton Georgiev
34453b8528
fix: Fix log message (LGTM)
Updating string for audio connected audio. Thanks @stweil
2021-08-25 13:17:27 -04: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
prlanzarin
54d04fdb77 refactor(listen-only): let the server generate subscriber offers 2021-08-12 13:45:18 +00:00
Mario Jr
c0d1255924 Merge branch 'v2.3.x-release' into fix-1005-logging 2021-07-30 12:28:34 -03:00
prlanzarin
168f66310e fix(listen-only): avoid leaving a dangling HTMLMediaElement in paused state 2021-07-23 02:35:47 +00:00
Mario Jr
2f75f6107e fix(audio): prevent false positive alerts of 1005 error
After reconnecting (with 1007 or 1005), user may gets 1005 when meeting
is ended by moderator.
2021-07-22 09:28:14 -03:00
Mario Jr
6db69c39d8 fix(audio): prevent duplicated error logging
We now let audio-manager log errors, using the specified error code.
These errors are still logged in bridge layer, but as a warning.
This commit doens't change error codes behavior, they are still being
logged as errors and with the same code numbers.
2021-07-20 11:10:04 -03:00
Mario Jr
431a6c7c3b chore(audio): add secondsToGatherIce as extraInfo in server log 2021-07-16 11:16:24 -03:00
Mario Jr
f5713869bf fix(audio): correct log the time needed for ice gathering 2021-07-15 11:15:53 -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
Ramon Souza
9d590a74d3 remove unused imports 2021-05-03 09:24:07 -03:00
Mario Jr
13bb0c8493 fix: match exact deviceId when retrieving mic streams
Needed for firefox for consistently changing microphone using device selector
Refs #12054
2021-04-26 22:08:22 -03:00
Mario Jr
2f78fc05d2 fix: breakout audio don't use previously selected output device
When joining breakout audio, the output device selected in the main room is
used in breakout.
When returning from breakout rooms, the output audio device previously set in
the main room is restored.

Some specific info:
SIPSession doesn't handle Storage anymore, we do this in SIPBridge, since
it has more info about the current selected device and it doesn't depend of
a session being oppened.
We also now pass the  output device ID when joining audio sessions. We can
then keep this information in the Storage.
Closes #11663
2021-04-23 11:28:30 -03: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
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
Anton Georgiev
ff45cccd66 Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutton into apr1-merge 2021-04-01 18:11:13 +00:00
Ramon Souza
05a0d5afbf move browser info to helper + remove unused libs 2021-04-01 08:14:24 -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
prlanzarin
2e51482c7c audio: make sdpSemantics configurable
Plan B is going to be phased out of Chrome soon and we should be testing it with unified plan
2021-03-29 20:01:33 +00:00
prlanzarin
f20fb3eef2 audio: make sdpSemantics configurable
Plan B is going to be phased out of Chrome soon and we should be testing it with unified plan
2021-03-12 03:04:55 +00:00
Mario Jr
209b06db2e Avoid setting an unknown input deviceId
Without 'exact' match, the browser fallbacks to the default inputDeviceId

This prevents the error (input device error)  when breakout is ended and we try
to skipCheck the microphone when user returns to main room (assuming the
user had the microphone active before joining breakout room).
2021-03-05 00:33:54 -03:00
Mario Jr
de05622d19 Avoid setting an unknown input deviceId
Without 'exact' match, the browser fallbacks to the default inputDeviceId

This prevents the error (input device error)  when breakout is ended and we try
to skipCheck the microphone when user returns to main room (assuming the
user had the microphone active before joining breakout room). Related
to the feature c451666d52
2021-02-28 17:15:08 -03:00
Mario Jr
b582b1ca78 Correctly return MediaStream object when calling audio-manager's inputStream
This was missed in recent audio/sip.js changes.
MediaStream is now returned from SIP.js
Related to #10733
2021-01-29 19:05:51 -03:00
Anton Georgiev
09e6ba8dfd Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutton into merge-Jan30 2021-01-29 20:58:05 +00:00
Mario Jr
f2de2806eb Add setting for enabling/disabling microphone audio filters
As explained in #11143, disabling audio filters is desired in some scenarios.
This basically adds an option for user to disable default constraints.
When user doesn't change this value in Settings > Application, the default
value for each audio constraints is retrieved from settings.yml.
When user changes this value in Settings > Application, audio
filters (AGC, Noise Supression and Echo Cancellation) are all set to
true/false, according to the value selected in the Settings GUI.

To start it simple, we decided to not to add a different setting in the GUI for
each audio contraint. This may be added in the future, though (perhaps in a
dedicated Audio Settings tab)
This is related to #4873
2021-01-29 14:18:15 -03:00
Mario Jr
b753ef5d8d Fix wrong path in settings for audio constraints
Using now 'application' instead of old 'audio' path
2021-01-26 14:12:18 -03:00
Mario Jr
7858ba94ba Avoid setting empty/undefined constraint
This removes the console warning about invalid constraint
2021-01-25 23:45:27 -03:00
Mario Jr
97c76900cb Add setting for enabling/disabling microphone audio filters
As explained in #11143, disabling audio filters is desired in some scenarios.
This basically adds an option for user to disable default constraints.
When user doesn't change this value in Settings > Application, the default
value for each audio constraints is retrieved from settings.yml.
When user changes this value in Settings > Application, audio
filters (AGC, Noise Supression and Echo Cancellation) are all set to
true/false, according to the value selected in the Settings GUI.

To start it simple, we decided to not to add a different setting in the GUI for
each audio contraint. This may be added in the future, though (perhaps in a
dedicated Audio Settings tab)
This is related to #4873
2021-01-22 16:30:42 -03:00
Mario Jr
92708da447 Allow audio constraints to be changed in bbb-html5's settings.yml
In some scenarios, there's no need for the browser to apply such audio filters. For example, when user's microphone already does audio filtering (echo cancellation, noise supression ...).
This commit doens't change the current behavior (filters still follow browser's default config): admins need to uncomment/set these values if disabling/enabling specific filters if desired.
This is related to #4873
2021-01-12 14:42:27 -03:00
Anton Georgiev
c1ffced27d Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutton into develop 2020-12-17 21:14:29 +00:00
Mario Jr
6113113af9 Add option to disable traceSip logs
Audio client logs already cover audio session progress the way we need.
This avoids keepAlive and other unnecessary messages to be logged in browser's console.
If setting is not present, default value is set to false.
2020-12-11 00:31:10 -03:00
Mario Jr
c65fa2b350 Add keep alive message to audio's websocket
This was added as an option (websocketKeepAliveInterval), which is the interval to send keep alive messages.
Setting websocketKeepAliveInterval to 0 disables the keep alive, producing the same old behavior.
This helps avoid websocket disconnection due to socket inactivity, preventing it to unnecessarily reconnect.
Also, sometimes reconnect fails and error 1005 is triggered.
Fixes problems reported in #10985.
Also reduces occurrences of error 1005.
2020-12-10 23:48:01 -03:00
Anton Georgiev
244a239810 Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutton into 2020-12-01-merge 2020-12-01 20:02:50 +00:00
prlanzarin
1bef5f37a6 [sip.js] Annotate every audio-manager callback call with a bridge name identifier
Useful when parsing logs to split errors by bridge type
2020-12-01 18:23:14 +00:00
prlanzarin
338e8f8291 [listenonly] Rewrite listen only SFU/Kurento bridge
Fixed listen only reconnection handling

Added proper error handling; now all errors have proper mapped codes which are funneled through to audio-manager logger and should be easier to gauge types of errors

Fixed botched reconnection error rejection, audio modal shouldnt be stuck anymore when it fails

Remove every tie that listen only bridge had to kurento-extension
2020-12-01 18:19:31 +00:00
Mario Jr
214cd12c59 Fix typo on dtmf log 2020-11-26 00:01:58 -03:00
Mario Jr
370e3cb39d Use INFO message as default for sending dtmf on call transfer
Instead of sending using rfc4733 standard, we use INFO message for all transfers
INFO message was used in older SIP.js version. Although this is not a standard for sending DTMF tones, this has more reliability (once it sent over TCP)
This might reduce occurrences of 1008
2020-11-25 18:33:45 -03:00