75 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
6e679f952f redux: refactor loading of middlewares and reducers
Up until now we relied on implicit loading of middlewares and reducers, through
having imports in each feature's index.js.

This leads to many complex import cycles which result in (sometimes) hard to fix
bugs in addition to (often) breaking mobile because a web-only feature gets
imported on mobile too, thanks to the implicit loading.

This PR changes that to make the process explicit. Both middlewares and reducers
are imported in a single place, the app entrypoint. They have been divided into
3 categories: any, web and native, which represent each of the platforms
  respectively.

Ideally no feature should have an index.js exporting actions, action types and
components, but that's a larger ordeal, so this is just the first step in
getting there. In order to both set example and avoid large cycles the app
feature has been refactored to not have an idex.js itself.
2020-06-16 11:24:15 +02:00
Bettenbuk Zoltan
475a2ae596 feat: lobby feature
The lobby feature adds the possibility to lock a meeting and only allow people in after virtually knocking and going through formal approval
2020-06-09 18:10:43 +02:00
Bettenbuk Zoltan
0598e7369b ref: eslint-config-jitsi@1.0.3 2020-05-20 17:14:29 +02:00
Bettenbuk Zoltan
678ed605d7 ref: change JitsiModal to better fit to needs 2020-04-07 11:18:50 +02:00
Bettenbuk Zoltan
57d14d9517 feat: help centre 2020-04-02 12:40:12 +02:00
Saúl Ibarra Corretgé
467c9d36cf audio-only,lastn: move audio-only and last N handling to standalone features
This refactors all handling of audio-only and last N to 2 features in preparation
for "low bandwidth mode".

The main motivation to do this is that lastN is a "global" setting so it helps
to have all processing for it in a single place.
2019-08-02 15:54:47 +02:00
paweldomas
1c27f567ee feat: send analytics event when conference is rejoined 2019-07-26 08:25:53 +02:00
virtuacoplenny
c7013f5c4b
ref(follow-me): hook into redux (#3991)
Use subscribers to detect state change and emit those
out to other participants. Use middleware to register
the command listener.
2019-04-17 08:05:32 -07:00
Saúl Ibarra Corretgé
7d8ea85ea0 rn: start removing defaultURL 2019-03-12 16:55:28 +01:00
Saúl Ibarra Corretgé
e4c3e15791 rn: simplified code
There is no need for AbstractApp to require some getWindowLocation function.
It's only used in one place and we even polyfill it on mobile.

Thus replace it's usage with more specific functions.
2019-03-12 16:55:28 +01:00
Leonard Kim
22a1917107 ref(app): move url change handling to componentDidUpdate
Instead of handling the side effect of navigating to another
url from within componentWillReceiveProps, try to match the
same logic instead in componentDidUpdate.
2019-01-03 19:34:46 -08:00
Leonard Kim
9215b1e8b2 ref(app): move initialization into componentDidMount
componentWillMount is a deprecated lifecycle method;
componentDidMount should be used to kick off things
like ajax. In the case of the _App hierarchy, a promise
chain is used to perform initialization, and it is
first started in the constructor by initializing
storage. However, by the time storage is initialized,
resolving the first promise, _App has already mounted.
So, move it all to the componentDidMount lifecycle.
2019-01-02 10:02:04 +01:00
Bettenbuk Zoltan
3fdf944763 Fix eslint/jsdoc warnings (doc change only!) 2018-11-08 15:52:34 +01:00
Lyubo Marinov
bfdfb5321c feat(App): refactor App and split it into BaseApp and App (continued)
There doesn't seem to be a strong need for the initialized React
Component state in BaseApp so remove/delete it.
2018-07-12 11:28:48 -05:00
Saúl Ibarra Corretgé
dc246960df feat(App): refactor App and split it into BaseApp and App
BaseApp does all the heavy-lifting related to creating the redux store,
navigation, and so on.

App currently handles URL props and actually triggering navigation based on
them.
2018-07-12 11:28:19 -05:00
Saúl Ibarra Corretgé
3bfab7718f [RN] Refactor getting the default URL
Move it away from AbstractApp into an auxiliary function. In addition, introduce
a new `getServerURL` function which gets the configured server URL and defaults
to meet.jit.si as before.
2018-07-12 11:28:18 -05:00
Saúl Ibarra Corretgé
980648df4d feat(App): remove ability to specify an external redux store
It was never used in practice, and it would be very cumbersome to use, since it
would have to bcreated with all the middlewares and reducers we need. After
discussing this with Lyubomir, we are confident this is not going to be needed
so it can go.
2018-07-12 11:28:18 -05:00
Saúl Ibarra Corretgé
f2f991e969 feat(App): move participant leaving logic to base/participants 2018-07-12 11:28:17 -05:00
Lyubo Marinov
c203215c54 core: refactor routing (continued) 2018-07-11 22:58:41 -05:00
Saúl Ibarra Corretgé
155e02bbfb core: refactor routing
Unfortunately, as the Jitsi Meet development evolved the routing mechanism
became more complex and thre logic ended up spread across multiple parts of the
codebase, which made it hard to follow and extend.

This change aims to fix that by rewriting the routing logic and centralizing it
in (pretty much) a single place, with no implicit inter-dependencies.

In order to arrive there, however, some extra changes were needed, which were
not caught early enough and are thus part of this change:

- JitsiMeetJS initialization is now synchronous: there is nothing async about
  it, and the only async requirement (Temasys support) was lifted. See [0].
- WebRTC support can be detected early: building on top of the above, WebRTC
  support can now be detected immediately, so take advantage of this to simplify
  how we handle unsupported browsers. See [0].

The new router takes decissions based on the Redux state at the time of
invocation. A route can be represented by either a component or a URl reference,
with the latter taking precedence. On mobile, obviously, there is no concept of
URL reference so routing is based solely on components.

[0]: https://github.com/jitsi/lib-jitsi-meet/pull/779
2018-07-11 22:58:41 -05:00
Saúl Ibarra Corretgé
9ac5aafe10 react: remove custom Fragment
Fragment now works on both React and React Native, so use it.
2018-06-04 16:05:48 -05:00
Lyubo Marinov
db21e97c19 StateListenerRegistry
"Middleware" redux state changes, not actions.
2018-05-23 09:46:15 -05:00
Lyubo Marinov
fcca15c827 Coding style 2018-05-23 08:48:13 -05:00
Zoltan Bettenbuk
44a65eb329 Move local participant join to base/participants 2018-05-09 15:20:22 +02:00
zbettenbuk
959db3a665 Make web use the redux settings/profile 2018-05-09 15:20:22 +02:00
paweldomas
60e03e3dec feat: add join/leave sounds on mobile
Adds base/sounds feature which allows other features to register a sound
source under specified id. A new SoundsCollection component will then
render corresponding HTMLAudioElement for each such sound. Once "setRef"
callback is called by the HTMLAudioElement, this element will be added
to the Redux store. When that happens sound can be played through the
new 'playSound' action which will call play() method on the stored
HTMLAudioElement instance.
2018-03-13 16:57:28 -05:00
Lyubo Marinov
d727ee80b2 [RN] Fix base/profile and recent-list bugs 2018-02-27 20:52:34 -06:00
Lyubo Marinov
62c9762793 [RN] Protect AbstractApp and localStorage initialization 2018-02-05 15:26:01 -06:00
Lyubo Marinov
d7dddb2509 Introduce base/storage to represent the Web Storage API and persistence-related customizations 2018-02-02 15:13:26 -06:00
Lyubo Marinov
7954d5fd39 Coding style 2018-02-02 15:13:26 -06:00
zbettenbuk
158cadf4f9 Improve persistency layer 2018-02-02 15:13:26 -06:00
Saúl Ibarra Corretgé
98ff20a026 [RN] Simplify initialization of AsyncStorage 2018-01-19 09:41:34 -06:00
Lyubo Marinov
112c856850 Fix settings screen layout on iOS and add soft back button 2018-01-18 15:45:25 -06:00
zbettenbuk
410dc132e1 Fix settings screen layout on iOS and add soft back button 2018-01-18 10:06:26 -06:00
zbettenbuk
05a492241f Fix local participant details on web 2018-01-05 12:58:58 -06:00
zbettenbuk
bfcd34358b [RN] Add app-settings feature
[RN] Fix PR feedbacks, write persistency docs
2018-01-04 12:53:29 -06:00
Lyubo Marinov
b39b6640b4 React & React Native Fragment-like 2017-12-12 20:52:29 -06:00
Saúl Ibarra Corretgé
870e6bbddc feat(overlays): render overlays outside of Conference
On web Conference is pretty much all there is, but on mobile we have the welcome
page and the blank page. If we fail to load config.js, for example we will still
be in the welcome page *and* we want to show an error overlay.
2017-12-12 20:52:29 -06:00
Lyubo Marinov
8fd91573fc Fix eslint & flow errors
Prepares for the latest eslint & flow-related npm packages which cause
these errors.
2017-11-16 12:27:54 -06:00
Saúl Ibarra Corretgé
23550d377e feat(dark-theme): fix breakage on mobile
e09949be9f4c56af909bb6359a1e1f3f98ea6ef5 introduced the dark theme globally, but
it only applies to web, so move the logic to App.web.js
2017-10-23 09:12:31 -05:00
yanas
e09949be9f feat(dark-theme): Applies dark theme on inline-dialogs, tooltips, flags and more 2017-10-20 15:29:16 -05:00
Lyubo Marinov
45a1ae26ca [RN] Prepare to display BlankPage more
For example, while config.js and other files are being loaded before the
navigation to Conference is feasible.
2017-09-02 13:26:06 -05:00
Lyubo Marinov
6545a7a1bb Remove duplication 2017-09-01 23:55:25 -05:00
Lyubo Marinov
6003b560ae [RN] Fix opening the same URL multiple times
Deep/universal linking now utilizes loadURL (when possible). But loadURL
is imperative in the native source code while its JavaScript counterpart
i.e. React App Component prop url is declarative. So there's the
following bug: open a URL, leave the conference (by tapping the hangup
button, for example), and then opening the same URL actually leaves you
on the Welcome page (if enabled; otherwise, a black screen).

The implementation has a flow though: opening the same URL twice in a
row without an intervening leave will leave the first opening and join
the new opening. Which can be improved by not leaving and joining if the
conference is joined, joining, an not leaving. But that can be done
separately as an improvement independent of the current implementation
details.
2017-08-15 17:32:37 -05:00
Lyubo Marinov
571958cf26 Start the switch to prop-types
As https://facebook.github.io/react/docs/typechecking-with-proptypes.html
says, React.PropTypes have moved into the npm package prop-types since
React v15.5. I've already failed to update certain devDependencies
because they mandate the use of prop-types so I'd rather we (gradually
at least) move to prop-types rather than face a lot of work later on.
2017-08-15 17:32:37 -05:00
Lyubo Marinov
caea02a322 [RN] Mitigate 'Not joining a new URL while in a conference' 2017-08-01 06:31:03 -05:00
Lyubo Marinov
3546cf4915 Fixes jsdocs, formatting 2017-07-26 15:54:57 -05:00
Lyubo Marinov
a2c2d3bee1 [RN] Alternative to JitsiMeetView.loadURL w/o URL
Introduces loadURLObject in JitsiMeetView on Android and iOS which
accepts a Bundle and NSDictionary, respectively, similar in structure to
the JS object accepted by the constructor of Web's ExternalAPI. At this
time, only the property url of the bundle/dictionary is supported.
However, it allows the public API of loadURLObject to be consumed. The
property url will be made optional in the future and other properties
will be supported from which a URL will be constructed.
2017-07-26 15:53:35 -05:00
Lyubo Marinov
61fd4e4ce4 [RN] Fix passing url prop to Root and App components 2017-07-06 14:59:57 -05:00
Lyubo Marinov
9bd6bbfd95 Fix jsdocs. Simplify the source code 2017-07-06 14:59:57 -05:00