Commit Graph

161 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé 26f0f7f89c [RN] Alert the user when they need to manually grant a permission 2017-08-22 07:28:19 -05:00
Lyubo Marinov c0de88ba8c [RN] Remove unnecessary import 2017-08-18 14:45:00 -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
Saúl Ibarra Corretgé 122ebe48c7 [RN] Cache avatars and provide a default in case load fails
Avatars are cached to the filesystem and loaded from there when requested again.
The cache is cleaned after a conference ends and on application startup
(defensive move).

In addition, implement a fully local avatar system, which is used as a fallback
when loading a remote avatar fails. It can also be forced using a prop.

The fully local avatars use a user icon as a mask and apply a background color
qhich is picked by hashing the URI passed to the avatar. If no URI is passed a
random color is chosen.

A grace period of 1 second is also implemented so a default local avatar will be
rendered if an Avatar component is mounted but has no URI. If a URI is specified
later on, it will be loaded and displayed. In case loading the remote avatar
fails, the locally generated one will be used.
2017-08-03 13:45:41 -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 96e0c56bde [RN] Don't override config values 2017-07-21 17:40:09 -05:00
Lyubo Marinov 7dbba59dee [RN] Disconnect/hangup before joining a new URL 2017-07-06 15:00:29 -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
Saúl Ibarra Corretgé cc9249ba1a [RN] Fix passing url prop to Root and App components
React (pun intended) to prop changes, that is, load the new specified URL.

In addition, fix a hidden bug in loading the initial URL from the linking
module: we prefer a prop to the URL the app was launched with, in case somehow
both are specified. We (the Jitsi Meet app) are not going to run into this
corner case, but let's be defensive just in case.
2017-07-06 14:59:57 -05:00
Lyubo Marinov 5f64ccb97d [RN] Naming 2017-06-09 14:51:31 -05:00
Saúl Ibarra Corretgé 4687c1f465 [RN] Add ability to skip the welcome page
Also expose this in the native SDKs.
2017-06-09 14:10:10 -05:00
Saúl Ibarra Corretgé 79d51bc379 feat(App): remove obsolete config prop
It's obsolete now, since config is handled in Redux. Also add a "defaultUrl"
prop so emdedding applications can select what the default base URL is.
2017-06-09 14:10:10 -05:00
Saúl Ibarra Corretgé a075f24000 [RN] Add conference events to native SDKs
The current implementation doesn't use the API and Transport modules. This is
due to the fact that they are too tied to APP at the moment, which is web only.

Once API is refactored and moved into the Redux store this will be adjusted,
though it's unlikely that the lowest level React Native module (ExternalAPI)
changes drastically.

This commit also introduces a stopgap limitation of only allowing a single
instance for JitsiMeetView objects on both Android and iOS. React Native doesn't
really play well with having multiple instances of the same modules on the same
bridge, since they behave a bit like singletons. Even if we were to use multiple
bridges, some features depend on system-level global state, such as the
AVAudioSession mode or Android's immersive mode. Further attempts will be made
at lifting this limitation in the future, though.
2017-06-09 00:03:23 -05:00
Lyubo Marinov 4dc658c270 Fix 'Missing JSDoc comment  require-jsdoc' 2017-06-01 21:01:50 -05:00
Lyubo Marinov 320e67baa1 Fix the initialization of the (external) API
The counterpart of the external API in the Jitsi Meet Web app uses the
search URL param jwt to heuristically detect that the Web app is very
likely embedded (as an iframe) and, consequently, needs to forcefully
enable itself. It was looking at whether there was a JSON Web Token
(JWT) but that logic got broken when the JWT support was rewritten
because the check started happening before the search URL param jwt was
parsed.
2017-05-30 09:38:18 -05:00
Lyubo Marinov 2f3706bd37 [RN] Simplify
There were getDomain, setDomain, SET_DOMAIN, setRoomURL, SET_ROOM_URL
which together were repeating one and the same information and in the
case of the 'room URL' abstraction was not 100% accurate because it
would exist even when there was no room. Replace them all with a
'location URL' abstraction which exists with or without a room.

Then the 'room URL' abstraction was not used in (mobile) feature
share-room. Use the 'location URL' there now.

Finally, removes source code duplication in supporting the Web
application context root.
2017-05-09 16:31:21 -05:00
hristoterezov d91340166d Remote control - display the authorization dialog in meet (#1541)
* fix(react/participant): store display name in redux

* feat(remotecontrol): Add option to display the authorization dialog in meet

* feat(remotecontrol): Enable ESLint and Flow
2017-05-03 18:57:52 -05:00
Saúl Ibarra Corretgé 13e3375e8a [RN] Use proximity sensor when in audio-only mode
When the audio-only mode is enabled, turn on the proximity sensor to dim the
screen and disable touch controls when there is an object nearby.
2017-04-05 22:06:30 -05:00
yanas 3daae94bca Merge pull request #1379 from jitsi/base-react-dialogs-2
Password required dialog (web&native) and native room lock using basic react dialogs.
2017-04-03 10:52:33 -05:00
damencho 61470c0d24 Moves web password required dialog to react. 2017-03-30 14:21:05 -05:00
Lyubo Marinov 4e276471e5 Comply w/ coding style: consistency 2017-03-28 11:43:33 -05:00
Saúl Ibarra Corretgé c5eac63da1 [RN] Move all mobile only features to a subdirectory 2017-03-28 09:36:00 -05:00
Lyubo Marinov 23ddce122b Comply w/ coding style 2017-03-07 21:54:37 -06:00
hristoterezov 814bd26c07 feat(Avatar): Implement Avatar for web 2017-03-07 21:54:37 -06:00
Lyubo Marinov aef6e33c91 [RN] Fix remote JS debugging 2017-03-01 21:33:49 -06:00
Lyubo Marinov 18368fefaa Comply w/ coding style 2017-02-28 23:22:02 -06:00
damencho e3d4152e32 Adds react-i18next and its provider to react.
Adds translate function with default namespaces and options.
2017-02-28 13:13:47 -06:00
Saúl Ibarra Corretgé 5b6985fc5c [RN] Fix use of undefined APP
On RN we don't use the global APP object, so don't save the store there unless
it's defined, which is the case in the current web version. Also, check for
undefined explicitly, since a "if (!APP)" check will throw a ReferenceError.
2017-02-20 11:16:01 +01:00
hristoterezov 92d0589a37 ref(overlay): The overlays to use React 2017-02-18 17:03:50 -06:00
Lyubomir Marinov d93bd3eda7 [RN] Use a default host when only a room name is specified
The mobile app remembers the domain which hosted the last conference. If
the user specified a full URL first and specified a room name only the
second time, it was not obvious that the second conference would be
hosted on the domain of the first conference.
2017-02-18 10:04:08 -06:00
Lyubomir Marinov e29db31d91 Comply w/ coding style 2017-02-10 10:13:39 -06:00
Saúl Ibarra Corretgé 4519f26adf [RN] Mute local video when app is in the background 2017-02-10 00:44:37 -06:00
Lyubomir Marinov 8509efc8af Make the Web app aware of its context root 2017-02-07 08:27:23 -06:00
Saúl Ibarra Corretgé 7a8c84e990 [RN] Implement full screen mode while in a conference
The implementation varies across platforms, with the same goal: allow the app to
use the entire screen real state while in a conference.

On Android we use immersive mode, which  will hide the status and navigation bars.

https://developer.android.com/training/system-ui/immersive.html

On iOS the status bar is hidden, with a slide effect.
2017-02-06 13:51:17 -06:00
Lyubomir Marinov 366b2f1374 Simplify: Remove react/features/base/navigator 2017-01-28 19:56:35 -06:00
Lyubomir Marinov 49b3b49f3e Remove duplication
The files react/index.native.js and react/index.web.js ended up having
very similar source code related to initializing the Redux store. Remove
the duplication.

Additionally, I always wanted the App React Component to be consumed
without the need to provide a Redux store to it.
2017-01-26 17:24:11 -06:00
Lyubomir Marinov cbcee201f0 Comply w/ coding style 2017-01-26 07:58:46 -06:00
Ilya Daynatovich 2e81b8493e Introduce unsupported browser page 2017-01-26 07:27:31 -06:00
Lyubomir Marinov 62bafcaf63 Introduce Platform in React
React Native provides a Platform abstraction which React does not
provide.
2017-01-26 07:27:31 -06:00
Ilya Daynatovich 8248b14555 Integrate Mobile landing in the Redux app 2017-01-26 07:27:31 -06:00
Saúl Ibarra Corretgé 6c12681b9c [RN][iOS] Default to speaker for video conferences 2017-01-20 14:06:15 -06:00
Saúl Ibarra Corretgé acbfe5cb09 [RN] Keep device screen on while in a conference 2017-01-16 19:12:43 -06:00
Lyubomir Marinov ba3d65c01f Fix d17cc9fa
A bug was discovered in d17cc9fa which would raise a failure to push
into the browser's history if a base href was defined. Fix the failure
by removing react-router. Anyway, the usage of react-router was
incorrect because the app must hit the server infrastructure when it
enters a room because the server will choose the very app version then.
2017-01-15 18:28:02 -06:00
Lyubomir Marinov 856732abab Preserve URLs 2017-01-15 17:46:34 -06:00
Lyubomir Marinov 5f21e4c5b6 Introduce Platform in React
React Native provides Platform.
2017-01-15 12:09:52 -06:00
Lyubomir Marinov 0912dbf130 Remove duplication, simplify, comply with coding style 2017-01-12 10:37:01 -06:00
Lyubomir Marinov 2f01746c55 Remove duplication, simplify, comply with coding style 2017-01-10 13:06:18 -06:00
Lyubomir Marinov b67994235e Merge branch 'BeatC-moving-conference-init-to-react-1' of https://github.com/BeatC/jitsi-meet into BeatC-BeatC-moving-conference-init-to-react-1 2017-01-09 07:44:02 -06:00
Lyubomir Marinov 4fef8a3b79 [RN] Prevent unhandled JS errors from killing the process in Release 2017-01-05 15:06:41 -06:00
Ilya Daynatovich f53fb3d814 Introduced new actions and functions for app initialization 2017-01-04 17:46:47 +02:00
Ilya Daynatovich e716c1738c Fix lint errs 2017-01-04 17:46:47 +02:00
Ilya Daynatovich 3190bfa058 Move redundant code from app.js 2017-01-04 17:45:52 +02:00
Ilya Daynatovich c570b80d7b moved app initialization to react app 2017-01-04 17:45:52 +02:00
Lyubomir Marinov 0db33bb45c React propTypes as static class properties 2016-11-30 19:53:40 -06:00
Ilya Daynatovich c3428e8213 Split React components out of index.html 2016-11-24 02:21:02 -06:00
Lyubomir Marinov 7f3ff13c18 Merge jitsi-meet-react's mobile support
As a step toward merging jitsi-meet-react with jitsi-meet to share as
much source code as possible between mobile and Web, merge the part of
jitsi-meet-react's source tree which supports mobile inside the
jitsi-meet source tree and leave jitsi-meet-react's Web support in the
source code revision history but don't have it in master anymore because
it's different from jitsi-meet's Web support. In other words, the two
projects are mechanically merged at the file level and don't really
share source code between mobile and Web.
2016-10-12 10:31:52 -05:00
Lyubomir Marinov d55e0f70d9 Import jitsi/jitsi-meet-react#2f23d98
As an intermediate step on the path to merging jitsi-meet and
jitsi-meet-react, import the whole source code of jitsi-meet-react as it
stands at
2f23d98424
i.e. the lastest master at the time of this import. No modifications are
applied to the imported source code in order to preserve a complete
snapshot of it in the repository of jitsi-meet and, thus, facilitate
comparison later on. Consequently, the source code of jitsi-meet and/or
jitsi-meet-react may not work. For example, jitsi-meet's jshint may be
unable to parse jitsi-meet-react's source code.
2016-10-12 10:31:52 -05:00