Commit Graph

560 Commits

Author SHA1 Message Date
Lyubo Marinov e7aff1d8e1 [RN] Group the secondary toobar buttons
Rearrange the ToolbarButtons in the secondary Toolbar in order to mostly
group the media-related ones such as the AudioRouteButton, the
switchCamera button, and the audio-only mode button.
2017-11-15 09:31:40 -06:00
Saúl Ibarra Corretgé f973a695d8 [RN] Add audio route picker
Due to the difference in nature, the iOS and Android implementations are
completely different:

iOS: MPVolumeView is used, which allows us to place a button which will launch a
native route picker provided by iOS itself. This view is different depending on
the iOS version, with the iOS 11 version being more complete.

Android: A completely custom component is used, which displays a bottom sheet
with the device categories, not devices individually. This is akin to the sheet
in the builtin dialer.
2017-11-15 09:31:40 -06:00
Saúl Ibarra Corretgé 8198e52b93 [RN] Add SimpleBottomSheet component
It emulates Android's BottomSheet in pure JavaScript. It's implemented as
another Dialog, so it can be used instead of one.

The implementation only supports text options with an associated icon, and an
optional 'selected' marker.
2017-11-15 09:31:40 -06:00
Lyubo Marinov 3033f7bc3d Coding style, consistency
We're already using the notion of _WILL_ in redux action types and
there's currently no compelling reason to introduce _BEGIN_ as well.
2017-11-15 09:23:22 -06:00
Lyubo Marinov decf9c4991 Add/fix JSDoc comments
While reviewing "[PREVIEW|RN]: Handle getUserMedia in progress" I
discovered JSDoc comments which could be improved. They are not
necessarily 100% related to the PR.
2017-11-14 15:42:00 -06:00
paweldomas f37a12c332 fix(base/tracks): handle GUM in progress
This commit adds extra actions/Redux state to be able to deal with
the GUM operation being in progress. There will be early local track
stub in the Redux state for any a local track for which GUM has been
called, but not completed yet.

Local track is considered valid only after TRACK_ADDED event when it
will have JitsiLocalTrack instance set.
2017-11-14 14:48:30 -06:00
Leonard Kim bff983d969 fix(style): rename the remaining AKButton import 2017-11-13 16:59:44 -06:00
Leonard Kim c2901808ca fix(button-group): use ButtonGroup from the Button package
That standalone ButtonGroup package has been deprecated.
The deprecation warning says to use the ButtonGroup component
from the Button package.
2017-11-13 16:59:44 -06:00
virtuacoplenny 5c464a7bda feat(audio-only): be able to lock a browser into capturing audio only (#2125)
* feat(audio-only): be able to lock a browser into capturing audio only

* squash: try to make string more clear about audio only support

* squash: final strings
2017-11-09 13:59:16 -08:00
yanas db71de97af Reactify mute remote participant (#2145)
* fix(remote-mute): Moves remote participant mute to react

* fix(translation): Removes unused strings

* [squash] Addressing comments
2017-11-09 09:23:17 -08:00
Lyubo Marinov d0c079dba5 Coding style 2017-11-07 17:27:58 -06:00
Lyubo Marinov bce2a9fba9 [RN] Fix eslint & flow errors 2017-11-07 17:27:58 -06:00
paweldomas 320cfe4745 ref(base/react/Container): return null for not visible
Now that we no longer hide the filmstrip it is fine to return null
instead of trying to hide with some tricks.
2017-11-07 08:28:18 -06:00
paweldomas c0a7d6144a feat: display filmstrip on the short side
Adds the ability to detect app area's aspect ratio on react-native
through the features/base/aspect-ratio.

Makes conference, filmstrip and toolbox react to the aspect ratio
changes and display filmstrip on the shorter side of the screen.
2017-11-07 08:28:18 -06:00
virtuacoplenny 510334fa7f ref(notifications): convert some dialogs to error or warning notifica… (#1991)
* ref(notifications): convert some dialogs to error or warning notifications

- Expand the configurability of the Notification component so warnings
  and errors can be displayed.
- Allow Notification to take in arbitrary text for the body.
- Rename defaultTitleKey to titleKey for consistency with descriptionKey.

* ref(notifications): remove openReportDialog method

openReportDialog is a wrapper around showError that adds
a logger statement. It is being called in one place only
so remove the method and have that one place call logger.

* ref(notifications): UI.showTrackNotWorkingDialog takes a boolean

Change UI.showTrackNotWorkingDialog so it takes a boolean
arguments instead of the entire track. A small refactor so
the method needs to know less.

* [squash] Fixes eslint errors

* WiP: Fixes desktop sharing error strings and adds support button

* [squash] Fix icons appearances

* [squash] Fix translate titles and messages

* [squash] fix(translation): Fixes incorrect password string

* [squash] fix(recording): Fixes recording message

* [squash] fix(warning): Turns some warnings to errors and makes support link optional.

* [squash] fix(translation): Addressing language comments

* [squash] Fixes jsdoc and formatting

* [squash] fix(noopener): Fixes window.open noopener

* [squash] fix(constants): Extract constants and refactor NotificationWithToggle

* [squash] fix(lang): Fixes camera and mic error titles

* [squash] fix(supportLink): Renames addSupportLink to hideErrorSupportLink
2017-11-03 14:05:03 -05:00
Saúl Ibarra Corretgé 922bbb1798 [iOS] use display: 'none' to hide elements (#2128)
* [iOS] use display: 'none' to hide elements

No, it still doesn't work properly on some Android devices, sigh.
2017-11-02 10:43:32 -05:00
paweldomas b74bede0e7 feat(web/RN): update React to v16 and React Native to 0.49 2017-11-02 14:32:35 +01:00
paweldomas e520319af2 fix(redux/functions): fix typo
The intention of the code is (1) to return target if none of the setters lead
to an actual change, (2) to not modify target, and (3) to do it with a 1
copyOnWrite at most.
2017-11-02 11:04:54 +01:00
virtuacoplenny 2d9ce2486e feat(1080p): pass new-style constraints to createLocalTracks (#2087)
The lib will accept new style constraints and use those
to capture audio/video. By defining the constraints in
config, there is greater flexibility for defining
and changing constraints.
2017-10-31 17:08:07 -07:00
Lyubo Marinov 499ee7985b [RN] Fix redux state cleanup
The preceding commit "fix(auth.native): trigger conference left on
cancel" did not correctly clean the redux state up on CONFERENCE_LEFT.
2017-10-24 13:58:08 -05:00
paweldomas dedd10c62a fix(auth.native): trigger conference left on cancel
Triggering the 'conference left' action when the wait for owner dialog
is dismissed will let the Call Kit implementation end the call, after
a recoverable conference failed event was emitted.

Also fixes conference state reduction when 'conference left' is emitted
by room lock or auth features where the conference has not been joined
yet.
2017-10-24 12:38:37 -05:00
hristoterezov a4e7f3d992 ref(strophe): Remove and cleanup all strophe related code.
Everything strophe related is now handled in lib-jitsi-meet project.
2017-10-23 16:27:30 -05:00
damencho ade5290013 Fixes changing device unmutes you in a conference. 2017-10-20 17:25:44 -05:00
yanas e09949be9f feat(dark-theme): Applies dark theme on inline-dialogs, tooltips, flags and more 2017-10-20 15:29:16 -05:00
Lyubo Marinov 8948c837d3 Coding style 2017-10-18 13:21:46 -05:00
Lyubo Marinov ce1a8e7567 [RN] Don't tell everyone we're called "me"
Recently/as part of the work on taking into account the user defined by
JWT, the local participant (on mobile) started telling the remote
participants that he/she had the display name "me". Obviously, that's
incorrect. Do not store the default display name in redux. While it may
be argues that redux is the place for all states, base/participants and
the name property of Participant is not meant to be that display name
because that is being sent to remote participants, the default name
needs to be internationalized, etc. So it's better to not store the
default display name at this time at all because it's not used by mobile
anyway and Web already deals with remote participants who don't share
their display names.
2017-10-18 13:15:49 -05:00
hristoterezov 0b50578de9 style(analytics): sendEvent -> sendAnalyticsEvent 2017-10-17 19:33:32 -05:00
Lyubo Marinov 5e01abf6fb Flow, coding style 2017-10-17 17:12:39 -05:00
damencho c3e42e0162 Adds application name to the initJitsiConference options. 2017-10-16 16:35:26 -05:00
Lyubo Marinov 003eb68e28 Flow, coding style 2017-10-13 14:34:09 -05:00
paweldomas 8a4e6a7ec0 feat: override email, display name and avatar on mobile
Will override email, display name and avatar URL with the values
provided in 'context.user' structure of the JWT token.

Settings will no longer be used to retrieve local display name,
email and avatar URL. Now those values will be obtained from
the /features/base/participants Redux state.

fix(jwt/middleware): use const for default name

fix: wrong default display name on web

ref(base/participants): remove getDisplayName functions

ref(jwt): do not accept unknown user fields
2017-10-13 14:31:44 -05:00
hristoterezov 0eddef4d62 feat(mute): Add analytics and console logs for audio/video mutes 2017-10-13 09:50:48 -05:00
hristoterezov df1437f018 ref(analytics): Use analytics from features/analytics 2017-10-13 09:50:48 -05:00
hristoterezov a3a871d4b3 fix(lib-jitsi-meet): Use the exported constants 2017-10-13 09:50:48 -05:00
hristoterezov f050e7026d fix(media_actions): remove unused actions 2017-10-13 09:50:48 -05:00
Saúl Ibarra Corretgé 3c3b05e3ea Add ability to disable h264 (#2061)
* doc: document disableH264 option

* [RN] Override disableH264 config option

We never want it disabled on mobile.
2017-10-12 15:42:55 -07:00
Lyubo Marinov da03b49754 Flow, coding style 2017-10-12 14:59:11 -05:00
paweldomas 122be9e0e0 ref: move 'jwt' feature to 'base' 2017-10-12 14:43:09 -05:00
damencho 90451a640c Fixes sending logs to callstats.
When _setLoggingConfig is invoked for the first time old and new config
are equal and _initLogging is not called. Currently, there is no way to
detect when the first time we call it is. We could use APP.logCollector
but it should go away at some point in the future.
2017-10-11 15:04:22 -05:00
Leonard Kim fafffb519b fix(filmstrip-only): prevent stats display 2017-10-10 12:47:19 -05:00
Lyubo Marinov 2d73e9ace4 Flow, coding style 2017-10-09 10:39:31 -05:00
Lyubo Marinov 2eb36c4053 Flow, coding style 2017-10-06 15:26:49 -05:00
Lyubo Marinov c98e7a204c CONFERENCE_FAILED error as object 2017-10-05 13:25:17 -05:00
Lyubo Marinov 3d32c2de89 [RN] Secure entry, no automatic correction for room-lock passwords 2017-10-05 13:25:17 -05:00
Lyubo Marinov 7a7abdac2f [RN] Fix the submission of room-lock Dialogs 2017-10-05 13:25:17 -05:00
Lyubo Marinov f53c79ab24 Flow, coding style 2017-10-05 13:25:17 -05:00
Lyubo Marinov 5561a9c031 Partially prepare for eslint-plugin-flowtype 2.37.0 2017-10-03 14:41:54 -05:00
yanas 86fcfcc535 WiP(invite-ui): Initial move of invite UI to invite button (#1950)
* WiP(invite-ui): Initial move of invite UI to invite button

* Adjusts styling to fit both horizontal and vertical filmstrip

* Removes comment and functions not needed

* [squash] Addressing various review comments

* [squash] Move invite options to a separate config

* [squash] Adjust invite button styles until we fix the whole UI theme

* [squash] Fix the remote videos scroll

* [squash]:Do not show popup menu when 1 option is available

* [squash]: Disable the invite button in filmstrip mode

* 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.

* fix(defaultToolbarButtons): Fixes unresolved InfoDialogButton component problem

* [squash]: Makes invite button fit the container

* [squash]:Addressing invite truncate, remote menu position and comment

* [squash]:Fix z-index in horizontal mode, z-index in lonely call

* [squash]: Fix filmstripOnly property, remove important from css
2017-10-03 11:30:42 -05:00
Lyubo Marinov dfebd692f3 eslint 4.8.0
ESLint 4.8.0 discovers a lot of error related to formatting. While I
tried to fix as many of them as possible, a portion of them actually go
against our coding style. In such a case, I've disabled the indent rule
which effectively leaves it as it was before ESLint 4.8.0.

Additionally, remove jshint because it's becoming a nuisance with its
lack of understanding of ES2015+.
2017-10-02 18:12:38 -05:00
Lyubo Marinov 4bf19d73fd [RN] Fix documentation comments
* Javadoc introduced @code as a replacement of <code> and <tt> which is
  better aligned with other javadoc tags such as @link. Use it in the
  Java source code. If we switch to Kotlin, then we'll definitely use
  Markdown.

* There are more uses of @code in the JavaScript source code than <tt>
  so use @code for the sake of consistency. Eventually, I'd rather we
  switch to Markdown because it's easier on my eyes.

* Xcode is plain confused by @code and @link. The Internet says that
  Xcode supports the backquote character to denote the beginning and end
  of a string of characters which should be formatted for display as
  code but it doesn't work for me. <tt> is not rendered at all. So use
  the backquote which is rendered itself. Hopefully, if we switch to
  Markdown, then it'll be common between JavaScript and Objective-C
  source code.
2017-10-01 01:35:19 -05:00
Lyubo Marinov 3b5ee2d4c6 [iOS] Add initial CallKit support 2017-09-29 12:00:13 -05:00
Lyubo Marinov 2e2129fa44 Import PropTypes from prop-types
Prepare for React 16.
2017-09-27 16:24:53 -05:00
Lyubo Marinov 964061fa5c [RN] Make it easier to disable yellow and red boxes in Debug 2017-09-27 11:23:35 -05:00
Lyubo Marinov d521deecc4 Coding style 2017-09-26 23:39:30 -05:00
Saúl Ibarra Corretgé d03a815572 [RN] Add ability to start a call in audio-only mode 2017-09-26 23:39:30 -05:00
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
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
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
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
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
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
Lyubo Marinov d0476991a6 [RN] Support children in Dialog 2017-09-18 02:12:27 -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 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
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
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 8cdd73b987 [RN] Reverts to own properties for Storage 2017-09-05 18:55:54 -05:00
Lyubo Marinov b304ad5808 [RN] Weaken the coupling between WelcomePage and AbstractWelcomePage 2017-09-05 16:27:12 -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é 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 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
Дамян Минков 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
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
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
Leonard Kim 85f0ad2791 feat(popover): create a wrapper around InlineDialog 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
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
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
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
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
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
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
hristoterezov 1782030936 feat(alwaysontop): Toolbar. 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
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
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
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
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
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
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 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 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
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
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
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 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
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
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
yanas f5d443d194 User Picker Implementation 2017-07-10 09:56:38 -07:00
yanas 47b6166d79 fix(StatelessDialog.web): Fixes stealing Enter events 2017-07-10 09:56:38 -07:00
Lyubo Marinov 5c094bf6e0 [RN] Fix disconnecting before the connection was established 2017-07-07 12:21:08 -05:00
Saúl Ibarra Corretgé c4232b34ae [RN] Fix disconnecting before the connection was established
Keep track of the connection and conference objects so we can leave and / or
disconnect early, before the connection is established or the conference joined.
2017-07-07 09:37:04 -05:00
Saúl Ibarra Corretgé db26aa652b [RN] Update jitsi font icon selection 2017-07-06 17:14:00 -05:00
Lyubo Marinov 9aaf9a484d [RN] Fix TypeError: undefined is not an object (evaluating 'this.options.p2p.useStunTurn') 2017-07-05 16:34:06 -05:00
Saúl Ibarra Corretgé 4e4a9012c2 [RN] Fix iOS lockups / resprings
Apparently iOS doesn't like dangling background tasks very much, so update the
background timers plugin with a version which fixes this.

https://github.com/ocetnik/react-native-background-timer/pull/38

Also accomodate for the API changes upstream.

Credits to @lyubomir for finding the needle in the haystack.
2017-07-05 16:34:06 -05:00
Saúl Ibarra Corretgé 8a3cec4a9d feat(p2p): enable H.264 for P2P by default
On mobile we got the extra step of overriding the option and always set it to
true.
2017-06-29 11:22:32 +02:00
George Politis 2b0563ad35 Merge pull request #1710 from saghul/p2p-settings
feat(p2p): refactor configuration options
2017-06-29 11:13:26 +02:00
virtuacoplenny 928181cd7a feat(display-name): convert to React (#1672)
* feat(display-name): convert to React

- Create a new React Component for displaying and updating display
  names on small videos
- The updating of the Component is defined in the parent class
  SmallVideo, which children will get access to through prototype
  copying
- Create a new actionType and middleware so name changes that occur
  in DisplayName can be propogated to outside redux
- Update the local video's DisplayName when a conference is joined
  or else the component may keep an undefined user id

* squash: query for the container, not the el owned by react
2017-06-28 22:35:43 -05:00
Saúl Ibarra Corretgé 4e5bc172c9 feat(config): allow overriding nested config objects
This makes it possible for the following URL params to work:

config.p2p.enabled=true&config.p2p.preferH264=true
2017-06-28 17:29:04 +02:00
Saúl Ibarra Corretgé cdb547dbd1 Merge pull request #1534 from jitsi/p2p_react_native
[RN] export RTCIceCandidate
2017-06-27 11:15:29 +02:00
Leonard Kim fe4de31e57 feat(tracks): place local tracks in the redux store
- Add tracks to the redux store by intercepting where the
  tracks actually get used via conference.replaceTrack
- While the replace call is unique to web, the _dispose and
 _addTracks calls use existing native code implementations
- Between _dispose and addTracks is a call to update mute state.
  Without it, when changing devices or videoType while muted,
  the user will stay muted (whereas existing web behavior
  causes unmute). This is due to middelware calling
  _syncTrackMutedState to make the track mute if the user is
  currently muted.
- Move the rest of ConferenceEvents.TRACK_MUTE_CHANGED into
  middleware so the event is no longer used
- Note: This change does not guarantee the track state in the
  redux store will be 100% accurate, specifically the attribute
  videoStarted. Muted and videoType should be accurate.
2017-06-23 10:33:05 -05:00
Leonard Kim 2a446b8799 feat(tracks): place remote tracks into the redux store
- Use actions trackAdded and trackRemoved to add and remove remote
  tracks from the redux store
- Emit out to non-react components on track added and removed in
  the track middleware
- Emit out to existing non-react components on track mute and
  video type changes
2017-06-23 10:33:05 -05:00
Lyubo Marinov 25ec8ac6a7 Prepare for eslint 4 2017-06-14 22:17:35 -05:00
Lyubo Marinov ca94563c51 [RN] Coding style
The files styles.js are used (pretty much) on React Native only and each
of them exports 1 name. Export it as default to cut down on source code.
2017-06-10 18:07:51 -05:00
Lyubo Marinov 718de31e04 [RN] Fix video in audion-only mode
When entering audio-only mode, VideoBridge is instructed to stop sending
remote videos. However, if the instruction fails because DataChannels do
not work, for example, then the app continues to display the remote
videos. Even though they're received in the case of such a failure, no
videos are to be displayed in audio-only mode.
2017-06-10 18:07:51 -05:00
Lyubo Marinov 01b397faef Fixes a jsdoc/require-description-complete-sentence warning 2017-06-09 00:03:23 -05:00
damencho 8e3dfcf0d0 Handles Enter key to submit dialogs.
If there is no focused node inside the dialog we focus any of the available buttons, submit button is first.
2017-06-07 17:06:48 -05:00
Lyubo Marinov 5a74080839 Comply w/ coding style 2017-06-07 13:27:45 -05:00
Lyubo Marinov 89862cbea9 [RN] Fix exports/imports of nonexistent files 2017-06-07 13:27:44 -05:00
hristoterezov 96e83989a5 feat(device_selection): Implement popup 2017-06-07 09:23:40 -05:00
Lyubo Marinov d437f3db03 [React] Call/ring overlay
Rewrite the non-React RingOverlay into the React Component CallOverlay
in a way which makes it easier to port to React Native.
2017-06-06 00:11:39 -05:00
Lyubo Marinov 409255f056 [React] Cross-platform Components
Introduce certain React Components which may be used to write
cross-platform source code such as Audio like Web's audio, Container
like Web's div, Text like Web's p, etc.
2017-06-06 00:11:39 -05:00
Lyubo Marinov a4a13bed84 Invite URL w/o (hash & query/search) params 2017-06-01 21:04:31 -05:00
Lyubo Marinov ec454d1da0 Move ConferenceUrl.inviteURL into React and redux 2017-06-01 21:04:31 -05:00
Lyubo Marinov 87b488a12b Comply w/ coding style 2017-06-01 21:04:31 -05:00
Lyubo Marinov 4dc658c270 Fix 'Missing JSDoc comment  require-jsdoc' 2017-06-01 21:01:50 -05:00
Lyubo Marinov ec2e6525ac Fix jsdocs 2017-05-31 00:53:53 -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
Saúl Ibarra Corretgé 5304660e14 [RN] Polyfill Symbol 2017-05-26 16:37:22 -05:00
Lyubo Marinov 66ababc6c8 Comply w/ codying style: naming, formatting, etc. 2017-05-25 10:56:08 -05:00
yanas 6536f82559 fix(Dialog.web.js): Fixes okDisabled state not taken into account 2017-05-23 09:00:40 -05:00
Дамян Минков ec881e0fd0 Merge pull request #1580 from jitsi/fix-isguest-typeerror
Fix TypeError: Cannot read property 'isGuest' of undefined
2017-05-18 13:10:28 -05:00
Leonard Kim 80989147ad feat(video-label): Add dropdown for toggling audio only
Add a menu that displays when hovering over VideoStatusLabel. The menu's
display is controlled by CSS. As the existing AudioOnlyLabel no longer needs
needs its own tooltip, it has been removed and label display logic has been
moved into VideoStatusLabel.
2017-05-18 13:09:34 -05:00
Lyubo Marinov 3c31a60b32 Fix TypeError: Cannot read property 'isGuest' of undefined 2017-05-18 11:53:45 -05:00
Saúl Ibarra Corretgé bac191f96c [RN] Rename jitsi-meet-react to jitsi-meet 2017-05-16 12:38:36 -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
Lyubo Marinov e6f6884c36 [RN] Support JSON Web Token (JWT)
Make 'Add jwt module to react' work on mobile.
2017-05-09 00:21:14 -05:00
Ilya Daynatovich ab5c2e9ded Add jwt module to react 2017-05-09 00:21:14 -05:00
Ilya Daynatovich 4f72225372 Add set room url action 2017-05-09 00:21:13 -05:00
Ilya Daynatovich 3af0976a43 Beautify URLProcessor 2017-05-09 00:21:13 -05:00
Ilya Daynatovich 96b1f0ca74 Create config util 2017-05-09 00:21:13 -05:00
Leonard Kim d24d5d95dd fix(audio-only): combine video status labels
Move the HD label into the newly renamed VideoStatusLabel
component. That way it cannot be possible for the audio only
label and the HD label to display simultaneously.
2017-05-05 09:27:59 -07:00
Saúl Ibarra Corretgé 9ba3a1c4ff feat(conference): add audio only mode
Audio only mode can be used to save bandwidth. In this mode local video is muted
and last N is set to 0, thus disabling all remote video.

When this mode is enabled avatars are shown.
2017-05-05 09:27:59 -07: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
Guus der Kinderen 00b4176bf8 Non-clickable watermarks without links
Watermarks can be used to link to an external site by configuring a URL.
However, the URL is optional. When it is not set, the watermark should
not be clickable. This prevents users from reloading the room by
clicking on a watermark (caused by an HTML anchor element without an
href).
2017-04-26 10:54:32 -05:00
Lyubo Marinov 7836fd1990 Introduce features/base/logging
The functionality around logging including logging_config.js i.e.
loggingConfig and the other classes and/or functions that initialize
loggers for Jits Meet truly deserves a feature of its own. Start getting
in that direction on both Web and mobile by introducing
features/base/logging and bringing loggingConfig to mobile.
2017-04-23 23:30:53 -05:00
Lyubo Marinov 92e765ea21 Introduce features/base/config
The config object defined by lib-jitsi-meet is not used by
lib-jitsi-meet only, jitsi-meet respects its values as well.
Moreover, jitsi-meet defined classes and/or functions which manipulate
that config object. Consequently, it makes sense to move the config
object and the associated classes and functions in a dedicated feature.
2017-04-23 15:18:41 -05:00
paweldomas 16d9ef5f1c [RN] export RTCIceCandidate
Required for P2P.
2017-04-23 13:54:12 -05:00
Lyubo Marinov bce1610794 Simplify, comply w/ coding style
Rename setStateProperties and setStateProperty to assign and set,
respectively. Inspired by Object.assign, _.assign, and _.set.
2017-04-22 17:57:08 -05:00
Lyubo Marinov 55c3f5ddff Comply w/ coding style
@virtuacoplenny, the changes of this commit are not necessarily in
source code that you introduced in
https://github.com/jitsi/jitsi-meet/pull/1499 but I saw violations in
files modified in the PR which I had to read in order to understand the
PR.
2017-04-19 20:56:19 -05:00
Leonard Kim 44b81b20e3 feat: convert invite dialog to react and redux
Converting the invite modal includes the following:
- Creating new react components to display InviteDialog. The
  main parent components are ShareLink and PasswordOverview,
  the later handles displaying lock state and password editing.
  These components do not make use of atlaskit as the component
  for input does not yet support readonly, so for consistency
  within the modal content no atlaskit was used.
- Using redux for keeping and accessing lock state instead of
  RoomLocker.
- Publicly exposing the redux action lockStateChanged for direct
  calling on lock events experienced on the web client.
- Removing Invite, InviteDialogView, and RoomLocker and references
  to them.
- Handling errors that occur when setting a password to preserve
  existing web funtionality.
2017-04-19 20:41:23 -05:00
Leonard Kim f9585430bb fix: set a default color for text in modal dialogs
Some atlaskit components, such as field-text, inherit text color.
This is a problem with components that are white as they will
inherit $defaultColor, which is a light gray. So instead, for
the atlaskit modal, set a color for all the form content so it
can be inherited instead.
2017-04-18 14:14:26 -05:00
Leonard Kim 19de32e206 feat: support directly setting dialog title text
Dialog does not currently support displaying dynamic strings
for titles, only static strings listed for translation. Accept
a new prop that explicitly states it is for setting the title
and have the web dialog prefer it over the titleKey.
2017-04-18 14:14:26 -05:00
Leonard Kim a82bc1df64 fix: honor updates of the local user role before conference join
When the prosody setting has muc_allowners, everyone joins as a
moderator. In this case, the local user will not be set as a
moderator in the redux store as the USER_ROLE_CHANGE event will
trigger with the local user id before the redux store has set
the actual local user id--something that happens on
CONFERENCE_JOINED. The fix is to explicitly signal the local user
role has changed to the redux store, which follows the
implementation of pre-existing web logic.
2017-04-18 14:14:04 -05:00
Lyubo Marinov 3db557e2c9 Move roomnameGenerator.js out of features/base/util
Over time features/base/util became a bucket where people seemed to dump
just about anything they couldn't think of a better place for. That's a
trend I don't like encouraging. Given that roomnameGenerator.js is
currently used in features/welcome only, I'm fine with moving it there
for the greater good.
2017-04-14 13:14:02 -05:00
Lyubo Marinov a8b3177e20 Move timeUtil.js out of features/base/util
Because timeUtil.js computes hours, minutes, and seconds out of a single
time/duration using three separate functions, I wouldn't recommend using
it, especially reusing it. That's why I'm even making the functions
private to their current use location.
2017-04-14 13:14:02 -05:00
Lyubo Marinov 8e6f043586 Move interceptComponent.js out of features/base/util
I don't like the file/function name, I'm not excited about the
complexity of the logic it implements, and it's definitely a reusable
piece worthy of being called a utility.
2017-04-14 13:12:47 -05:00
Leonard Kim 07cd6a8b88 fix: set button font-size for modals
Atlaskit at times will have localized styling for font-size and
sometimes will not. The button component will inherit its
font-size whereas selectors have localized font-size of 14px. For
consistency, the cancel/submit buttons on the atlaskit modals
will also have 14px. The atlaskit story book examples also use
buttons with 14px font-size.
2017-04-11 10:35:59 -07:00
Lyubo Marinov 35ba6cef4e React (Native) optimizations/performance 2017-04-10 19:16:35 -05:00
Saúl Ibarra Corretgé 50fea44ce2 [RN] Use rounded avatars in the film strip
Also move (native) avatar style to film-strip styles, since  that's where it
applies. This is analogous to how the large-view avatar is styled.
2017-04-10 19:13:40 -05:00
Leonard Kim 2f994b1227 feat: new device selection modal with previews
The Device Selection modal consists of:
- DeviceSelection, an overly smart component responsible for
  triggering stream creation and cleanup.
- DeviceSelector for selector elements.
- VideoInputPreview for displaying a video preview.
- AudioInputPreview for displaying a volume meter.
- AudioOutputPreview for a test sound output link.

Store changes include is primarily storing the list of
available devices in redux. Other app state has been left
alone for future refactoring.
2017-04-10 13:30:00 -07:00
Lyubo Marinov 95667ef98e Revert "[RN] Use rounded avatars in the film strip"
This reverts commit 739298c782.
2017-04-09 12:58:27 -05:00
Saúl Ibarra Corretgé 739298c782 [RN] Use rounded avatars in the film strip 2017-04-09 11:55:57 -05:00
Saúl Ibarra Corretgé a1da6bff1a [RN] Fix loading config from non-default domains
When a conference is to happen in a domain which is not the defaut, its config
is loaded and set. As part of this process, lib-jitsi-meet is disposed. Because
disposing is asynchronous, events happen in this sequence:

- set new config
- dispose lib (which effectively wipes the config)
- init lib

This results in the library to be initialized without the loaded config, which
was lost. This commit fixes that by delaying setting the config and
re-initializing the library until it was disposed.
2017-04-07 14:54:32 -05:00
Saúl Ibarra Corretgé 18a81d7ca0 [RN] Fix passing config options when creating a conference
JitsiConnection.initJitsiConference doesn't automatically pass the global config
options, so grab the config from the Redux store and pass it.
2017-04-07 14:53:52 -05:00
Saúl Ibarra Corretgé ae8c5287e4 [RN] Remove workaround for video mirroring on iOS
It's now natively supported:
https://github.com/oney/react-native-webrtc/pull/244
2017-04-06 14:17:12 -05:00
Lyubo Marinov fd10362bef Comply w/ coding style 2017-04-06 12:09:01 -05:00
Saúl Ibarra Corretgé 37157dc9e2 [RN] Use _switchCameras provided by lib-jitsi-meet
The functionality to use the react-native-webrtc custom API for fast switching
cameras was moved to JitsiLocalTrack in lib-jitsi-meet. Use that.

Ref: https://github.com/jitsi/lib-jitsi-meet/pull/444
2017-04-05 21:01:00 -05:00
Saúl Ibarra Corretgé 8fe3dce649 [RN] Add audio only mode for conferences
The behavior can be triggered with the toggleAudioOnly action, which is
currently fired with a button.

The following aspects of the conference will change when in audio only mode:

- local video is muted
- last N is set to 0 (effectively muting remote video)
- full-screen mode is exited
- audio mode is set to "audio chat" (default output is the earpiece)
- the wake lock is disengaged

One aspect not handled in this patch is disabling the video mute button while in
audio only mode. The user should not be able to turn back video on in that case.
2017-04-05 15:07:34 -05:00
Lyubo Marinov 0e9509ae9b Comply w/ coding style 2017-04-05 04:01:57 -05:00
Saúl Ibarra Corretgé 618dedc58e [RN] Use participant connection status events instead of last N
They better represent if a participant has video available or not. There are
cases when even a participant in the last N set would not have video because it
disconnected momentarily, for example.
2017-04-05 01:41:46 -05:00
Saúl Ibarra Corretgé 623b7a8d6f [RN] Show avatar if a participant is not in last N 2017-04-05 01:21:23 -05:00
Saúl Ibarra Corretgé 7c76f124bf [RN] Use native API for toggling cameras
Use the curstom _switchCamera API provided by react-native-webrtc to toggle the
camera instead of destroying the current track and creating a new one.

_switchCamera is implemented at a low level, so the track perceives no changes,
thus being a lot faster and less involved since the capturer doesn't need to be
destroyed and re-created.

In addition, don't mirror the video for the back camera.

Ref: https://github.com/oney/react-native-webrtc/pull/235
2017-04-05 00:21:35 -05:00
Saúl Ibarra Corretgé f5973e0eee [RN] Fix toggling camera
When a new local video track is created an associated video capturer is created
for it. The cause for the freezes seems to be creating mutliple tracks (which
come with a video capturer each). Fix this by first disposing of the previous
video track before creating the new one.

Ref:
https://github.com/oney/react-native-webrtc/issues/209#issuecomment-281482869
2017-04-05 00:20:17 -05:00
Lyubo Marinov 32634356a6 Simplify naming 2017-04-05 00:20:17 -05:00
Lyubo Marinov 6d0a07a4cd Remove unnecessary source code
Lib-jitsi-meet does not really implement isScreenSharing. Besides,
getCameraFacingMode will already make sure that the video track does not
represent a desktop stream.
2017-04-05 00:20:17 -05:00
Lyubo Marinov 684572bd05 Comply w/ coding style 2017-04-04 17:52:06 -05:00
Saúl Ibarra Corretgé a10f040df6 Merge pull request #1440 from jitsi/iframe_api_race_condition
Fix executeCommand race condition
2017-03-31 16:48:50 +01:00
Saúl Ibarra Corretgé 4ddc426966 [RN] Move setting last N action to base/conference
This is in preparation for an upcoming "audio only mode" feature. Setting last N
will also be required for it, so this patch factors out the action and makes it
public so other modules can reuse it.

In addition, if the value is set to undefined the configured default value (or
-1 if absent) is picked.
2017-03-30 14:40:05 -05:00
hristoterezov 4ab4aa04da fix(avatar): Avatar properties not updated before local user join
Replaces changeAvatarID, changeAvatarURL and changeEmail with
participantUpdated action.
participantUpdated can be fired for local user without id. This
fixes the problem with updating the local user before the user
join the conference which results in fix for failing to execute
commands for avatarID, avatarURL and email right after the iframe
api creates the iframe with Jitsi Meet.
2017-03-29 10:23:07 -05:00
Lyubo Marinov 84b9c5f5fd Coding style 2017-03-24 09:06:54 -05:00
Saúl Ibarra Corretgé 43c8fc6847 [RN] Fix mirroring video views on platforms with native support 2017-03-24 09:02:32 -05:00
Ilya Daynatovich affd965d5d Remove an unnecessary file 2017-03-20 14:42:54 -05:00
Leonard Kim 989161159d Modal dialog for displaying dominant speaker times 2017-03-20 12:47:20 -05:00
damencho 51f0c8a388 Adds base dialog implementation. 2017-03-15 16:33:04 -05:00
Lyubo Marinov e6f906b9ca [RN] Fix undefined.avatarID in ParticipantView 2017-03-08 17:05:55 -06:00
hristoterezov d74e43ddcc [RN] fix(Avatar): Match the implementation for web 2017-03-08 13:21:34 -06: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 45e09af692 react-native 0.42.0 2017-03-07 15:09:39 -06:00