Commit Graph

97 Commits

Author SHA1 Message Date
Anton Georgiev
72c575b911 Merge branch 'v2.6.x-release' of github.com:bigbluebutton/bigbluebutton into merge-apr-6 2023-04-06 11:50:26 -04:00
Anton Georgiev
e2dc7da98a
Merge pull request #16828 from prlanzarin/u27/fix/ss-cam-reconn
fix: re-connection improvements for cameras and screen sharing
2023-04-05 16:13:01 -04:00
prlanzarin
be6a23a003 feat: add option to force/extend gathering window in SFU components
There's an edge case in finnicky networks where ALG-like firewalls
tamper with USE-CANDIDATE STUN packets and, consequently, bork ICE-lite
connectivity establishment. The odd part is that client-side gathering
seems to complete if intermediate STUN bindings work (before the final
USE-CANDIDATE), which may cause the peer not to generate relay
candidates == connectivity fails.

This adds the `public.kurento.gatheringTimeout` option to forcefully extend
the candidate gathering window in peers that act as offerers. The
behavior is as follows: if the flag is set (ms), the peer will wait
either the gathering completed stage or, _at most_,
public.kurento.gatheringTimeout ms before proceeding with calls chained
to setLocalDescription.

This option is disabled by default and intentionally ommited from the
base settings.yml file as to not encourage its use. Don't use it unless
you know what you're doing :).
2023-04-05 13:22:38 -03:00
Tainan Felipe
3fb59bcb41 Refactor: Migrate screenshare for the Meteor 3.0 api 2023-03-20 16:39:11 -03:00
prlanzarin
afa2908ded fix(screenshare): better reconnection timers and UI for abrupt failures
Reconnection timers are far too long for abrupt failures because we
are waiting the original timeouts to elapse (30-60s) before trying it
again - even if a connection worked N-sessions back in that session's
history. The ideal thing to have is another intermediate, smaller and
fixed reconnection timer for sessions that had a working screen share
at least once.
The UI is also not being updated to the reconnecting state on negotiation
failures.

* Add an intermediate reconnection timer for abrupt failures set to 8s.
  This should improve reconnection times.
* Lower default connection timers values (base 20s down from 30s, max
  25s down from 60s)
* Set screen share UI to reconnecting on abrupt failures as well - we
  were only tracking ICE states prior to this, not negotiation errors
2023-03-08 15:48:30 -03:00
prlanzarin
d2e8e74471 fix(screenshare): always try to reconnect to screen as viewer
The reconnect routine is stopping for viewers if a broker cannot
re-connect in the first try. That is wrong: viewers should try to
reconnect as long as there'sigaling data that mandates so.

The reconnect trigger is changed from broker's started attribute to the
presence of a scheduled reconnection timeout - if there isn't one (not
schedule), always re-schedule it.
2023-03-08 15:47:01 -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
prlanzarin
45049cbd65 refactor: swap kurento-utils for new peer wrapper in screen sharing and audio 2022-07-15 14:00:12 +00:00
prlanzarin
53570deb86 fix(screenshare): make viewers reconnect immediately mid-call
If a viewer session failed mid-call, it was being scheduled for a reconnect via
the min-max connection timers (30s-60s), which is terrible UX.

This commit makes screen sharing viewers try to reconnect immediately when
appropriate.
2022-05-10 14:35:59 +00:00
prlanzarin
d45aecdbcc fix(screenshare): remove broken presenter screen reconnect
Outbound/presenter screen sharing reconnect was broken from inception, so it's
being removed until it´s properly re-implemented.

This also fixes an issue where presenter disconnections would be silent for the
end user - now an error toast is shown and the error properly logged.
2022-05-10 14:35:59 +00:00
prlanzarin
98ec11c9b5 fix(screenshare): properly reset connection attempts on stop
Fixes an issue where subsequent failures might lead to wrong error codes being
reported;

Splits the screen sharing bridge stop method into a reconnect-safe version and
a public one - should also address some quirks with inbound stream reconnection.
2022-05-10 14:22:45 +00:00
Paulo Lanzarin
ae6ea67699
Merge pull request #14973 from prlanzarin/u26-wasserwelt-technik
fix(screenshare): guarantee local stream is cleaned up
2022-05-10 11:13:14 -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
68f090fbe5 fix(screenshare): guarantee local stream is cleaned up
There could be a scenario where the local gDM stream wasnt cleaned up;
eg.: SFU is offline.

This commit guarantees all tracks from the local stream are stopped.
2022-05-07 16:50:41 +00:00
Ramón Souza
16cd3c4ebb Merge remote-tracking branch 'upstream/v2.4.x-release' into dev-24-0125 2022-01-25 16:56:52 +00:00
prlanzarin
8e822f4a6d fix(screenshare): add state sync between bbb-html5 and akka-apps
A TODO 5 years in the making
2022-01-12 19:36:38 -03:00
Ramón Souza
f6e65f58c5 merge 2.4 into develop and resolve conflicts - partial 2022-01-12 16:40:45 +00:00
Paulo Lanzarin
775150471c
Merge pull request #13688 from Arthurk12/screenshare-volume
feat(screenshare): volume control
2021-12-14 14:06:37 -03:00
Anton Georgiev
797fc49633 TEMP 2021-12-09 20:37:05 +00:00
prlanzarin
e49aa1c959 refactor(screenshare): revert volume control to HTMLMediaElement, make it configurable
I have growing concerns about gain node`s effect on audio quality the way it
was implemented, so I opted to fall back to HTMLMediaElement`s volume control
for the time being until we can gauge quality impacts properly later on

Add a new configuration flag enableVolumeControl, false by default while the
feature undergoes a field trial
2021-12-08 16:24:31 +00:00
prlanzarin
da6ab02122 chore: add forceRelayOnFirefox option (false by default)
- forceRelayOnFirefox: whether TURN/relay usage should be forced to work
around Firefox's lack of support for regular nomination when dealing with
ICE-litee peers (e.g.: mediasoup).
  * See: https://bugzilla.mozilla.org/show_bug.cgi?id=1034964
- iOS endpoints are ignored from the trigger because _all_ iOS browsers
  are either native WebKit or WKWebView based (so they shouldn't be affected)
2021-11-30 20:31:12 +00:00
Arthurk12
c2e90ede11 feat(screenshare): gain node
Splits screenshare stream into video and audio and adds gain node to audio
stream in order to permit volume control by the user. Volume is normalized
between [0, 2](muted and 2x boost).
2021-11-12 16:30:39 +00:00
Tainan Felipe
f5eef03f3f Improve data structure to not break on reconnections 2021-11-03 14:37:54 -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
prlanzarin
9d9ed9ce72 fix(screenshare): propagate media server metadata to screen sharing viewers
Originally the adapter was inferred server side; I removed that
2021-08-31 01:26:39 +00: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
86a715dc15 feat(screenshare): add media server adapter config in bbb-html5
Allows configuring, via bbb-html5, which media server adapter will be used by screen sharing; server wide
2021-08-31 00:19:51 +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
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
prlanzarin
387c453076 refactor(screnshare): let the server generate subscriber offers 2021-08-12 13:45:04 +00:00
Anton Georgiev
a37843d2a7 Merge branch 'v2.3.x-release' of github.com:bigbluebutton/bigbluebutton into merge238-into-24 2021-07-23 17:09:18 +00:00
prlanzarin
e20fe6d4ad fix(screenshare): avoid leaving a dangling HTMLMediaElement in paused state 2021-07-23 02:27:02 +00:00
prlanzarin
67fca54d76 fix(screenshare): fix client crash on presenter change
Scenario: presenter`s client could crash when the presenter changed while they were sharing their screen

That is due to a race condition on the stop procedure in the bridge: two stops can be triggered (one from the server-side websocket tear off and another from the client itself detecting the presenter change)

That could create a scenario where the broker was cleaned in one stop procedure after the second had checked its availability, causing an attribute access of a null member
2021-07-07 19:29:17 +00:00
prlanzarin
e5aec7beab refactor(screenshare): append error message to failure log 2021-07-07 19:29:11 +00:00
Ramon Souza
efc15d89ae remove unused code 2021-06-23 16:52:52 -03:00
Pedro Beschorner Marin
4a5b92445a refactor(external videos): system stop
Move all external video's system stop control events to akka-apps:
- on presenter change
- on presenter leave
- on screenshare start
2021-06-02 15:06:17 -03:00
Ramon Souza
5d6c9cbb18 removing unused imports/exports 2021-05-21 09:50:31 -03:00
prlanzarin
84cbda75a3 feat(screenshare): add screen bitrate config in bbb-html5 2021-04-24 19:12:59 +00:00
prlanzarin
775cbf4124 screenshare: move end alert sound to a reliable place 2021-03-12 00:44:38 +00:00
prlanzarin
7eb91f9273 Merge branch 'u22-screenshare18102020' of https://github.com/prlanzarin/bigbluebutton-1 into u23-ilgiardino 2021-03-11 18:49:14 +00:00
Anton Georgiev
740a3a9db9 stop external video if presenter changed 2021-02-21 12:19:01 +00:00
Joao Siebel
7f4b2789f2 Clear screenshare collection when meeting has ended while screensharing 2021-02-09 13:44:49 -03:00
prlanzarin
0a36da1e46 screensharing: remake error locales, split them into error classes
There are new locale strings for screensharing errors with a new format (Code X. #What to do) to make it easier for the end user
2021-01-13 09:43:28 -03:00
prlanzarin
25f5139973 screenshare: clean up getDisplayMedia method bindings 2021-01-13 09:05:24 -03:00
prlanzarin
077369c442 screenshare: add a centralized error code/message helper 2021-01-13 09:05:18 -03:00
prlanzarin
569ace358b screenshare: improve reconnection procedures and error logging in kurento/sfu bridge 2020-12-15 17:45:20 +00:00
prlanzarin
1383ab4def screenshare/html5: rewrite most of the client side code
Added new SFU broker for screen sharing

Removed kurento-extension entirely

Added inbound and outbound reconnection procedures

Improve UI responsiveness when sharing

Add reconnection UI states

Redo error handling

Refactor actions-bar screen share components. Make it smarter with less prop drilling and less re-rendering. Also more readable. Still work to do in that I think

Add a connection retry procedure for screen presenters when they are sharing; try a configurable amount of times when failure is triggered, with configurable min and max reconn timeouts and timeout increase factor

Make local preview attachment smarter

ADD PARTIAL SUPPORT FOR AUDIO SHARING VIA SCREEN SHARING WITH GET DISPLAY MEDIA, RECORDING STILL NOT SUPPORTED!!!
2020-12-09 22:00:54 +00:00
prlanzarin
f24460192c screeshare+audio: reorganize some audio checks, pass the flag to SFU 2020-12-08 20:30:30 +00:00
germanocaumo
83fe68db08 Play screenshare audio when present 2020-12-08 20:30:22 +00: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