Commit Graph

111 Commits

Author SHA1 Message Date
Robert Pintilii 1106a86ba7
ref(connection-indicator) Convert to TS (#12239) 2022-09-27 10:42:30 +03:00
Robert Pintilii 95084e1004
ref(TS) Convert some base features to TS (#12138) 2022-09-14 10:54:56 +03:00
Robert Pintilii 10bb186c13
ref(eslint) Use new TypeScript ESlint config (#12143)
Use new TS config from @jitsi/eslint
Fix all lint errors
2022-09-08 12:52:36 +03:00
Robert Pintilii 17008237dc
ref: Improve TS state (#12125)
Create IStateful interface
Use IState interface everywhere
Remove unnecessary @ts-ignore
2022-09-05 14:24:13 +03:00
Robert Pintilii 271ea8315b
ref: Improve reducers TS (#12123) 2022-09-05 12:05:07 +03:00
Robert Pintilii 3403d7bec2
ref: Convert reducers to TS (#12101) 2022-09-01 14:00:49 +03:00
Robert Pintilii ac2af79807
ref(TS) Alpha sort interfaces (#11883) 2022-07-20 11:47:01 +03:00
Robert Pintilii f31a7f31e6
ref: Convert files to TS (#11840) 2022-07-12 14:41:26 +03:00
Дамян Минков f3c6b54ffa
fix: When adding a room param to urls check for previous params. (#11607)
* fix: When adding a room param to urls check for previous params.

* squash: Uses URL object to modify the url.

* squash: Use common connection options from base/connection.

Normalizes bosh url and for web.

* squash: Adds release param to external api and handles it.

* feat: Adds release handling for mobile(links in welcome page).

* squash: Fixes comments.
2022-06-16 15:27:41 +03:00
Calinteodor 7c523f3250
language(typescript) actionTypes.js -> actionTypes.ts (#10940)
* language(typescript) first ts component, added ts configurations, actionTypes.js are now ts files
2022-04-08 15:24:58 +03:00
Calinteodor 5da40a5fb0
fix(mobile/navigations) added LoadConfigOverlay to RootNavigator (#11067)
Converted LoadConfigOverlay to a JitsiScreen component that right now is part of navigation as ConnectingPage, plus I
separated appNative and other actions into web and native.
2022-03-17 16:13:58 +02:00
Дамян Минков 389d455daa
feat: Passing the url to conference mapper (#11013)
* fix: Moves getDialInConferenceID, so we can reuse conf mapper url generation.

* fix: Moves getDialInNumbers, so we can reuse url generation.

* squash: Moves dialInInfo page path to constants.

* feat: Adds the location address as a param to the conf mapper request.

* feat: Adds option conf mapper and numbers urls to contain parameters (?).

* squash: Adds more doc comments.

* squash: Makes sure we strip url params if any, and they do not reach fetch.
2022-02-28 14:03:42 -06:00
Saúl Ibarra Corretgé a8f281a43e feat((rn,config) add a/b test flag to enable XMPP WebSockets on mobile 2021-09-15 15:26:25 +02:00
paweldomas 663752be2c feat(rn,connection) enable XMPP WebSocket on mobile
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
2021-09-15 15:26:25 +02:00
Horatiu Muresan b801e0115d
fix(context-menus) Fix participant context menus/toolbar overflow menu
- on ipads, long touch open dialog now opens the context menu to the left of the thumbnail as expected
- on ipads, now we close context menus on tap out
- fix case when participant context menu's height > tileview videos' height causing scroll on videos pane
- keep toolbox open while the overflow menu is shown
- keep remote participant video thumbnail in filmstrip visible even if toolbox is hidden, if context menu is opened
- Fix bug where toolbox could be completely disabled
2021-09-14 10:43:52 +03:00
hmuresan b995221a2b feat(thumbnails) Add changes to mobile context menu
- long touch on thumbnail opens context menu
- hide context menu icon
- add button for connection info to context menu
2021-07-06 16:46:53 +03:00
luz paz d3680bbebd fix(misc) follow-up typos
Found via `codespell -q 3 -S ./lang`
2021-03-22 10:41:41 +01:00
Tudor-Ovidiu Avram b889bd5664 fix(jaas) replace only the first slash in a pathname 2020-11-16 11:01:31 +02:00
Tudor-Ovidiu Avram 0f64c66f91 fix(jaas) fix double slash for branded invite urls 2020-11-05 15:43:53 +02:00
Tudor-Ovidiu Avram 8a4fb72eae feat(branding) allow invite links to be branded 2020-08-21 11:00:12 -05:00
damencho cdd782a82f fix: Fixes uncaught exception on malformed jwt.
Does not skip passing jwt even when malformed to allow getting the error, terminating the connection and showing the warning. We were not passing jwt when malformed and were successfully joining a conference for deployments where no token is allowed.
2020-08-13 11:00:04 -05:00
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 29dc63fbcb ref: merge prejoin with lobby 2020-06-09 18:10:43 +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
Saúl Ibarra Corretgé 7d67cb583e rn,connection: fix autogenerated BOSH address
When the location URL contains a nonstandard port, it won't be included in
URL.hostname, but it will in URL.host.
2020-02-05 16:05:11 +01:00
paweldomas b25db3ce2e feat(config.js): add 'websocket' config option
Config.js will allow to specify both BOSH and Websocket URLs. In such
case the web app will prefer Websocket over BOSH. The reason is that it
appears to be more stable and a bit fast on web, while on mobile
websocket is dropped fast(killed by the OS) on network changes.
2020-01-24 15:21:10 -06:00
paweldomas e8e70d9d27 ref(base/connection/actions.native): JitsiConnection.connect returns void
Do not return anything from JitsiConnection.connect, because it's not
a promise and returns void. Doing so is confusing to the reader.
2020-01-07 17:44:22 +00:00
Bettenbuk Zoltan 13d78d6b49 fix: utf-8 room name case sensitivity 2019-10-08 10:35:19 +02:00
Saúl Ibarra Corretgé 5a934c071a logging: use individual, names loggers
React Native doesn't define __filename nor __dirname so do it artisanally. In
addition, this helps with centralizing the configuration passed to loggers.
2019-08-23 10:57:38 +02:00
paweldomas 7684b2bf98 ref: move getCurrentConferenceUrl to base/connection
Moves getCurrentConferenceUrl method to base/connection to allow reuse.
The new location is not ideal, but looks the best based on the imports
required (trying to avoid circular dependencies).
2019-07-26 08:25:53 +02:00
Saúl Ibarra Corretgé a4cf79c161 rn: fix losing audio if call is hangup too quickly
This PR changes the logic for connecting / disconnecting conferences. Instead of
doing it in mount / unmount events from the Conference component, it moves the
logic to the appNavigatee action.

This fixes a regression introduced in 774c5ecd when trying to make sure the
conference terminated event is always sent.

By moving the logic to appNavigate we no longer depend on side-effects for
connecting / disconnecting, and the code should be more maintainable moving
forward.

An improvement to this is the concept of sessions, which, while not tackled
here, was taken into consideration.
2019-05-23 15:16:31 +02:00
paweldomas e4af5ddbe9 feat(base/connection): throw error and add isInviteURLReady 2019-05-03 19:29:30 +02:00
Saúl Ibarra Corretgé 774c5ecd18 rn: ensure the conference terminated event is always sent
Dear reader, I'm not proud at all of what you are about to read, but sometimes
life just gives you lemons, so enjoy some lemonade!

Joining a conference implies first creating the XMPP connection and then joining
the MUC. It's very possible the XMPP connection was made but there was no chance
for the conference to be created.

This patch fixes this case by artificially genrating a conference terminated
event in such case. In order to have all the necessary knowledge for this event
to be sent the connection now keeps track of the conference that runs it.

In addition, there is an even more obscure corner case: it's not impossible to
try to disconnect when there is not even a connection. This was fixed by
creating a fake disconnect event. Alas the location URL is lost at this point,
but it's better than nothing I guess.
2019-04-25 14:04:26 +02:00
Bettenbuk Zoltan 18d908ce84 Fix flow errors from base/connection 2019-04-10 15:47:36 +02:00
Hristo Terezov ed1d3d3df5 fix(api-devices): Initial device function calls 2019-03-29 15:42:02 +00:00
Saúl Ibarra Corretgé c025c7e132 flow: tame the beast
🔥🔥🔥
2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé 0e92e73789 chore: use strings as action types
Using anything non-serializable for action types is discouraged:
https://redux.js.org/faq/actions#actions

In fact, this is the Flow definition for dispatching actions:

declare export type DispatchAPI<A> = (action: A) => A;
declare export type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;

Note how the `type` field is defined as a subtype of string, which Symbol isn’t.
2019-03-21 14:47:55 +01:00
Bettenbuk Zoltan 3fdf944763 Fix eslint/jsdoc warnings (doc change only!) 2018-11-08 15:52:34 +01:00
Saúl Ibarra Corretgé a896d8f076 [RN] Fix normalizing BOSH URLs (#3376)
If a relative BOSH URL is found (as docker-jitsi-meet does) construct a full URL
based on the location URL and context root.

Also remove some default options since we need the config file anyway, so I see
no point in doing the extra work.
2018-08-16 23:03:15 -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
virtuacoplenny 84b589719f fix(connection): reload immediately on possible split-brain (#3162)
* fix(connection): reload immediately on possible split-brain

There isn't an explicit way to know when a split brain
scenario has happened. It is assumed it arises when an
"item-not-found" connection error is encountered early
on in the conference. So, store when a connection has
happened so it be calculated how much time has
elapsed and if the threshold has not been exceeded
then do an immediate reload of the app instead of
showing the overlay with a reload timer.

* squash: rename isItemNotFoundError -> isShardChangedError
2018-07-02 16:22:51 -05:00
Saúl Ibarra Corretgé 87fa8de815 feat(sanity): axe IE and Temasys plugin support 🔥🔥🔥 2018-06-28 13:55:12 +02:00
paweldomas 022954b40b fix(base/connection/reducer): clear 'connection' field
Currently the listeners for disconnected and failed connection events
are unsubscribed as soon as the connection is established, so
the CONNECTION_DISCONNECTED is never triggered which would clear the
'connection' field. This commit will clear the 'connection' state on
CONNECTION_WILL_CONNECT. It's needed anyway given that there's no
guarantee on when and if the async disconnect operation will finish.

One issue caused by the 'connection' not cleared was that
CONNECTION_FAILED was not reduced correctly and the reload screen was
not displayed for the following scenario:
1. Join and leave any working conference.
2. Turn off network connectivity on the device.
3. Wait for CONNECTION_FAILED. The reload screen will not be displayed,
   because CONNECTION_FAILED is not reduced correctly, because the old
   'connection' value is still there.
2018-06-20 15:52:45 +02:00
paweldomas dbd1091364 ref: use getCurrentConference
Try to use the getCurrentConference function wherever the indention is
to check for the current conference.
2018-05-30 16:29:27 +02:00
Saúl Ibarra Corretgé d557a6505d [RN] Fix handling XMPP connection failures
After the connection is established, it can either be properly disconnected or
fail. We need to make sure to be listening for events for either.
2018-05-23 16:37:58 -05:00
Lyubo Marinov 22ce001f14 Coding style: commends, formatting, sorting order 2018-05-20 22:58:34 -05:00
paweldomas 7704809c4c feat(base/connection): log leave failure reason
Because there are multiple reasons on why a conference.leave() may fail
it's helpful to know if and why it happened.
2018-05-20 21:17:36 -05:00
paweldomas a9ee5944e1 ref(base/connection): conferenceFailed error argument
Introduce ConnectionFailedError type.
2018-05-04 13:02:19 +02:00