Commit Graph

625 Commits

Author SHA1 Message Date
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
Lyubo Marinov 90e7804834 Coding style 2017-08-18 14:47:15 -05:00
Lyubo Marinov c0de88ba8c [RN] Remove unnecessary import 2017-08-18 14:45:00 -05:00
Paweł Domas 99ce46cfa8 feat(conference, toolbox, API) get rid of {audio,video}Muted' flags
* ref: video muted state

Get rid of 'videoMuted' flag in conference.js

* ref: audio muted state

Get rid of 'audioMuted' flag in conference.js

* fix(conference.js|API): early audio/video muted updates

* ref(conference.js): rename isVideoMuted

Rename isVideoMuted to isLocalVideoMuted to be consistent with
isLocalAudioMuted.

* doc|style(conference.js): comments and space after if

* ref: move 'setTrackMuted' to functions

* fix(tracks/middleware): no-lonely-if

* ref(features/toolbox): get rid of last argument

* ref(defaultToolbarButtons): rename var
2017-08-18 13:30:30 +02:00
Leonard Kim 27deb97c5c ref(filmstrip): hook filmstrip to redux for 1-on-1 mode
- Remove non-redux paths for hiding and showing remote videos.
- Hook web filmstrip to redux to know when to hide remote videos.
  This works, even though VideoLayout is handling RemoteVideo
  appending, because react is only monitoring filmstrip's declared
  JSX which does not change except for attributes (css classes).
2017-08-17 17:27:30 -05:00
hristoterezov 378a8d014e feat(remotecontrol): Prevent multiple remote control sessions (#1875) 2017-08-17 09:43:22 -07:00
Lyubo Marinov c1fbbc4571 Reduce duplication 2017-08-16 16:28:39 -05:00
yanas 3d397a28e6 Updates default avatar image 2017-08-16 14:42:41 -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
virtuacoplenny 3e3577766d fix(quality-slider): prevent resizing by making p2p warning hidden (#1890)
* fix(quality-slider): prevent resizing by making p2p warning hidden

Instead of removing and appending the p2p warning, make it always
appended but toggle visibility so it always takes up space. This
should prevent resizing when the warning appears. Margin and
padding were adjusted to account for the empty space displayed
by a hidden p2p warning.

* let vertical size change
2017-08-15 15:22:32 -05:00
virtuacoplenny 1b7973a28e ref(invite): use AtlasKit for invite modal buttons and inputs (#1868)
* ref(invite): use AtlasKit for invite modal buttons and inputs

- Convert button to AK Button.
- Convert inputs to AK FieldText.

* remove noop, replace with custom empty func
2017-08-15 14:30:57 -05:00
Leonard Kim 830ec3d097 fix(video-quality): change click handler location on label
This will prevent the quality dialog from closing when changing
desired quality level.
2017-08-14 15:13:29 -05:00
virtuacoplenny 725d39ddcd feat(jitsipopover): convert to InlineDialog (#1804)
* feat(small-video): use InlineDialog for stats and remote menu

- Remove JitsiPopover and use InlineDialog instead.
- Bring the remote menu icon into react.
- Make vertical filmstrip position:fixed so popper (AtlasKit
  dependency) sets InlineDialogs and eventually tooltips to
  position:fixed.

* ref(remote-menu): hook KickButton to redux

* ref(remote-menu): hook MuteButton to redux

* modify padding, toggle dialogs

* pixel push margins to align dialogs, adjust padding of dialogs

* add comment about margin for dialog, add file I forgot

* modify indicator markup so the icon can be moved down while trigger stays at top of toolbar
2017-08-14 10:02:58 -05:00
Saúl Ibarra Corretgé 2e3a5b1c35 [RN] Fix jsdocs 2017-08-14 12:23:46 +02:00
hristoterezov 1782030936 feat(alwaysontop): Toolbar. 2017-08-11 17:07:24 -07:00
hristoterezov b81dc4e59b ref(toolbar): Implement stateless toolbar 2017-08-11 17:07:24 -07:00
hristoterezov 53f675fbe0 ref(ToolbarButton): Remove unnecessary check. 2017-08-11 17:07:24 -07:00
hristoterezov f18b42b286 fix(ToolbarButton): Don't register shortcut if APP is not defined. 2017-08-11 17:07:24 -07:00
hristoterezov 91e75bf7b9 ref(UIUtil): Move all tooltip functions into another file 2017-08-11 17:07:24 -07:00
hristoterezov fe59084979 ref(isButtonEnable): UIUtil -> toolbox 2017-08-11 17:07:24 -07:00
hristoterezov 025f7204d5 ref(ToolbarButton): Remove dispatch 2017-08-11 17:07:24 -07:00
Leonard Kim d7bccd0c93 ref(pinning): remove pinnedId state from VideoLayout
Instead have VideoLayout reach into redux.
2017-08-11 10:43:35 +01:00
Leonard Kim f1f46e0af5 feat(pinning): move web pinning logic into redux
- Re-use the native redux pinning implementation for web
- Remove pinning logic from conference.js
- To the native pinning add a check for sharedVideo so
  youtube videos do not send a pin event
- Add shared videos as a participant to enable pinning and
  so they can eventually get added to the filmstrip
- Emit UIEvents.PINNED_ENDPOINT from middleware
2017-08-11 10:43:35 +01:00
virtuacoplenny d8cd3e75b4 feat(quality-slider): initial implementation (#1817)
* feat(quality-slider): initial implementation

- Add new menu button with an Inline Dialog slider for
  selecting received video quality.
- Place P2P status in redux store for the Inline Dialog
  to display a warning about not respecting video quality
  selection.
- Respond to data channel open events by setting receive
  video quality. This is for lonely call cases where a
  setting is set before the data channel is open.
- Remove dropdown menu from video status label and clean
  up related js and css.

* first pass at addressing feedback

- Move VideoStatusLabel to video-quality directory.
- Rename VideoStatusLabel to VideoQualityLabel.
- Open VideoQualitydialog from VideoQualityLabel.
- New CSS for making VideoQualityLabel display properly.
- Do not render VideoQualityLabel in filmstrip only instead of hiding with css.
- Remove tooltip from VideoQualityLabel.
- Show LD, SD, HD labels in VideoQualityLabel.
- Remove action SET_LARGE_VIDEO_HD_STATUS from conference.
- Create new action UPDATE_KNOWN_LARGE_VIDEO_RESOLUTION in large-video.
- Move VideoQualityButton into video-quality directory.
- General renaming (medium -> standard, menu -> dialog).
- Render P2P message between title and slider.
- Add padding to slider for displacement caused by P2P message's new placement.
- Fix display issue with VideoQualityButton displaying out of line in the
  primary toolbar.

* second pass at addressing feedback

- Fix p2p inline message color
- Force labels to break on words
- Resolve rebase issues, including only dispatching quality
  update on change. Before there was double calling of dispatch
  produced by an IE11 workaround. This breaks now when setting
  audio only mode to true twice.
- Rename some instances of quality to definition

* rename to data channel opened

* do not show p2p in audio only

* stop toggle audio only icon automatically

* remove fixme about toolbar button

* find closest resolution for label

* toggle dialog on button click

* redo last commit for both button and label
2017-08-09 14:40:03 -05:00
Paweł Domas 194b3ac9d3 [RN] Add local tracks before joining the conference
* ref(base/conference): add tracks before join

Sometimes it will be suboptimal to add local tracks to the conference,
after the room has been joined. It may slow down the session initiation
process by having to send unnecessary 'source-add' notifications.

* squash: fix typos/comments
2017-08-08 09:27:44 -05:00
virtuacoplenny ff442853a2 feat(feedback): convert to react and redux (#1833)
* feat(feedback): convert to react and redux

- For styles, remove "aui-dialog2" nesting so existing styles
  can be reused.
- Remove Feedback.js and replace with calls to redux for state
  storing and accessing.
- Add dispatching to FeedbackButton instead of relying on jquery
  clicking handling so the button can be hooked into redux.

* address feedback

* remove calling to not show feedback for recorder and filmstrip
2017-08-07 11:20:44 -05:00
Lyubo Marinov 85a168d51b [RN] base/media is intent, base/tracks is reality 2017-08-04 16:07:48 -05:00
Saúl Ibarra Corretgé d600504d85 [RN] Refactor video muting
Simplify the code by using a bitfied instead of a couple of boolean flags. This
allows us to mute the video from multiple places and only make the unmute
effective once they have all unmuted.

Alas, this cannot be applied to the web without a massive refactor, because it
uses the track muted state as the source of truth instead of the media state.
2017-08-04 16:07:48 -05:00
Saúl Ibarra Corretgé d200abb8db [RN] Polyfill window.location.search
Currently lib-jitsi-meet looks there in case the `anonymousdomain` config option
was specified.

While this commit alone doesn't add support for authenticated deployments, it
avoids a failure if `anonymousdomain` was set, regardless of authentication being
turned on or not.

Fixes: https://github.com/jitsi/jitsi-meet/issues/1858
2017-08-04 11:35:03 -05:00
Leonard Kim 002e48b886 feat(display-name): convert prompt to react
Create a new component that uses Dialog. Reuse existing actions
for updating a participant's display name.
2017-08-04 10:21:18 -05:00
Lyubo Marinov 0836f2cefd [RN] Prefetch remote avatar images 2/2 2017-08-03 13:45:41 -05:00
Lyubo Marinov 97832e0eef [RN] Prefetch remote avatar images 1/2 2017-08-03 13:45:41 -05:00
Lyubo Marinov 00e058d392 [RN] Cache avatars and provide a default in case load fails (2)
Refactors the previous "[RN] Cache avatars and provide a default in
case load fails" for the purposes of simplification but also modifies
its functionality at the same time. For example:

- Always displays the default avatar immediately which may be seen if
  the remote avatar needs to be downloaded.
- Does not use random colors.
- Uses a default avatar image which is not transparent and ugly but at
  least it's the same image that's used on Web. I've started talks to
  have images/avatar2.png replaced with a transparent and beautiful
  so that will land later on and we'll see the automagic colors in all
  their glory then.
2017-08-03 13:45:41 -05:00
Lyubo Marinov 504646fff0 Coding style 2017-08-03 13:45:41 -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
Leonard Kim cd66a7fcb7 ref(notifications): bring hiding of notifications into redux 2017-08-02 11:19:38 -07:00
Leonard Kim 74ddae4a6a feat(device-errors): move device error dialogs to notifications
- Create a notification component for displaying a toggle.
- Create an action for showing the component if allowed by
  the local storage setting and for saving the setting to
  local storage.
- Remove all notifications having a timeout by default so the
  device error notification must be dismissed manually.
- Split the camera and mic error dialog into two separate
  notifications.
2017-08-01 16:33:00 -07:00
Lyubo Marinov c259551d9a [RN] Handle multiple schemes/protocol in URLs 2017-08-01 06:31:03 -05:00
Lyubo Marinov 377be4272a [RN] Fix the conference URL delivered to JitsiMeetView's listeners 2017-08-01 06:31:03 -05:00
Lyubo Marinov 737419dbe8 Do not require domain in SDK and ExternalAPI 2017-08-01 06:31:03 -05:00
Lyubo Marinov 1748049322 [RN] Remove unncessary characters from the invite URL 2017-08-01 06:31:03 -05:00
Lyubo Marinov caea02a322 [RN] Mitigate 'Not joining a new URL while in a conference' 2017-08-01 06:31:03 -05:00
virtuacoplenny c04ef05058 feat(presence): display status in thumbnail and large video (#1828)
* feat(presence): display status in thumbnail and large video

- Create a React Component for displaying presence. It currently
  connects to the store for participant updates but in the future
  should not be as smart once more reactification occurs.
- Modify filmstrip css so the presence status displays horizontal
  center and below the avatar.
- Modify videolayout css so the presence status displays horizontal
  centered and with a rounded background.
- Dispatch presence updates so the participant state can be update.
- Update message position on large video update to ensure message
  positioning is correct.

* squash: do not show presence message if connection message is displayed
2017-07-31 18:33:22 -05:00
Дамян Минков 82117a0aef Handles disabled dial-out codes. (#1847)
Hides the UI component showing dialout codes and uses the dial input without validating it.

Skips printing error when dial-in numbers is not configured.
2017-07-31 12:44:50 -07:00
Leonard Kim 9c6afc2062 fix(dial-out): appease FieldText warning for onChange prop 2017-07-31 13:21:49 -05:00
Lyubo Marinov dcc6ce025f Convert a function to an asynchronous redux action creator 2017-07-31 12:26:39 -05:00
paweldomas 40c9f583fa ref(tracks): remove duplication in mute/unmute 2017-07-31 12:26:39 -05:00
Leonard Kim 3e84d8b3b6 ref(dial-out): use AtlasKit FieldText for inputs
- Swap the telephone input with FieldText.
- Swap the dropdown trigger input with FieldText for styling
  consistency with the telephone input.
- Wrap the dropdown trigger so it can be modified with jitsi css.
- Use flexbox to have the trigger and input align horizontally
  but have the input take up width if the trigger is not displayed.
2017-07-31 11:44:56 -05:00
Saúl Ibarra Corretgé 0983ef48b5 [RN] Fix root component's prop types 2017-07-31 15:30:31 +02:00
virtuacoplenny da1c760abf feat(notifications): implement a react/redux notification system (#1786)
* feat(notifications): implement a react/redux notification system

* squash into impl explicit timeout, style

* ref(notifications): convert toastr notifications to use react

* ref(toastr): remove library

* squash into conversion: pass timeout

* squash into clean remove from debian patch
2017-07-28 12:56:49 -05:00
paweldomas 68f4a4ae9f ref: enable/disable microphone button
Make toolbar's microphone button enabled whenever there are any
'audioinput' devices available and allow to add audio during
the conference even if microphone permissions were denied on startup.
2017-07-28 12:06:42 -05:00
Saúl Ibarra Corretgé 03b043ca2b [Android] Destroy containes when they are not visible
Whatever I've tried so far ends up failing in really weird ways, so let's admit
defeat, for now. Destroy containers only on Android.

This shall be revisited when we update RN to version >= 0.43 and we have
"display: 'none'" available.
2017-07-28 10:25:46 -05:00
Saúl Ibarra Corretgé f1c9e57b43 [RN] startWithAudioMuted & startWithVideoMuted 2017-07-27 16:48:38 -05:00
Lyubo Marinov e542af28a2 [RN] Converge with Web's ExternalAPI a bit
Web's ExternalAPI accepts an object with properties as one of its
constructor arguments and from which it generated a URL. Mobile's
JitsiMeetView.loadURLObject is supposed to accept pretty much the same
object.
2017-07-27 16:48:38 -05:00
damencho 9778aabe98 Uses languages.json to obtain supported languages. 2017-07-27 16:36:22 -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 980d48e00b Fix typo 2017-07-26 10:40:05 -05:00
Lyubo Marinov 6c488cc613 [RN] Simplify hiding Container components 2017-07-25 13:58:45 -05:00
Saúl Ibarra Corretgé d3c408ae2e [RN] Simplify hiding Container components
When a Container is not visible there is no need for it to react to touch
events, thus avoid wrapping it in a touch component.

In addition, simplify the style needed for hiding the component. Moving the view
out of the window boundaries no longer works on RN 0.42 on iOS. Seting the size
to 0 works well on both platforms, but in the future (when we upgrade to RN >=
0.43) we should switch to display: none:
4d69f4b2d1
2017-07-25 13:58:44 -05:00
Saúl Ibarra Corretgé fa86d2ab9e Merge pull request #1815 from jitsi/fix_audio_only_off
fix(AudioOnly+web): crash when untoggle audio only
2017-07-25 14:05:09 +02:00
paweldomas 122a7f6346 fix(AudioOnly+web): crash when untoggle audio only
Because on web video track is stored both in redux and in 'localVideo'
field, video is attempted to be unmuted twice when turning off the audio
only mode. This will crash the app with 'unmute operation is already in
progress'. This commit will prevent from taking action from the web
world if the video track already exists and will make the redux side
rollback unmuted status in case unmute fails.
2017-07-25 11:05:02 +02:00
Lyubo Marinov 24eb37ae1e [RN] Fix jsdocs, formatting. Add flow 2017-07-24 16:08:46 -05:00
Saúl Ibarra Corretgé 2094b15432 [RN] Workaround for Android view clipping
In another installment of "how on earth?!", using a 1px border instead of a
0.2px border fixes view clipping on a device where it didn't work before
(Moto X Play).

Observations:

- When nothing was rendered, rotating the device made the buttons show up, this
  makes me think the Surface is not properly composited with the toolbar view
  for some reason. Why this happens in some devices and not in others remains a
  mistery.

Other approaches attempted:

- Setting View.collapsed to false so it will remain in the view hierarchy. It
  made no effect.

- Setting View.needsOffscreenAlphaCompositing to true. It made no effect.

Just like before, I came up with this workaround by accident, but couldn't find
another way, so here we go again.
2017-07-24 15:01:37 -05:00
Saúl Ibarra Corretgé 157eadc44a [RN] Don't destroy containers when they are not visible
This essentially reverts
023359b9d2

In the filmstrip we keep a container full of thumbnail views. Destroying these
every time we want we want to hide it is costly, as new renderers have to be
recreated, and they lack context, so there is an increased chance for "black
thumbnails".
2017-07-24 15:01:37 -05:00
Saúl Ibarra Corretgé 2525bb2805 Merge pull request #1802 from jitsi/start_in_audio_only
Start in audio only
2017-07-24 14:32:20 +02:00
Lyubo Marinov db88c555dc Fix warning 2017-07-21 17:40:09 -05:00
Lyubo Marinov 96e0c56bde [RN] Don't override config values 2017-07-21 17:40:09 -05:00
yanas b0ffe2e63f Remove primary toolbar splitter (#1811) 2017-07-21 14:21:39 -07:00
Leonard Kim 1897c395ec fix(icons): set a size prop for AtlasKit icons
With the upgarde of @atlaskit/icon to 7.0.0, the size prop
essentially became required to maintain its appearance in the
jitsi app, otherwise it'll unexpectedly try to take up the
available space and cause minor display issues.
2017-07-21 14:25:39 -05:00
paweldomas 6493b09565 feat: add config.startAudioOnly
When the 'startAudioOnly' config option is set to true the conference
will start in the audio only mode.
2017-07-21 15:03:28 +02:00
Leonard Kim 955542f4a5 feat(speaker-status): update speaker status in redux
The speakerStatus field already exists as part of the objects
in the participant reducer. When the library updates the
connection status of a user, plumb that update through to redux.
2017-07-21 14:12:15 +02:00
Leonard Kim 2132cd6736 fix stat unsub, one loop for updating 2017-07-19 15:11:35 -07:00
Leonard Kim 44bbd26c96 ref(stats): process stats through one pub/sub
Instead of passing stats through UI then VideoLayout then the
SmallVideo, pass stats directly to what uses it--ConnectionIndicator.
This also bypasses adding the stats to the store, as they do not
seem to be something that needs to be shared or stored app-wide
just yet.
2017-07-19 15:11:35 -07:00
Saúl Ibarra Corretgé 1d90826098 [RN] Use a more resilient way for testing if we are on React Native
navigator.product is read-only, so we don't run into the risk of it being
changed.
2017-07-19 16:40:06 -05:00
Lyubo Marinov 0b5431b795 [RN] Bind event handler once per instance, not per render 2017-07-19 16:33:57 -05:00
Lyubo Marinov e7fc4739c4 Fixes jsdocs 2017-07-19 16:25:06 -05:00
Saúl Ibarra Corretgé f72932d125 [RN] Fix audio / video mute buttons when permissions are not granted 2017-07-19 14:38:38 +02:00
Saúl Ibarra Corretgé ffc12ccc0e [RN] Disable camera switch button when video is muted 2017-07-19 14:30:36 +02:00
Saúl Ibarra Corretgé 03da40b56a [RN] Disable video mute and camera switch buttons when in audio only mode 2017-07-19 11:58:08 +02:00
Saúl Ibarra Corretgé 055df1c12e [RN] Add ability to disable a ToolbarButton 2017-07-19 11:50:24 +02:00
Lyubo Marinov d87b8823e9 [RN] Don't open the camera on startup when there is no welcome page 2017-07-18 23:42:08 -05:00
Saúl Ibarra Corretgé 8225600b61 [RN] Don't open the camera on startup when there is no welcome page
The end goal of this patch was to avoid opening the camera when there is no
welcome page.

In order to achieve this, the logic for creating the local tracks was
refactored:

Before this patch local tracks were created when lib-jitsi-meet was initialized,
and destroyed when it was deinitialized. As a side note, this meant that when a
conference in a non-default domain was joined, local tracks were destroyed and
recreated in quick succession.

Now, local trans are created and destroyed based on what the next route will be,
and this happens when the target room has been decided. This allows us to create
local tracks the moment we need to render any route, and destroy them when there
is no route to be rendered. As an interesting byproduct, this refactor also
avoids the destruction + recreation of local tracks when a conference in a
non-default domain was left.
2017-07-18 20:42:20 -05:00
Lyubo Marinov b62b296080 Fix typos. Apply consistent formatting 2017-07-18 16:43:58 -05:00
Lyubo Marinov a690b9d5e1 [RN] Handle denied getUserMedia permissions 2017-07-18 16:41:39 -05:00
Saúl Ibarra Corretgé 7361151203 feat(dialog): add missing export for actionTypes
The full-screen module uses the HIDE_DIALOG action to re-engage the full-screen
mode.
2017-07-18 13:35:24 +02:00
Lyubo Marinov 72691eb2dc misc: fix dispatching actions twice when mapDispatchToProps is used 2017-07-17 13:59:04 -05:00
Saúl Ibarra Corretgé 0bf9a78e4c misc: fix dispatching actions twice when mapDispatchToProps is used
The functions need not return anything, or it will be dispatched as another
action.
2017-07-17 13:51:35 -05:00
Lyubo Marinov 7f041170f7 Consistent formatting 2017-07-16 03:44:07 -05:00
Lyubo Marinov e54744e5ef [Android] Use target API 23 2017-07-16 02:26:09 -05:00
virtuacoplenny 244de8096f feat(local-video): convert to react (#1705)
* feat(local-video): convert to react

- Create a VideoTrack component for displaying a video element.
  This mirrors native also having a VideoTrack component.
- The VideoTrack component does not let React update it to prevent
  the video element from re-rendering, which could cause flickers
  and would not work with temasys's overriding of the video element.
- VideoTrack extends AbstractVideoTrack to mirror native
  implementation and to get the dispatch of the onplaying event.
- Remove the onclick handler on the video element. Honestly, I
  didn't get it to work, and did not try, but it is also unnecessary
  because another handler already exists on the video wrapper.

* ref(device-selection): VideoInputPreview uses VideoTrack to show video

* squash into conversion: change css selectors

* squash into conversion: mix in abstract props

* squash into conversion: change shouldComponentUpdate check

* squash: update comment about why triggerOnPlayingUpdate is used
2017-07-14 14:22:27 -05:00
paweldomas b84e910086 feat: add option to disable desktop sharing
config.disableDesktopSharing - when set to false will disable desktop
sharing

interfaceConfig.DESKTOP_SHARING_BUTTON_DISABLED_TOOLTIP - when value is
assigned, will not hide the desktop sharing button completely, but show
as disabled with this value used as the tooltip text.
2017-07-14 10:14:00 -05:00
Aaron van Meerten d752e8b864 accept 'avatar' as well as 'avatarUrl' for avatar field 2017-07-13 15:49:25 -05:00
George Politis d335669afe Merge pull request #1765 from jitsi/feat-local-remote-relayed
feat: Adds TURN indication.
2017-07-13 21:16:40 +02:00
George Politis 62613ff02e feat: Adds TURN indication. 2017-07-13 17:00:27 +02:00
Leonard Kim 4eacbd9f61 fix(tracks): remove mute and videotype listeners on track remove
Listeners were set for when a track muted or changed its video
type, but the listeners were never removed. This would could
cause events to keep firing on the removed tracks, which would
cause redux to fire and error because the tracks were no longer
known. That the tracks still fire events after removal is
another issue...
2017-07-13 09:37:39 +02:00
Leonard Kim 1ad614e812 fix(add-people): remove line break from searchPeople request
Chrome has deprecated line breaks in requests. The template
literal used for the searchPeople url has a line breaks. Instead
of line breaking the request url, concatenate it together.
2017-07-12 12:54:26 -05:00
paweldomas 2281b1acd2 ref: enable/disable video button
Dynamically enables/disables the toolbar video button. Prior to that
commit if we would start with no video there would be no way to enable
it later on.
2017-07-12 10:29:18 -07:00
yanas 4ccd5c6072 Fix(AddPeopleDialog): Close dialog on submit (#1761)
* Fix(AddPeopleDialog): Fixes error state and close dialog

* (to-squash) Addresses comments
2017-07-12 08:35:00 -07:00
hristoterezov cee523fbf1 fix(desktop_picker): Use defaultProps 2017-07-10 17:43:29 -05:00