Commit Graph

625 Commits

Author SHA1 Message Date
Lyubo Marinov 41c6759a23 Coding style 2017-09-26 23:39:30 -05:00
Saúl Ibarra Corretgé f62288ae17 feat(conference): add helper function to check for audio-only muted status 2017-09-26 23:39:30 -05:00
Leonard Kim eae3bead87 fix(toolbar): fix proptype warning
The implementation of ToolbarButtonWithDialog expects a
constructor function for now, not the object returned
from calling a constructor function.
2017-09-26 11:56:43 -05:00
virtuacoplenny 483e2ee202 feat(connection-indicator): implement automatic hiding on good connection (#2009)
* ref(connection-stats): use PropTypes package

* feat(connection-stats): display a summary of the connection quality

* feat(connection-indicator): show empty bars for interrupted connection

* feat(connection-indicator): change background color based on status

* feat(connection-indicator): implement automatic hiding on good connection

* fix(connection-indicator): explicitly set font size

Currently non-react code will set an icon size on ConnectionIndicator.
This doesn't work on initial call join in vertical filmstrip after
some changes to support hiding the indicator. The chosen fix is
passing in the icon size to mirror what would happe with full
filmstrip reactification.

* ref(connection-stats): rename statuses

* feat(connection-indicator): make hiding behavior configurable

The original implementation made the auto hiding of the indicator
configured in interfaceConfig.

* fix(connection-indicator): readd class expected by torture tests

* fix(connection-indicator): change connection quality display styling

Bold the connection summary in the stats popover so it stands out.
Change the summaries so there are only three--strong, nonoptimal,
poor.

* fix(connection-indicator): gray background on lost connection

* feat(icons): add new gsm bars icon

* feat(connection-indicator): use new 3-bar icon

* ref(icons): remove icon-connection and icon-connection-lost

Both have been replaced by icon-gsm-bars so they are not
being referenced anymore. Mobile looks to have connect-lost
as a separate icon in font-icons/jitsi.json.
2017-09-26 11:55:09 -05:00
Lyubo Marinov e08d240a89 [RN] Render bold text in WaitForOwnerDialog 2017-09-25 14:42:15 -05:00
Lyubo Marinov f9f194d6fe Coding style 2017-09-25 12:46:22 -05:00
Lyubo Marinov cfd6209a20 [Android] Work around fetch-induced app breakage 2017-09-25 12:46:22 -05:00
Lyubo Marinov 03d337612b [Android] Hardware back in Conference and Dialog 2017-09-25 12:33:35 -05:00
Leonard Kim 46b75e5178 ref(info): new component for showing meeting info 2017-09-25 08:42:00 -05:00
Lyubo Marinov 266d8f72c5 [RN] Reduce authentication actions 2017-09-25 00:23:15 -05:00
paweldomas 9ae26a087e feat(auth): add UPGRADE_ROLE_LOGIN_OK action 2017-09-25 00:09:25 -05:00
hristoterezov 66da77bcf5 fix(profile_button): unclickable 2017-09-24 21:50:30 -05:00
Lyubo Marinov 70de9a683f [RN] Prepare for LoadingIndicator in LoginDialog 2017-09-24 17:25:58 -05:00
Lyubo Marinov 4e0761a46a CONNECTION_FAILED error as object
Gradually, we exploded the error of CONNECTION_FAILED in multiple
redux state properties. The explosion makes maintenance harder because
the properties have to be updated in sync. Collect them in an object
resembling an Error instance.
2017-09-24 16:51:43 -05:00
paweldomas f8b607e92e fix(LoginDialog.native): no 'password incorrect' initially
Do not show the 'Password is incorrect' message when the LoginDialog
opens for the first time.
2017-09-24 14:25:03 -05:00
hristoterezov c5436428e5 fix(videoquality_label): tooltip text for audio only mode 2017-09-22 17:18:14 -05:00
paweldomas 628dc99bfe fix(conference/reducer): clear 'authRequired' on connection will connect
It is required to clear the flag, before the connection attempt.
Otherwise the app may confuse deployments without guest access with
a one with guess access if it was visited previously and
the WaitForOwnerDialog was canceled. That's because there will be no
conference related event that clears the flag.
2017-09-22 16:47:59 -05:00
Lyubo Marinov a12984ed6f [RN] Power to Dialog
* Implement disabling buttons (like Web had the ability).
* Use consistent colors (e.g. for the buttons) like the rest of the app
  (e.g. WelcomePage).
* Enable AbstractDialog to await a thenable from onSubmit and Dialog to
  render a LoadingIndicator in place of the OK/submit button text.
2017-09-22 15:09:15 -05:00
Lyubo Marinov 1ea62215f6 [RN] Increase contrast and consistency in LoadingIndicator use cases 2017-09-22 15:07:06 -05:00
Lyubo Marinov 6fb5c4bc29 Fix jsdocs 2017-09-22 15:01:51 -05:00
paweldomas b5212bb6cd fix(WaitForOwnerDialog): undefined method and reg expr 2017-09-22 09:29:17 -05:00
Saúl Ibarra Corretgé 720ae18194 [RN] LoadingIndicator while joining a conference 2017-09-21 16:15:14 -05:00
Paweł Domas e553e61f04 feat(AddPeopleDialog): invite rooms (#2001)
* feat(AddPeopleDialog): invite rooms

Distinguish between 'user' and 'videosipgw' search result items and
invite them with using different method.

* squash: fix typo in AddPeopleDialog.web.js
2017-09-21 13:24:56 -07:00
Saúl Ibarra Corretgé ca13a9b914 [RN] LoadingIndicator on WelcomePage
It will replace the "Join" text button while appNavigate lasts.

Note about the implementation: when appNavigate completes the component
may have been unmounted and thus we cannot touch its state. In order to
avoid this problem I added a 'mounted' instance variable which gets set
and reset in componentWillMount / Unmount respectively. This is to avoid
using isMounted, which is highly discouraged.
2017-09-20 16:01:49 -05:00
Saúl Ibarra Corretgé 35da39becf [RN] NetworkActivityIndicator
The basic indicator is extracted into a LoadingIndicator component,
which then NetworkActivityIndicator displays (or not) based on network
activity.
2017-09-20 15:59:56 -05:00
Lyubo Marinov 6a1eff917c Adds os and version to react-native userAgent. 2017-09-20 10:05:07 -05:00
damencho 6d62e91ff1 Adds os and version to react-native userAgent. 2017-09-20 09:08:21 -05:00
Lyubo Marinov 241dc3b147 [RN] Support XMPP authentication 2017-09-19 23:04:45 -05:00
paweldomas 141acea194 [RN] Support XMPP authentication 2017-09-19 14:38:45 -05:00
paweldomas 80329e8ffe [RN] CONFERENCE_FAILED error message in redux
In order to support XMPP authentication, we'll need the message
accompanying the error and carried by lib-jitsi-meet's
CONFERENCE_FAILED in the redux store. We already carry the message in
the redux action and we've got the error in the redux store.
2017-09-19 14:37:09 -05:00
paweldomas 9621ba03f3 feat(overlay): Clear redux state on CONNECTION_WILL_CONNECT 2017-09-19 14:36:31 -05:00
Lyubo Marinov 9c47a7e972 Add Dialog utilities
In order to accommodate the requirements of the work on supporting XMPP
authentication on mobile/react-native, make dealing with Dialog a
little more generic and a little easier.
2017-09-18 16:00:00 -05:00
Leonard Kim f3783efc48 squash: remove unused prop, update comment 2017-09-18 13:22:15 -05:00
Leonard Kim 1e84f993b4 fix(device-selection): use non-connect video preview
Filmstrip only mode displays a device selection dialog that
does not have access to the redux/connect. However, the current
VideoTrack extends from AbstractVideoTrack, which assumes a
redux connection. The fix is to move video display logic into
a separate component and have device selection use that, while
the existing VideoTrack remains connected to redux but
uses the new video display component.
2017-09-18 13:22:15 -05:00
Lyubo Marinov 03b4a32dd7 Coding style 2017-09-18 11:21:45 -05:00
paweldomas 70fc727b92 [RN] Prevent a possible TypeError 2017-09-18 09:48:53 -05:00
Lyubo Marinov d0476991a6 [RN] Support children in Dialog 2017-09-18 02:12:27 -05:00
Leonard Kim 4b2795502c fix(contact-list): call getAvatarURL directly
Instead of going through the Avatar object, call the getAvatarURL
directly so that the code flows consistently use the participant
representation within redux.
2017-09-11 11:33:22 -05:00
Lyubo Marinov 5e6cea63fb [RN] Polyfill sessionStorage via Storage 2017-09-07 12:49:35 -05:00
Lyubo Marinov 0d3927fed1 Coding style 2017-09-07 12:49:35 -05:00
Lyubo Marinov 9049f52402 [RN] Allow share-room ToolbarButton to not be rendered 2017-09-07 12:49:35 -05:00
Lyubo Marinov c2ae7999ef Coding style
In certain scenarios we do need to import files instead of features but
even then it is our coding style to not write the file extension.
2017-09-07 12:49:35 -05:00
Leonard Kim 5a50932174 fix(contact-list): fix typo in empty file name 2017-09-07 10:54:22 -05:00
Lyubo Marinov 15ab7a292c Reduce the dependencies of the Web ExternalAPI
We broke external_api.min.js by importing react/features/util which
imported react/features/base/lib-jitsi-meet.

1. To reduce the risks of such a breakage until we add
   external_api.min.js to the torture tests, import as little as
   possible in modules/API/external/external_api.js.
2. Use the global JitsiMeetJS on Web in react/features/base/util.
2017-09-06 23:20:04 -05:00
Lyubo Marinov fce0e4c22c [RN] Report loadConfigError with locationURL to the SDK consumers 2017-09-06 20:34:46 -05:00
Saúl Ibarra Corretgé 284e4e543e [RN] Detect errors when loading the configuration
The error is stored in the redux store in base/config so other components can
consult it. It is also broadcasted as a new event in the external API for the
SDK.
2017-09-06 16:31:14 -05:00
Lyubo Marinov d818436645 [RN] Fix import breakage caused by Web 2017-09-06 14:39:34 -05:00
Leonard Kim 31729d7949 feat(contact-list): convert to react
- Remove references to the model ContactList.
- Replace ContactListView with an empty element for attaching
  the React Component ContactListPanel, which has the same
  features as the old ContactListView.
- Create new selector for getting non-fake participants for
  ContactListPanel's props.
- Create a ParticipantCounter component to place in the contact
  list button. Previously ContactListView updated that but now
  it's a react component hooked into the participant state.
- Remove pub/sub that was used only by ContactListView.
2017-09-06 12:11:33 -05:00
Lyubo Marinov ed53f54628 [RN] Fix the visibility of the local video on the WelcomePage 2017-09-06 08:22:39 -05:00
Saúl Ibarra Corretgé 9833965a27 [RN] Extract a function 2017-09-05 22:49:22 -05:00
Lyubo Marinov 8cdd73b987 [RN] Reverts to own properties for Storage 2017-09-05 18:55:54 -05:00
Lyubo Marinov a7ee632f43 [RN] LocalVideoTrackUnderlay
Implement a React Component which displays children as an overlay of
local video. The WelcomePage implemented such a component inside of it
among other WelcomePage-specific logic so I split
LocalVideoTrackUnderlay out of it. The new Component is used on the
BlankPage which may be displayed in the future not only when the
WelcomePage is disabled but also when there are long running network
requests, for example.
2017-09-05 17:45:20 -05:00
Lyubo Marinov b304ad5808 [RN] Weaken the coupling between WelcomePage and AbstractWelcomePage 2017-09-05 16:27:12 -05:00
Lyubo Marinov 86e4876df2 Coding style 2017-09-05 15:56:59 -05:00
Saúl Ibarra Corretgé 034518a6a0 [RN] Cache configurations in localStorage
This only helps iff there is a short transient network error which prevents the
configuration from being loaded. In such case, use the cached version in
localStorage, which may not match the shard, but it's (probably!) better than
nothing.

In case there is no Internet connectivity, an error will be produced as soon as
the XMPP connection is attempted anyway.
2017-09-05 14:58:26 -05:00
Lyubo Marinov bf523711df [RN] Prepare to polyfill sessionStorage 2017-09-05 13:56:33 -05:00
Saúl Ibarra Corretgé bfeaf329e1 [RN] Add polyfill for localStorage
It's built on top of React Native's AsyncStorage. They have differing APIs, so
we implement a synchronous API on top of an asynchronous one. This is done by
being optimistic and hoping that operations will happen asynchronously. If one
such operation fails, the error is ignored and life goes on, since operations
are performed in the in-memory cache first.

Note to reviewers: LocalStorage.js lacks Flow annotations because indexable
class declarations are not yet supported:
https://github.com/facebook/flow/issues/1323 and yours truly couldn't find a way
to make the required syntax work without making it unnecessarily complex.
2017-09-05 10:42:42 -05:00
Saúl Ibarra Corretgé 8fc095039e analytics: lower log severity when we fail to create a handler
It'snot the end of the world, we can move on.
2017-09-05 10:48:57 +02:00
Saúl Ibarra Corretgé eca04de348 Simplified code 2017-09-04 11:35:09 +02:00
Saúl Ibarra Corretgé 18d1572dab [RN] Load config.js only when the room is known
This patch loads the config later than we used to, that is, only once we
know the room the user is about to join.

Due to architectural limitations in lib-jitsi-meet, it needs to be
initialized with a configuration in order to properly function. This is
unfortunate because we need to create a video track in the welcome page,
but don't know the room (hence no config) yet. In order to circumvent
this problem an empty configuration is used, which is later swapped with
the appropriate one, once loaded.

Some interesting side-effects of this change are a perceived speed
increase when the app starts or a conference is hangup. They are both
due to the fact that no config needs to be fetched from a remote server
in those cases.
2017-09-02 13:26:07 -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 ec9c05e401 [RN] Load config.js with ?room=
In order to load the configuration from the shard that will actually
host the conference, it's imperative that we add the room= query
parameter:

https://meet.jit.si/config.js?room=example

This implies a departure from our current model, where the config is
discarded if the domain for the next conference is different, but kept
otherwise.
2017-09-01 23:55:25 -05:00
virtuacoplenny bf03e73876 feat(filmstrip): show thumbnails with toolbar and on hover (#1944)
* feat(filmstrip): show thumbnails with toolbar and on hover

* squash: reduce verbosity of logic for when to display

* squash: remove check for fake participant

Before fake participant (youtube video) would make the filmstrip
always displayed. However, youtube videos already dock the
toolbar, so filmstrip will remain displayed, so the check is
redundant.

* squash: change mouse hover listener targets
2017-09-01 16:40:05 -05:00
Дамян Минков 6682543691 Moves analytics loading to react. (#1945)
* feat(analytics): move to React

The analytics handlers have been moved to JitsiMeetGlobalNS, so now they are
stored in `window.JitsiMeetJS.app.analyticsHandlers`.

The analytics handlers are re-downloaded and re-initialized on every
lib-jitsi-meet initialization, which happens every time the config is changed
(moving between deployments in the mobile app).

* Adds legacy support for old analytics location.
2017-09-01 14:14:03 -05:00
Lyubo Marinov 8436f23e05 Comments 2017-08-31 19:31:46 -05:00
hristoterezov cd3dad956b fix(peopleSearch): queryTypes are defined in config.js 2017-08-31 15:04:29 -05:00
Saúl Ibarra Corretgé 328da08b3a [RN] Remove obsolete comment
We have already made the implicit decision not to pursue what the
comment describes. If we ever revisit it, it probably won't be handled
where the comment is anyway.
2017-08-31 11:50:18 -05:00
Leonard Kim 05f8c69fe6 ref(toolbar): add wrapper around buttons for torture tests
The torture tests were looking for the anchor tag within each
button. However, that anchor could get blown away from a react
re-render. So instead, expose a way for the torture tests
to find the root node of the button.
2017-08-30 11:31:15 -05:00
Leonard Kim 7063f144ef feat(tooltips): add for video quality label and feedback button 2017-08-30 11:10:28 -05:00
Leonard Kim 5e4f921e1b ref(video-quality-label): do not show quality dialog 2017-08-30 11:10:28 -05:00
Lyubo Marinov 7f8e8177d0 [RN] Refactor "Keep track of ongoing network requests" and "Show a progress indicator in the BlankPage"
I'm not saying that the two commits in question were wrong or worse than
what I'm offering. Anyway, I think what I'm offering brings:

* Compliance with expectations i.e. the middleware doesn't compute the
next state from the current state, the reducer does;

* Clarity and/or simplicity i.e. there's no global variable (reqIndex),
there's no need for the term "index" (a.k.a "reqIndex") in the redux
store.

* By renaming net-interceptor to network-activity feels like it's
preparing the feature to implement a NetworkActivityIndicator React
Component which will take on more of the knowledge about the specifics
of what is the network activity redux state exactly, is it maintained by
interception or some other mechanism, and abstracts it in the feature
itself allowing outsiders to merely render a React Component.
2017-08-29 18:54:04 -05:00
Saúl Ibarra Corretgé e33030582f [RN] Show a progress indicator in the BlankPage
It will only be shown when there are ongoing network requests.
2017-08-29 18:54:04 -05:00
Saúl Ibarra Corretgé d669a6c73c [RN] Keep track of ongoing network requests
Works only for XHR requests, which is the only network request mobile performs
(WebRTC traffic aside). The fetch API is implemented on top of XHR, so that's
covered too.

Requests are kept in the redux store until they complete, at which point they
are removed.
2017-08-29 18:54:04 -05:00
Saúl Ibarra Corretgé 8eebfcad72 [RN] Add support for callstats on mobile
The global.performance.now polyfill is removed since it's polyfilled by
react-native-callstats.
2017-08-29 18:47:35 -05:00
virtuacoplenny ef1b8fdb77 ref(1-on-1): move remote video visibility to a selector (#1922)
* ref(1-on-1): move remote visibility to a selector

Derive whether or not remote videos should display using a selector
to look across different states. A selector was chosen over using
memoized selectors (reselect) or subscribers as a first step
approach, avoiding additional mutations caused by a subscriber
updating the filmstrip state and avoiding additional api overhead
introduced by reselect.

* rename selector
2017-08-29 10:08:16 -05:00
Saúl Ibarra Corretgé c0f648b1ab [RN] Remove no longer needed fetch API fallback 2017-08-29 10:30:09 +01:00
Saúl Ibarra Corretgé 531b638a8a [RN] Switch default avatars to meeples 2017-08-29 09:27:28 +01:00
bbaldino f616b0b71b few tweaks to fix some exceptions in edge 2017-08-28 21:52:52 +00:00
hristoterezov 70422f4a47 fix(alwaysontop): change the size of the toolbar 2017-08-28 14:52:31 -05:00
virtuacoplenny 735a596afe ref(recording): convert recording label to react (#1915)
* ref(recording): convert recording label to react

- Create a RecordingLabel component for displaying the current
  recording state, as reflected in the redux store. This is
  needed for 1-on-1 mode to be completely in redux.
- Update the store with the recording state so RecordingLabel
  can update itself.
- Remove previous logic for updating the non-react label, which
  includes event emitting for filmstrip visibility changes,
  as RecordingLabel is hooked into redux updates.

* ref(recording): use status and type constants from lib

* make label really dumb, move logic back to Recording
2017-08-25 11:45:30 -05:00
Leonard Kim 85f0ad2791 feat(popover): create a wrapper around InlineDialog 2017-08-24 22:00:14 -05:00
Leonard Kim fdee6dc360 fix(inline-dialog): reimplement popover display on mouse move
Create empty elements within InlineDialog content that can be
used to bridge mouse movement from the InlineDialog trigger to
the InlineDialog content. The empty elements are positioned
absolute so they can break out of the InlineDialog container
and not affect popper's position calculations.
2017-08-24 22:00:14 -05:00
Lyubo Marinov 24db52ef0f [RN] Remove denied permission alert from WelcomePage 2017-08-22 16:38:14 -05:00
Lyubo Marinov 0b8c12de0e Simplify route navigation
I see it as the first step in simplifying the route navigate of the
JavaScript app by removing BlankWelcomePage from _getRouteToRender. From
a faraway point of view, the app is at the route at which it is not in a
conference. Historically, the route was known as the Welcome page. But
mobile complicated the route by saying that actually it may not want to
see the room name input and join button.

Additionally, I renamed BlankWelcomePage to BlankPage because I don't
think of it as a WelcomePage alternative but rather as a more generic
BlankPage which may be utilized elsewhere in the future.

I plan for the next steps to:
* Merge Entryway, _interceptComponent, and _getRouteToRender in one
React Component rendered by AbstractApp so that the whole logic is in
one file;
* Get rid of RouteRegistry and routes.
2017-08-22 16:38:14 -05:00
Lyubo Marinov cb5b93fb6e Switch to prop-types 2017-08-22 16:38:14 -05:00
Lyubo Marinov 7114614697 Remove obsolete workaround 2017-08-22 16:38:14 -05:00
Leonard Kim ec22329408 ref(local-video): generate html instead of hardcoding in filmstrip
This would better mimic React behavior where each component has
its own markup, instead of relying on markup existing elsewhere.
2017-08-22 10:27:34 -05:00
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
Saúl Ibarra Corretgé 9bca0e3b3d [RN] Create tracks right when they are required
When do we need tracks?

- Welcome page (only the video track)
- Conference (depends if starting with audio / video muted is requested)

When do we need to destroy the tracks?

- When we are not in a conference and there is no welcome page

In order to accommodate all the above use cases, a new component is introduced:
BlankWelcomePage. Its purpose is to take the place of the welcome page when it
is disabled. When this component is mounted local tracks are destroyed.

Analogously, a video track is created when the (real) welcome page is created,
and all the desired tracks are created then the Conference component is created.
What are desired tracks? These are the tracks we'd like to use for the
conference that is about to happen. By default both audio and video are desired.
It's possible, however, the user requested to start the call with no
video/audio, in which case it's muted in base/media and a track is not created.

The first time the app starts (with the welcome page) it will request permission
for video only, since there is no need for audio in the welcome page. Later,
when a conference is joined permission for audio will be requested when an audio
track is to be created. The audio track is not destroyed when the conference
ends. Yours truly thinks this is not needed since it's a stopped track which is
not using system resources.
2017-08-22 07:28:19 -05:00
Saúl Ibarra Corretgé 3102ea6818 [RN] Try to create local tracks when unmuting, if track is missing
This is only desired when the unmuting action took place due to a manual user
intervention or the audio-only mode being disengaged.
2017-08-22 07:28:19 -05:00
Leonard Kim 28b4595561 ref(tooltips): remove old tooltips 2017-08-21 15:16:09 -05:00
Leonard Kim e3361e2f3b feat(tooltips): convert popup tooltips to InlineDialog 2017-08-21 15:16:09 -05:00
Leonard Kim c3a4a38414 feat(toolbar): use AtlasKit tooltip 2017-08-21 15:16:09 -05:00
Leonard Kim 38e2443ab7 feat(small-video): use AtlasKit tooltip 2017-08-21 15:16:09 -05:00
Saúl Ibarra Corretgé c42f1704ff [RN] Rename createInitialLocalTracks to createLocalTracks
The name better suits its purpose, since it can be called at any time.
2017-08-21 08:15:55 -05:00
Leonard Kim 5358f022ff fix(config): override config values instead of merging
Iterate over objects and copy over primitives and arrays
instead of using _.merge, as merge will not replace a config
entry completely. For arrays in a target object, the arrays
will have its indices replaced. This means if a source array
is empty, the target array will be left alone. Similarly,
if the target array is longer than a source array, there
will be indices not touched in the target array.
2017-08-21 07:07:18 -05:00
hristoterezov 5ef914602f fix(remotecontrol): Handle screen sharing cancel 2017-08-21 10:41:24 +01:00
Lyubo Marinov 2818520c8f [RN] Make react-native-img-cache optional at bundle time 2017-08-18 14:54:25 -05:00
Lyubo Marinov 131e5af01e [RN] Fix a strange import of a feature by itself 2017-08-18 14:52:41 -05:00