Commit Graph

140 Commits

Author SHA1 Message Date
Hristo Terezov a6c6cd6c56 fix: Add GUM timeout & improve device permissions 2021-02-08 15:53:38 -06:00
Jaya Allamsetty 30fc04ba61 fix(logging): Add more details to onerror and onunhandledrejection errors. 2020-10-27 10:17:59 -04:00
Saúl Ibarra Corretgé c261682a29 fix(rn,config) increase config load timeout to 10 seconds 2020-09-30 10:08:52 +02:00
Hristo Terezov dc6d3daef7 feat(external-local-storage): support 2020-09-29 17:58:17 -05:00
paweldomas bc43f00d28 feat: pass network info to LJM 2020-07-01 19:31:48 -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 0598e7369b ref: eslint-config-jitsi@1.0.3 2020-05-20 17:14:29 +02:00
Paweł Domas f646bc7a7a
ref: disable ICE restart by default (#6594)
* ref: disable ICE restart by default

The reason for that it's currently causing issues with signaling when
Octo is enabled. Also when we do an "ICE restart"(which is not a real
ICE restart), the client maintains the TCC sequence number counter, but
the bridge resets it. The bridge sends media packets with TCC sequence
numbers starting from 0.

The 'enableIceRestart' config option can be used to force it, but it's
not recommended.
2020-05-07 06:59:37 -05:00
Saúl Ibarra Corretgé caabdadf19 rn,polyfills: refactor all mobile polyfills
Move all polyfills to a standalone feature, which gets imported before anything
else in the mobile entrypoint. This guarantees that any further import sees the
polyfilled environment.
2020-05-06 12:35:12 +02:00
Saúl Ibarra Corretgé 062bc13d4f rn,storage: fix not using a persistent localStorage
In
1ffd75c0a6
we switched to using the localStorage wrapper provided by js-utils, which
checks for window.localStorage's availability very early. Our polyfill must be
applied earlier that any such import.

Here we are importing it in the entrypoint, which means no code ran before this,
literally.
2020-05-06 12:35:12 +02:00
Saúl Ibarra Corretgé 1bbb937d9d analytics: fix enabling analytics when disableThirdPartyRequests is set 2020-03-29 08:42:25 +02:00
Andrei Gavrilescu b125bff7c7 refactor / enable VAD talk while muted 2019-12-06 11:37:08 +00:00
Saúl Ibarra Corretgé 4a8f787519 rn: evaluate config.js in a sandboxed environment
We are downloading code off the Internet and executing it on the user's device,
so run it sandboxed to avoid potential bad actors.

Since it's impossible to eval() safely in JS and React Native doesn't offer
something akin to Node's vm module, here we are rolling our own.

On Android it uses the Duktape JavaScript engine and on iOS the builtin
JavaScriptCore engine. The extra JS engine is *only* used for evaluating the
downloaded code and returning a JSON string which is then passed back to RN.
2019-10-14 12:20:58 +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
Hristo Terezov a91b49c2c1 feat(reload): on offer / answer error. 2019-06-19 05:25:43 -07:00
Hristo Terezov 72a1def571 feat(config): whitelist config.analytics 2019-05-24 13:42:12 -07:00
Bettenbuk Zoltan 3987655f2a Refactor config loading 2019-04-10 15:47:36 +02: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
Hristo Terezov 59fc3642a6 feat(amplitude): add mobile implementation 2019-03-12 16:48:08 +01:00
Saúl Ibarra Corretgé 5afb057387 rn: polyfill callstats
Instead of bundling it in lib-jitsi-meet, which unnecessarily increases
lib-jitsi-meet's bundle size, polyfill it here so it's available in the global
scope, just like the web does.
2019-01-31 13:50:51 -06:00
Hristo Terezov 5ad98dd058 ref(config): Create 'analytics' section. 2019-01-07 14:32:31 +00:00
Bettenbuk Zoltan 3fdf944763 Fix eslint/jsdoc warnings (doc change only!) 2018-11-08 15:52:34 +01:00
Saúl Ibarra Corretgé a327a5d804 [RN] Drop the react-native-permissions dependency
It causes false positives when submitting the app to the Store. Use the new
permissions API in react-native-webrtc instead.
2018-09-05 14:56:00 -05:00
Saúl Ibarra Corretgé 955e0a3382 [RN] Simplify RTCPeerConnection.setRemoteDescription override 2018-08-29 09:22:28 -05:00
Saúl Ibarra Corretgé 1354731fc5 [RN] Update WebRTC polyfills 2018-08-29 09:22:28 -05:00
Saúl Ibarra Corretgé 3ca704d81d [RN] Update react-native-webrtc and remove no longer needed polyfills 2018-08-29 09:22:28 -05:00
Saúl Ibarra Corretgé dba7f2d429 [RN] Remove no longer needed polyfills (#3377)
- navigator.{platform,plugins} were needed by the no longer existing screenshare
  adapter
- document.implementation is already polyfilled by xmldom
2018-08-16 23:03:53 -05:00
bgrozev 2ee1bf9351 feat: Displays the E2E RTT in the connection stats table. (#3344)
* feat: Displays the E2E RTT in the connection stats table.

* fix: Whitelists the ping config properties.

* ref: Addresses feedback.

* npm: Updates lib-jitsi-meet to e097a1189ed99838605d90b959e129155bc0e50a.

* ref: Moves the e2ertt and region to the existing stats object.
2018-08-07 11:31:51 -07:00
Bettenbuk Zoltan b41bf22be7 Replace console with logger 2018-08-05 17:04:19 -05:00
Saúl Ibarra Corretgé a1cc9bce91 [RN] Drop no longer needed polyfills
They were required only on Android because of its old JSC version. With the JSC
version bump they are no longer required.
2018-08-05 17:04:19 -05:00
hristoterezov fb75180632 ref(RecentList): Improvements after review. 2018-08-03 11:25:03 -05:00
Saúl Ibarra Corretgé 3d6e18394e deps: update url-polyfill dependency
The previous location no longer exists. This is a fork of the original package,
which is actively maintained.

Fixes: #3304
2018-07-25 11:27:54 -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é 453c4b99dc cleanup: drop polyfills which were required for IE11 2018-07-11 17:53:32 +02:00
Saúl Ibarra Corretgé 87fa8de815 feat(sanity): axe IE and Temasys plugin support 🔥🔥🔥 2018-06-28 13:55:12 +02:00
virtuacoplenny ee74f11c3d
feat(recording): frontend logic can support live streaming and recording (#2952)
* feat(recording): frontend logic can support live streaming and recording

Instead of either live streaming or recording, now both can live together. The
changes to facilitate such include the following:
- Killing the state storing in Recording.js. Instead state is stored in the lib
  and updated in redux for labels to display the necessary state updates.
- Creating a new container, Labels, for recording labels. Previously labels were
  manually created and positioned. The container can create a reasonable number
  of labels and only the container itself needs to be positioned with CSS. The
  VideoQualityLabel has been shoved into the container as well because it moves
  along with the recording labels.
- The action for updating recording state has been modified to enable updating
  an array of recording sessions to support having multiple sessions.
- Confirmation dialogs for stopping and starting a file recording session have
  been created, as they previously were jquery modals opened by Recording.js.
- Toolbox.web displays live streaming and recording buttons based on
  configuration instead of recording availability.
- VideoQualityLabel and RecordingLabel have been simplified to remove any
  positioning logic, as the Labels container handles such.
- Previous recording state update logic has been moved into the RecordingLabel
  component. Each RecordingLabel is in charge of displaying state for a
  recording session. The display UX has been left alone.
- Sipgw availability is no longer broadcast so remove logic depending on its
  state. Some moving around of code was necessary to get around linting errors
  about the existing code being too deeply nested (even though I didn't touch
  it).

* work around lib-jitsi-meet circular dependency issues

* refactor labels to use html base

* pass in translation keys to video quality label

* add video quality classnames for torture tests

* break up, rearrange recorder session update listener

* add comment about disabling startup resize animation

* rename session to sessionData

* chore(deps): update to latest lib for recording changes
2018-05-16 07:00:16 -07:00
Louis Chen 627b9d319c [RN] Pollyfill DOMParser
It's required by lib-jitsi-meet when using WebSockets.
2018-04-30 08:52:41 +02:00
hristoterezov f14095ecfc feat(deep_linking): add analytics
In order to be able to add analytics to the deep-linking pages the
lib-jitsi-meet initialization has been moved so it happens earlier.

The introduced `initPromise` will eventually disappear, once conference is
migrated into React and / or support for Temasys is dropped. At that stage, it
can be turned into a sync function which all platforms share.
2018-04-26 10:11:34 +02:00
paweldomas 968b279b37 feat(android): support NAT64
Adds Nat64InfoModule which resolves IPv6 addresses for IPv4 addresses
in IPv6 only network where jitsi-meet deployment does not provide any
IPv6 addresses as ICE candidates.
2018-04-05 10:21:59 -05:00
virtuacoplenny 1e0a3ceb74 fix(chat): polyfills for lib-jitsi-meet ChatRoom#onPresence (#2678)
The onPresence parsing was refactored to remove use of jQuery.
This exposed three methods not available in react-native:
ParentNode.children, ChildNode.remove, and
document.querySelectorAll. The querySelectorAll change could
be swapped for the already polyfilled querySelector, but
children and remove had to be added. The polyfills are based
on those supplied by MDN web docs, but modified to pass jitsi
linting.
2018-03-28 18:04:42 -07:00
paweldomas ef52f09910 ref(config): override config from URL on mobile
Moves the things around to be able to override the config with the URL
params specified in the hash part of the location URI to which the app
is navigating to.
2018-03-20 21:07:45 -04:00
paweldomas 9e0fee6c7d fix(android): do not require java 8 target
Updates react-native-webrtc to get rid of Java 8 requirement for
the Android app.
2018-03-08 15:47:05 -06:00
Leonard Kim 466561f99f fix(polyfills): implement createHTMLDocument for jquery 2018-03-06 10:46:53 -06:00
zbettenbuk 8dc866fab3 Fix setTimeout polyfill 2018-03-06 09:42:25 +01:00
Lyubo Marinov e622829c1c [RN] Promised-base RTCPeerConnection API
Recent changes in lib-jitsi-meet probably led to (1) our
RTCPeerConnection customizations on react-native not being used which is
a problem because we need them for at least NAT64 on iOS in order to
pass the review in Apple's App Store and (2) unexpected exceptions
inside react-native-webrtc.

The Promise-based WebRTC API should be merged from react-native-webrtc's
upstream but I don't want to do it right now because last time we got
multiple bugs in addition.
2018-02-28 17:17:08 -06:00
Lyubo Marinov e2cf7a788d [RN] Make full-screen more resilient on Android (Coding style: consistency) 2018-02-14 12:28:22 -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 f35578c803 [RN] Polyfill __filename ASAP 2018-02-02 15:13:26 -06:00
hristoterezov c9e3e5052d fix(lib-jitsi-meet): RTCBrowserType -> browser. 2018-01-22 15:56:06 -06:00