Commit Graph

252 Commits

Author SHA1 Message Date
Ramon Souza
084d80f23e remove unused state properties 2021-09-01 08:48:46 -03:00
prlanzarin
c741cea715 feat(video): add media server adapter config for cameras in bbb-html5
Allows configuring, via bbb-html5, which media server adapter will be used by cameras; server wide
2021-08-31 00:30:06 +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
631e8fce4b Get stats for video connection
We now retrieve update information about active video peers, and calculates
download and upload rates. These rates are the sum of data transfered in
all video peers.
Screenshare stats is not being added to the sum, yet.
2021-08-13 17:24:44 -03:00
prlanzarin
74c6f1b6f8 refactor(webcams): let the server generate subscriber offers
Let the server generate subscriber offers so that it becomes easier for us to
do payload type normalization between publishers and subscribers

Also split peer creation for pubs and subs into separate methods for clarity
2021-08-10 17:31:45 +00:00
prlanzarin
b190f74009 refactor(virtual-backgrounds): remove camera effect toggle (video-list) 2021-07-28 13:37:40 +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
8b48de561b fix(webcams): avoid leaving dangling HTMLMediaElements in paused state
Should fix an issue with the recent Chrome 92 intervention that limits
the number of concurrent WebMediaPlayers (an inner element of
HTMLMediaElements) to 75/40.

Webcam video elements were being left dangling in paused state despite
the elements themselves being cleaned up from the component. That
generated a skewed accounting of WebMediaPlayers in the session.
2021-07-23 02:24:47 +00:00
prlanzarin
9071ba8bc4 refactor(virtual-backgrounds): re-organize virtual background code
Changes (maybe not a complete list):
  - Disable virtualbgs by default
  - Move the virtualbg selector in video-preview to the side below the
profile selection
  - Restore old video-preview sizes
  - Add a wrapper class for MediaStreams (BBBVideoStream)
  - Centralize virtualbg services and business logic code into BBBVideoStream
  - Refactor and centralize virtualbg constant fetching
  - Refactor and centralize virtualbg config fetching
  - Organize virtualbg type definitions
  - Remove added states in video-provider to prevent further bloat
  - Remove added states in video-preview to prevent further bloat
  - Lock virtual bg switching while video-preview itself is locked
  - Add proper virtualbg error surfacing via toasts
  - Refactor iOS availability detection to use centralized UA checker
  - Avoid calling gUM when toggling virtualbgs on/off
  - Make virtualbg video-list-item action a toggle instead of a
state-aware action
  - Make virtualbg switching work in video-preview for cameras that are
already shared. Especially useful when there are multiple source
cameras, and will be important in the near future
  - Add Derivative Work notices in files that are partially copied from
jitsi-meet
  - Simplify track replacing in video-provider
  - Split video-preview UI code for virtualbgs into a separate functional component
2021-07-22 18:53:42 +00:00
Bartu Bazna
9f791a8892 Squashed virtual background commits 2021-07-21 20:00:19 +00:00
prlanzarin
15bd0b6087 fix(webcams): add error feedback when media is ejected by the server
Closes #12732
2021-07-08 15:10:22 +00:00
prlanzarin
0453e9e842 fix(webcams): reduce number of gUM calls
Shave off the number of calls in video-preview and video-provider by
using a stream storage

We don´t call an upfront gUM in video-preview anymore to lift the
fingerprinting barrier on device labels and IDs. Flow has been reversed:
upfront enumerate, load first preview, then check if previous
enumeration was obfuscated.

Add a stream storage in video-preview`s service to avoid re-fetching
them in video-providerj

Remove some unneeded video-preview container props

Improve some of video-preview`s error locales
2021-07-02 16:13:31 +00:00
Vitor Mateus De Almeida
3a281adab5 Remove background and commented code
Revert linting
2021-06-22 14:04:56 -03:00
Vitor Mateus De Almeida
6469b68d45 Add webcams component on new Layout Manager 2021-06-21 17:16:59 -03:00
Pedro Beschorner Marin
068b82b1fa refactor(connection status): remove legacy monitor
Remove parts of a previous connection monitor.

To add some context (as far as my memory goes) to the multiple connection
monitor features the product has, `stats` (currently named `connection status`)
was introduced at the Flash client back in ~2016. @fcecagno and I did it
as a BigBlueButton's Summit activity. Our work was squashed into a single
commit in 92554f8b3e :).

I'm not sure about the whole story behind `network information` (the late
connection monitor added to the HTML5 client) but I assume it should work
as a collector for a bunch of different connectivity monitors. I remember
when it was introduced but I don't know why it wasn't adopted. My best guess
would be because of some performance issues the `user list` had back then.

To follow on why `connection status` replaced `network information` at the
HTML5 client, when I did the `multiple webcams` feature I had to refactor
a big chunk of the `video provider` (#8374). Something that wasn't really
helping there was the adaptation of `stats` that was made to show local
feedback for each webcam connection. Although this feature wasn't being
used anymore, `network information` did rely on that to build up data. With
this monitor gone I assumed it was my responsibility to provide an alternative
so I promoted Mconf's port of the Flash `stats` monitor to BigBlueButton's
HTML5 client (#8579).

Well, that's my perspective on how things went for those features. If
anyone would like to correct me on something or add something else on
that history I would appreciate to know.
2021-06-13 14:02:46 -03:00
prlanzarin
d707048c56 fix(video): remove unused floorStream variable 2021-05-12 19:26:26 +00:00
prlanzarin
001ab9554c video: added voice activity stream sorting, made stream sorting extensible
Video streams can be sorted by voice floor activity in the client according to FreeSWITCH´s floor events. The feature works together with pagination, essentially giving an Last-N like experience while not disrupting too much

Made video stream sorting extensible in a way. The sorting modes for pagination and unbounded can be configured in settings.yml and new sorting modes can be added to the stream sorting util under video-provider. Inline docs explain how to do that

Changed how the stream ID attribute from video-streams collection was passed to downstream components; we had an array map that was executed every change just to map stream to cameraId, which is bizarre. So I changed the cameraId usage in downstream components to be conformat with the collection attributes and shaved off the map where it wasnt needed

Add better selectors to video-list-item container´s VoiceUser fetch
2021-04-12 19:06:07 +00:00
prlanzarin
ab17b10c38 listenonly,video-provider,screenshare: remove ICE gathering pre-flight check 2021-03-12 02:51:45 +00:00
prlanzarin
db15d1b280 video-provider: fix setReconnectionTimeout race condition that caused webcams to drop
Problem: setReconnectionTimeout was being called in the first candidate generation to set the negotiation/reconnection timeout up. That caused some browsers or specific scenarios (mainly envs without STUN) to establish the negotiation (playStart) before generating any useful out-of-band candidates (relay). That would cause the timeout to be set AFTER it is supposed to be cleared due to success (playStart), making the webcam drop after a while

So I moved the setReconnectionTimeout call to a safer spot: right after the first negotiation requisition goes out to bbb-webrtc-sfu
2021-03-10 20:09:55 +00:00
prlanzarin
6418d0f556 video-provider: more logging improvements, clean up playStart restart timers reset 2021-03-10 20:09:00 +00:00
prlanzarin
f85b5dfa5b video-provider: quick logging cleanup
Reduce logging volume and payload size, perf
2021-03-10 20:08:40 +00:00
prlanzarin
ee142501ab video-provider: fix inbound/recvonly video reconnection 2021-03-10 20:08:29 +00:00
Pedro Beschorner Marin
c120dc2859 Avoid dispatching fallback error toast message
There's some scenarios that video errors triggers multiple toast notifications
that don't have any mapped defined message feedback so they all drop to the default
permission error. This leaves the impression that something is broken at the toast
container.

Since those messages don't bring up much information about the problem we can avoid sending
them until we don't have a more informative one to notify the user.
2021-03-10 19:47:25 +00:00
Anton Georgiev
377dc27a8d Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutton into 09-16-merge 2020-09-17 14:37:28 +00:00
Anton Georgiev
8cc8474655 Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutton into 08-26-merge 2020-08-27 19:09:07 +00:00
Anton Georgiev
3003897bfe
Merge pull request #10336 from prlanzarin/upstream-2.2-vpeg-pagination
video-provider: add missing PropType, remove render socketOpen check
2020-08-27 09:17:04 -04:00
prlanzarin
395de41f60 video-provider: add missing proptype
Also trim down prop assignment in render
2020-08-27 02:20:09 +00:00
prlanzarin
191654814a video-provider: remove socket open state condition for rendering video-list
That check doesnt make sense anymore. Removing it makes the video list load faster and webcam sharing seem more responsive
2020-08-27 02:19:55 +00:00
Anton Georgiev
b8959be312
Merge pull request #10304 from pedrobmarin/individual-video-record-control
Add individual video record control
2020-08-24 16:58:16 -04:00
prlanzarin
e7323ee6a5 video-provider: fix dynamic profile accounting when using pagination 2020-08-24 18:30:24 +00:00
Pedro Beschorner Marin
95bc7cd59e Add individual video record control
This adds bbb_record_video userdata that, when is set to false, signals
bbb-webrtc-sfu to avoid generating the stream recording assets for a
particular user.

By default, bbb_record_video is true.
2020-08-21 19:10:25 -03:00
prlanzarin
a98c476239 video-provider: remove page change lock in favor of a debounced approach 2020-08-20 15:43:02 +00:00
prlanzarin
28e826118a video-provider: first version of video pagination 2020-08-18 17:00:47 +00:00
Anton Georgiev
5be5aed1d9 Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutton into merge-2020-08-12 2020-08-12 17:12:58 +00:00
prlanzarin
642de5076a video-provider: first, simplified version of dynamic camera profile control 2020-08-05 16:55:41 +00:00
prlanzarin
dac3259c48 Merge remote-tracking branch 'pedrobmarin/bbb-multiple-webcams' into upstream-2.2-vpeg-base 2020-08-05 14:20:58 +00:00
Vitor Mateus
e2db60e662 WIP Resizable works fine 2020-07-20 16:11:09 -03:00
Anton Georgiev
7535e6fa59
Revert "Create layout context and add a layout manager" 2020-07-15 12:44:59 -04:00
prlanzarin
0f8b27d2d8 video-provider: make camera timeouts configurable
Also add missing settings.yml val for wsConnectionTimeout
2020-07-09 17:53:24 +00:00
prlanzarin
72a67bdd63 video-provider: make reconn websocket connectionTimeout configurable
Keep the default value (current) in settings.yml
2020-07-09 17:50:04 +00:00
Vitor Mateus De Almeida
880963e0e7 Merge remote-tracking branch 'upstream/develop' into layout 2020-07-06 13:36:38 -03:00
Anton Georgiev
c9e996de21 Merge branch 'v2.2.x-release' of github.com:bigbluebutton/bigbluebutton into merge-2.2-into-develop 2020-05-25 17:32:24 +00:00
prlanzarin
2cba85e866 html5: refactor STUN/TURN fetch, add fallback STUN, fix deadlock in audio join
Refactored STUN/TURN fetch to be done only once, when successful, per session and cache it in mem to avoid too many reqs. Current way is a bit dumb, this should increase reliability a bit more. The caching is configurable so folks who want to use very short lived TURN credentials can disable it

Add a fallback STUN config option to be used when the default STUN/TURN fetch fails

Clean the safari/no candidate generation pre flight check from 3rd party STUNs

Fix deadlock in audio join when STUN/TURN fetch failed
2020-05-21 04:35:17 +00:00
Vitor Mateus
00259ab371 WIP Resizable works fine 2020-04-23 11:07:44 -03:00
prlanzarin
bf69926576 Fix race condition in video-provider that may cause peers to fail
The peer object was being fetched only once in the ICE candidate callback, and it would fetch a placeholder empty object (sometimes) which would be kept in the callback closure till the end of the peer lifecycle. With that, the didSDPAnswered state variable which released the outbound ICE queue wouldnt be correctly read and the queue would never be flushed
2020-01-31 19:49:12 +00:00
prlanzarin
10b4a60a57 Fix race condition in video-provider that may cause peers to fail
The peer object was being fetched only once in the ICE candidate callback, and it would fetch a placeholder empty object (sometimes) which would be kept in the callback closure till the end of the peer lifecycle. With that, the didSDPAnswered state variable which released the outbound ICE queue wouldnt be correctly read and the queue would never be flushed
2020-01-31 19:32:57 +00:00
Pedro Beschorner Marin
801ed30a8e Missing after rebase 2019-12-10 13:02:18 +00:00
Pedro Beschorner Marin
5c71e2d0bb Included new getStats monitor for audio and video 2019-12-10 09:07:06 -03:00
Pedro Beschorner Marin
a434f61052 Reverting file mode changes 2019-12-10 09:05:04 -03:00
Pedro Beschorner Marin
f5d7be7f00 Making the interface functional for the multiple webcams. This must change after thinking on a design 2019-12-10 09:05:03 -03:00
Pedro Beschorner Marin
315fa755f0 Removed unused video visibility monitor 2019-12-10 09:02:17 -03:00
Pedro Beschorner Marin
3b591a086b Unified video providers 2019-12-10 09:02:16 -03:00
Pedro Beschorner Marin
debd8f714a Removed unused session vars logic 2019-12-10 08:21:21 -03:00
prlanzarin
19bf430760 Add userId and userName to the SFU start calls where they were missing 2019-11-28 18:46:23 +00:00
prlanzarin
52d69156ca Fix viewer camera reconnection timers
Also try to reconnect when ICE fails, a server-side error comes through or the WebRTC stack throws a tantrum, not only when the first connection fails.
2019-11-28 18:03:14 +00:00
prlanzarin
d3fa2f6508 Add an outbound ice queue to video-provider peers
Only send candidates after the SDP exchange was locked due stop-start glare
2019-11-28 18:01:32 +00:00
prlanzarin
b52214f0b5 Make some imports use absolute paths
Some more linting as well
2019-11-14 19:07:35 +00:00
prlanzarin
215f79f383 Account for mDNS candidates on gUM fallback for recvonly peers
Also added some client logging for those cases

Moved video-provider gUM fallback detection to be used only on recvonly streams
2019-11-14 16:35:56 +00:00
Chad Pilkey
3dd4761889
Merge pull request #8157 from capilkey/viewer-webcam-lock-unshare
Viewer webcam lock unshare
2019-09-27 18:20:26 -04:00
Tainan Felipe
b0f2e16f86 Add propTypes and redo variable types 2019-09-27 15:01:11 -03:00
Chad Pilkey
6c0358ae90 bitrate only webcam profiles and error handling 2019-09-26 18:28:37 +00:00
Tainan Felipe
966debb341 Fix viewer webcam not unsharing when lock setting is enable 2019-09-16 11:15:18 -03:00
Vitor Mateus
ffea873845 Fix Screenshare alignment and remove improper drag cursor #7869 #7785 2019-08-27 16:38:00 -03:00
Chad Pilkey
6e76dd584b improve user fetch and sort, and webcam fetch 2019-08-09 15:39:55 -07:00
Vitor Mateus
e8f15b97b6 Fix fullscreen edge cases 2019-07-26 13:48:51 -03:00
Vitor Mateus
5b21c500dd Merge remote-tracking branch 'upstream/master' into issue-7022-2 2019-07-23 19:37:15 -03:00
Vitor Mateus
db1825a15c Code cleanups 2019-07-23 19:24:31 -03:00
Vitor Mateus
120764ee33 Adjustments to fullscreen toggle #7022 #7067 2019-07-23 16:56:39 -03:00
Anton Georgiev
e84d25a435 use correct property in log for video-provider 2019-07-23 15:12:54 +00:00
prlanzarin
ca474e95bd Refactor video-provider component logs 2019-07-18 20:44:21 +00:00
Anton Georgiev
901987282a
Merge pull request #7756 from vitormateusalmeida/webcams-draggable-refactor
Webcam draggable refactoring
2019-07-16 09:53:39 -04:00
Vitor Mateus
68ec6411aa Webcam draggable refactoring 2019-07-09 20:11:48 -03:00
Anton Georgiev
b71bd48490 remove redundant audio log 2019-07-02 20:11:48 +00:00
Anton Georgiev
86a178fbf6 video-provider logger with extraInfo 2019-07-02 19:51:35 +00:00
Anton Georgiev
3fcb95ab44 log structure {logCode, extraInfo}, comment 2019-06-28 21:45:50 +00:00
prlanzarin
98b7d10a32 [video-provider] Set peer as started first on handlePlayStart 2019-06-26 19:25:05 +00:00
prlanzarin
feb408fac7 [video-provider] Only set a reconnection timeout if the peer hasnt already started 2019-06-26 19:16:28 +00:00
prlanzarin
26ae1585e5 Add option to specify bitrate/bw on cameraProfiles 2019-06-13 18:24:54 +00:00
Joao Siebel
16f20db001 parameterize the packet lost threshold 2019-06-12 17:27:49 -03:00
Vitor Mateus
0c81eda94e Fix webcam size after minimize the presentation #7570 2019-06-07 17:45:54 -03:00
Vitor Mateus
7af426d0d2 Avoid webcam overflow the screen with multiples webcams 2019-06-03 11:05:09 -03:00
Vitor Mateus
6de7650ec9 Merge remote-tracking branch 'upstream/master' into issue-6724 2019-05-27 19:18:26 -03:00
Vitor Mateus
d1b910a558 Fix errors in grid layout 2019-05-27 19:06:52 -03:00
Joao Siebel
d9b850f085 prevent data when monitoring is disabled 2019-05-24 16:55:35 -03:00
Joao Siebel
8ba90b2121 Merge remote-tracking branch 'upstream/master' into network-indicator 2019-05-23 15:42:38 -03:00
Joao Siebel
a2d2dc332f fix a problem with local stream and update the code 2019-05-23 15:25:31 -03:00
Anton Georgiev
88cfd6bde8
Merge pull request #7277 from Tainan404/issue-7200
Stop webcams when opens audio modal.
2019-05-22 11:36:53 -04:00
Joao Siebel
10c0e7dd24 Merge remote-tracking branch 'upstream/master' into network-indicator 2019-05-06 14:12:04 -03:00
Chad Pilkey
2aeed72c8d refactor video preview media selection 2019-04-30 12:54:56 -07:00
Vitor Mateus
196e48b6c6 Merge remote-tracking branch 'upstream/master' into issue-6724 2019-04-24 10:37:30 -03:00
Vitor Mateus
e73246ee0d Merge remote-tracking branch 'upstream/master' into issue-6724 2019-04-23 17:27:04 -03:00
Vitor Mateus
0ade45e8cd Bugs fixes, code Improvements and cleanups. 2019-04-23 17:23:32 -03:00
Anton Georgiev
0bd7980f0c adjust formatting in video-provider 2019-04-23 19:57:31 +00:00
Anton Georgiev
ff4e407155 added logCode in video_provider 2019-04-23 18:26:28 +00:00
Joao Siebel
c98db398fc Merge remote-tracking branch 'upstream/master' into network-indicator 2019-04-22 09:18:02 -03:00
Joao Siebel
067801acae update logic and rename function 2019-04-22 09:11:16 -03:00
Joao Siebel
08d177dac0 add initial network logic 2019-04-18 18:15:48 -03:00
Tainan Felipe
0a730bcf62 Stop webcams when open audio modal 2019-04-18 15:48:39 -03:00
Anton Georgiev
12eefb7785 pass additional properties in logline 2019-04-17 19:40:08 +00:00
Anton Georgiev
797d8056e3 reduce webcam logging lines, improve info quality 2019-04-17 17:38:49 +00:00