Commit Graph

614 Commits

Author SHA1 Message Date
Joao Victor
7e8cee7340 improvement: error screen messages 2022-10-05 11:30:12 -03:00
Ramón Souza
2b0971e2c8 Merge tag 'v2.5.6' into merge-256-26 2022-09-26 09:17:59 -03:00
Ramón Souza
6d1463e03b add disableWebsocketFallback settings 2022-09-21 11:03:21 -03:00
prlanzarin
0f24e5634d fix(audio): bypass overconstrained errors in SFU-based audio 2022-09-15 20:42:43 +00: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
Paulo Lanzarin
9c4707b56d
Merge pull request #15582 from prlanzarin/u26/refactor/mic-inout-logs-26
fix(audio): review in/out device management and switching
2022-09-09 09:22:40 -03:00
prlanzarin
646db91367 fix(webcam): add MediaStream id to 'inactive' event handlers
BBBVideoStream 'inactive' event currently does not send the
MediaStream id as the payload for handlers. This can cause theoretical
race conditions due to media stream mismatches in places where
'inactive' handling is done globally (eg video-preview).

This adds the MediaStream id to BBBVideoStream's 'inactive' event
and uses it in video-preview to avoid such race conditions.
2022-09-06 12:31:26 +00:00
Ramón Souza
4e46284a3b
Merge pull request #15603 from JoVictorNunes/camera-brightness
feat(camera): set camera brightness
2022-08-31 17:00:34 -03:00
Ramón Souza
62f8ab3cb2 Merge remote-tracking branch 'upstream/v2.6.x-release' into pr-15460-aug26 2022-08-26 14:05:45 -03:00
Joao Victor
396f5320a4 feat(camera): set camera brightness 2022-08-26 11:50:46 -03: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
Joao Victor
66403fe5fe fix: check virtual background type on change 2022-08-17 15:14:14 -03:00
prlanzarin
0e162f1cda feat: configurable DSCP marking for WebRTC media
RTCRTPSender exposes DSCP marking via `networkPriority` in the encodings
configuration dictionaries. That should allow us to control
QoS priorities for different media streams, eg audio with higher network
priority than video. The only browser that implements that right
now is Chromium.

To use this, the public.app.media.networkPriorities configuration in
settings.yml. Audio, camera and screenshare priorities can be controlled
separately. For further info on the possible values, see:
  - https://www.w3.org/TR/webrtc-priority/
  - https://datatracker.ietf.org/doc/html/rfc8837#section-5
2022-08-15 21:24:05 +00:00
Daniel Petri Rocha
3529fe9f28 Rename parameters; hide download button and label when disabled 2022-08-02 15:53:40 +02:00
Daniel Petri Rocha
5dfc9293fb Merge branch 'v2.6.x-release' into pdf-disabledFeatures-tldraw 2022-08-02 12:29:38 +02:00
Gabriel Porfirio
8198953f30 removing unused imports 2022-07-28 16:50:31 -03:00
Joao Victor
34aaf07fed Merge branch v2.6.x-release into virtual-backgrounds-skeleton-preview 2022-07-15 17:14:16 -03:00
Paulo Lanzarin
383fe89653
Merge pull request #15364 from prlanzarin/u26/refactor/kutils-kboom
refactor: remove kurento-utils-js
2022-07-15 14:53:10 -03:00
prlanzarin
d06ae5ce40 fix: add default gUM factory to new peer wrapper
For scenarios such as preview-less camera sharing, old echo test
2022-07-15 17:07:15 +00:00
prlanzarin
cd9b8ccef4 fix: handle Firefox stream cleanup edge case (peer.js)
Firefox doesn't fire the ended evt/onended callback for live
 MediaStreamTrack(s). We rely on that event.

 Manually emit the ended event which works with the onended callback
 when a track is stopped
2022-07-15 14:25:37 +00:00
Ramon Souza
db5ac1428a Merge tag 'v2.5.3' into merge25-26-jul14 2022-07-15 11:08:02 -03:00
prlanzarin
45049cbd65 refactor: swap kurento-utils for new peer wrapper in screen sharing and audio 2022-07-15 14:00:12 +00:00
prlanzarin
7281475271 feat: add new peer wrapper to phase out kurento-utils
kurento-utils is unmaintained. It's served us well, but its age
shows.  We need to transition to something else if we want to
have better  maintainability and include simulcast, multistream, ...

This introduces a simplified/leaner wrapper kit that's almost
API-compatible with what we use right now - so widespread changes
are minimal). It's easier to maintain/read/transition from. This
can be read as an intermediate step to transitioning to
something definitive (ie mediasoup-client).
2022-07-15 13:51:03 +00:00
prlanzarin
e93440e15a refactor(webcam): fix linter errors in BBBVideoStream 2022-07-12 17:50:16 +00:00
Daniel Petri Rocha
5f98290413 Add presentationWithAnnotationDownload, exportPresentationWithAnnotation to disabledFeatures 2022-07-12 18:58:56 +02:00
Joao Victor
2f78edddf3 fix: add suport for disabling upload of custom backgrounds through custom parameter 2022-07-08 17:01:57 -03:00
prlanzarin
a6861a16d5 fix: don`t ignore settings.yml virtualBackgrounds.enabled config 2022-07-07 12:37:32 +00:00
Mario Junior
72854de683
Merge pull request #15295 from iMDT/v2.6.x-mobile
feat (mobile screenshare): Add replacement webRTC methods for screenshare and full audio in mobile (when running in BigBlueButtonMobile app)
2022-07-06 15:46:25 -03:00
Tiago Jacobs
9ea4171af6 Add support to 2.6 by initializing stream active flag 2022-07-04 16:19:38 -03:00
prlanzarin
0c7c628f7a fix(webcam): prevent camera freeze due to _renderMask exceptions
Under some scenarios, cameras are freezing when the virtual background
code is running due to runPostProcessing(_renderMask) throwing
NS_ERROR_FAILURE - mainly on Firefox - consequently preventing
subsequent TimerWorker ticks from being scheduled.
Cases where I've seen that happen are:
  - conferences running under an iframe where the iframe is briefly
    stalled for some reason

Address the issue with a try-catch and a log for debugability (it's high
frequency, hence why not error level). We should probably remove the log
entirely once we figure out why the post-processing method is failing.
2022-06-30 13:50:53 +00:00
Gustavo Emanuel Farias Rosa
b13039c31f Detect screen share stop and propagate it to the application 2022-06-29 17:38:40 -03:00
Tiago Jacobs
2b953a47bb Add structure to detect and forward full audio calls to mobile application 2022-06-29 17:38:38 -03:00
Tiago Jacobs
092f5bcafd Add logic to skip webRTC replacement methods when it's not a screenshare 2022-06-29 17:38:34 -03:00
Tiago Jacobs
f459aec949 Fixes variable name to avoid colision with reserved arguments variable 2022-06-29 17:38:29 -03:00
Tiago Jacobs
75c8dcd491 Merge 2.6 2022-06-29 17:38:21 -03:00
prlanzarin
602238b84e refactor(audio): remove caller ID from fullaudio bridge start request
The callerId is assembled server-side as of bbb-webrtc-sfu
v2.9.0-alpha.3 based on the work done in commit
d940bff541b6fe3c4976428ca471457bc67ac97e.
2022-06-28 20:33:36 +00:00
Ramon Souza
edeb70de0d Merge tag 'v2.5.1' into merge25-26-jun16 2022-06-16 13:58:54 -03:00
Joao Victor
2a1401f2ae Merge remote-tracking branch v2.6.x-release into virtual-background-upload 2022-06-01 16:50:29 -03:00
prlanzarin
1d860d64d0 fix(audio): remove deprecated getLocalStreams usage
Use the built-in getLocalStream from the peer wrapper instead (which
relies on getSenders - the proper, spec-compliant way).

Two different issues are addressed:
  - RTCPeerConnection.getLocalStreams is a pre-1.0 WebRTC spec which is
    deprecated and not recommended.
  - Fixed an issue where a switch from full audio to listen only could
  cause the latter to be rejected with an error 1004 in rare scenarios.
2022-05-27 14:02:10 +00:00
Ramon Souza
8986fe2853 prevent disconnect in same tab 2022-05-17 13:09:41 -03:00
Joao Victor
a7e5869c91 feat(video): upload of own webcam virtual background 2022-05-10 14:17:16 -03:00
prlanzarin
83e26b7f63 fix(screenshare): race condition - local stream ends while broker stars
There could be a race condition where the local getDisplayMedia stream ends
(eg via Chrome`s stop sharing toast) while the broker hasn't finished starting.
That would lead to a scenario where the broker wouldn't emit an end event,
causing screen sharing to be flagged as started with a blank/invalid stream.
2022-05-09 18:00:30 +00:00
prlanzarin
6a0e0a87c2 fix(audio): abide to signalCandidates configuration flag 2022-05-02 13:49:47 +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
6fd6a52d47 fix(audio): prevent uncaught rejections in the experimental audio bridge startup 2022-04-20 17:40:06 +00:00
prlanzarin
1e80d050b7 refactor(audio): generic use of sfu audio broker to cover mic and listen only 2022-04-20 17:26:52 +00:00
prlanzarin
2eaf96ae95 refactor(audio): address linter warnings in fullaudio-broker.js 2022-04-20 13:52:16 +00:00