Commit Graph

313 Commits

Author SHA1 Message Date
Jaya Allamsetty 40099e97ec
feat(Filmstrip): Reorder the visible participants in the filmstrip. (#9707)
* feat(Filmstrip): Reorder the visible participants in the filmstrip.
The participants are ordered alphabetically and the endpoints with screenshares, shared-videos and dominant speakers (in that order) are bumped to the top of the list. The local participant is also moved to the top left corner as opposed to the bottom right corner.

* squash: Implement review comments.

* squash: store alphabetically sorted list in redux and move shared videos to top.

* squash: Use the DEFAULT_REMOTE_DISPLAY_NAME from interfaceConfig for users without a display name.
2021-08-18 18:34:01 -04:00
Дамян Минков fbf9d489f0 fix: Fixes an error with configuration without analytics.
Fixes an error `Cannot convert undefined or null to object` on load.
2021-08-17 12:54:29 -05:00
Andrei Gavrilescu e45cab9a80
feat(transcribing): configurable transcription language (#9684)
* configurable transcription language

* merge conflict

* set default config value

* fix lint
2021-08-09 12:29:50 +03:00
Saúl Ibarra Corretgé 465e7f1458 fix(conference) unify conference options
Some options were missing on the mobile side, notably calltsts
enableDisplayNameInStats and enableEmailInStats. Now the same logic will be used
in web and mobile.
2021-08-04 15:32:03 +02:00
Hristo Terezov 0bdc7d42c5
feat: Participants optimisations (#9515)
* fix(participants): Change from array to Map

* fix(unload): optimise

* feat: Introduces new states for e2ee feature.

Stores everyoneSupportsE2EE and everyoneEnabledE2EE to minimize looping through participants list.

squash: Uses participants map and go over the elements only once.

* feat: Optimizes isEveryoneModerator to do less frequent checks in all participants.

* fix: Drops deep equal from participants pane and uses the map.

* fix(SharedVideo): isVideoPlaying

* fix(participants): Optimise isEveryoneModerator

* fix(e2e): Optimise everyoneEnabledE2EE

* fix: JS errors.

* ref(participants): remove getParticipants

* fix(participants): Prepare for PR.

* fix: Changes participants pane to be component.

The functional component was always rendered:
`prev props: {} !== {} :next props`.

* feat: Optimization to skip participants list on pane closed.

* fix: The participants list shows and the local participant.

* fix: Fix wrong action name for av-moderation.

* fix: Minimizes the number of render calls of av moderation notification.

* fix: Fix iterating over remote participants.

* fix: Fixes lint error.

* fix: Reflects participant updates for av-moderation.

* fix(ParticipantPane): to work with IDs.

* fix(av-moderation): on PARTCIPANT_UPDATE

* fix(ParticipantPane): close delay.

* fix: address code review comments

* fix(API): mute-everyone

* fix: bugs

* fix(Thumbnail): on mobile.

* fix(ParticipantPane): Close context menu on click.

* fix: Handles few error when local participant is undefined.

* feat: Hides AV moderation if not supported.

* fix: Show mute all video.

* fix: Fixes updating participant for av moderation.

Co-authored-by: damencho <damencho@jitsi.org>
2021-07-09 15:36:19 +03:00
tmoldovan8x8 0bd45a75d2
feat(replace-participant): Add replaceParticipant feature-flag 2021-06-16 14:08:18 +03:00
hmuresan 342dd4ceca feat(replace-participant): Replace participant with same jwt in the conf
- update lib-jitsi-meet to version with support for replacing participant
2021-06-15 14:24:12 +03:00
Andrei Gavrilescu 6ee868032e
fix(screenshare): remove redundant event / only show on supported env (#9100)
* remove redundant event / only show on supported env

* remove unused imports
2021-04-28 17:06:41 +03:00
Alex Bumbu cf37d34923 fix(ios) fix leaving the meeting when screen-sharing 2021-04-28 13:33:11 +02:00
Gabriel Imre d014a52ab3
feat(participants-pane) implement participants pane 2021-04-21 15:48:05 +02:00
Andrei Gavrilescu 6d3d65da03
feat(screenshare): Audio only screenshare (#8922)
* audio only screen share implementation

* clean up

* handle stop screen share from chrome window

* update icon
2021-04-12 10:37:39 +03:00
luz paz d3680bbebd fix(misc) follow-up typos
Found via `codespell -q 3 -S ./lang`
2021-03-22 10:41:41 +01:00
Jaya Allamsetty 5b21051c6b fix(startMuted): Fix unmute on mobile when it is muted by Jicofo on join. 2021-03-18 15:23:54 -04:00
hmuresan 3a8bd852b2 feat(jwt) log jwt validation errors 2021-03-18 16:58:54 +02:00
Jaya Allamsetty dcda89012e
fix(tracks): Do not signal muted audio tracks.
Do not add the muted audio tracks to peerconnection until the user unmutes the first time. This applies to startSilent, startWithAudioMuted and startAudioMuted/startVideoMuted config.js settings.
2021-03-05 10:18:34 -05:00
Steffen Kolmer 23bb824731
feat: Added mute video moderation feature (#8630)
* Added mute video feature

* Fixed export

* Fixed some issues

* Added remote video mute notification

* Fixed import

* Fixed conference event handling

* Fixed some linting issues

* Fixed more linter errors

* turn screenshare off on remote video mute

* Fix linter issue

* translations added for mute video feature

* Added video mute button to interface config

* Updated lib-jitsi-meet

* Fix copy paste error

Co-authored-by: nurjinn jafar <nurjin.jafar@nordeck.net>
2021-02-24 15:45:07 -06:00
Jaya Allamsetty 0138f23755
feat(conference): Enable forced reload of client on bridge failure.
* feat(conference): Enable forced reload of client on bridge failure.
Force the client to reload when the bridge that is handling the media goes down.
This mitigates issues seen on the bridge because of a client re-joining the call with the same endpointId, BWE issues, etc.
This behavior is configurable through 'enableForcedReload' setting in config.js.
The client skips the pre-join page when the page reloads.

* squash: refactor the restart logic.

* squash: fix description

* squash: dispatch conferenceWillLeave action before reload.
2021-02-04 12:33:18 -05:00
Andrei Gavrilescu 9895a04609
feat(rtcstats): send meeting uuid to rtcstats (#8526)
* send meeting uuid to rtcstats

* change ret description

* fix flow error

* update lib-jitsi-meet version
2021-02-03 12:28:39 +02:00
Hristo Terezov 51e381a0b1 ref(Thumbnail): Create React component. 2021-01-12 13:42:31 -06:00
Boris Grozev 2b6c7a51a3 cleanup: Remove unused code. 2020-12-01 08:32:26 -06:00
Titus-Andrei Moldovan 9a35026d6a feat(android) add screen-sharing support
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
Co-authored-by: zycwind <391321232@qq.com>
2020-11-04 14:45:16 +01:00
Saúl Ibarra Corretgé 2a01d3550c fix(conference) remove no longer needed code
There is no need for setting the availability of desktop sharing anymore. It can
now be detected on the spot.

The reson for the previous code was that way back when browser extensions were
needed, it was possible to start a conference without desktopo sharing support
and get it afterwards. This is no longer the case.
2020-11-03 16:15:01 +01:00
Hristo Terezov f45af351d8 ref(thumbnail): use connectionStatus from redux. 2020-10-29 12:05:40 -05:00
Saúl Ibarra Corretgé c5f6df5210 fix(avatar) remove participant's "avatarID"
Through several avatar work iterations it's no longer used.
2020-10-16 14:44:10 +02:00
Hristo Terezov b02d96231c ref(video-quality): Move all related code. 2020-09-09 18:04:17 -05:00
paweldomas d3d5847605 feat: configurable quality levels for video height
Allows to adjust thresholds which control the video quality level
in the thumbnail view.

Changes the default behaviour to request the SD (360p) resolution only
when the thumbnails are at least 360 pixels tall and the height of
720 is required for the high quality level.

The thresholds can be configured with the 'videoQuality.minHeightForQualityLvl'
config property. Check the description in the config.js for more details.
2020-08-20 11:07:36 -07:00
Hristo Terezov 55175e2e95 fix(subject): set to ' ' after settings change. 2020-08-20 10:48:06 -05:00
Saúl Ibarra Corretgé ce812591f9 conference: fix not applying max recv constraints
They also need to be applied when changing conferences.
2020-07-09 08:40:56 +02:00
Saúl Ibarra Corretgé 7d513738d2 rn,flags: add ability to override resolution using a flag
Also, use the configured resolution to set it as the max received frame size.
2020-07-09 08:40:56 +02:00
paweldomas 811ee40d99 ref(constants): use 720 for the high quality level
720 is requested by default for the local video stream
and when using the quality slider the resolution would
be increased to 1080.

Note that this will limit the receive quality to 720 as well,
because both send and receive constraints are changed at
the same time when the quality slider is used.
2020-06-23 14:50:00 +02:00
Saúl Ibarra Corretgé f230fd4d04 subject: avoid sending an extra empty subject update
When setSubject is called too early we store it as pensing, but thanks to the
default parameter value, if undefined is passed to the function we'll store the
empty string.

This will trigger a needless update because undefined !== ''.
2020-06-18 14:52:17 +02:00
Saúl Ibarra Corretgé eed57e7999 subject: only try to update the subject when the rol;e changes
Skip processing any other participant updates.
2020-06-18 14:52:17 +02:00
damencho 929622b27c fix: Fixes setting subject from url.
There are occasions when role to moderator can change a little bit after joining the room, and initial try to set subject will silently be ignored if not moderator.
2020-06-16 12:44:44 -05:00
Saúl Ibarra Corretgé 6e679f952f redux: refactor loading of middlewares and reducers
Up until now we relied on implicit loading of middlewares and reducers, through
having imports in each feature's index.js.

This leads to many complex import cycles which result in (sometimes) hard to fix
bugs in addition to (often) breaking mobile because a web-only feature gets
imported on mobile too, thanks to the implicit loading.

This PR changes that to make the process explicit. Both middlewares and reducers
are imported in a single place, the app entrypoint. They have been divided into
3 categories: any, web and native, which represent each of the platforms
  respectively.

Ideally no feature should have an index.js exporting actions, action types and
components, but that's a larger ordeal, so this is just the first step in
getting there. In order to both set example and avoid large cycles the app
feature has been refactored to not have an idex.js itself.
2020-06-16 11:24:15 +02:00
Bettenbuk Zoltan 29dc63fbcb ref: merge prejoin with lobby 2020-06-09 18:10:43 +02:00
Bettenbuk Zoltan 475a2ae596 feat: lobby feature
The lobby feature adds the possibility to lock a meeting and only allow people in after virtually knocking and going through formal approval
2020-06-09 18:10:43 +02:00
Gabriel Imre 444e2b90df callstats: add siteID passing; sanitize confID path 2020-05-28 10:00:45 -05:00
Bettenbuk Zoltan 0598e7369b ref: eslint-config-jitsi@1.0.3 2020-05-20 17:14:29 +02:00
Vlad Piersec a45cbf41ef feat(prejoin_page): Add prejoin page 2020-05-04 12:49:35 +02:00
Jaya Allamsetty b5676c3729 feat(video-quality):control sender resolution based on user pref 2020-04-28 10:17:06 -04:00
Hristo Terezov 94a15914d0 fix(document.title): use URL decoded room name. 2020-04-25 10:27:47 -05:00
Saúl Ibarra Corretgé cb6fbb0f03 e2ee: add UI elements
* Add dialog to set the E2EE key
* Use the Redux action / middleware to update the key even when set through the
  hash parameter
* Cleanup URL after processing the key so it's not recorded in browser history
2020-04-16 20:25:56 +02:00
Bettenbuk Zoltan a46fd60788 fix: accented room name display 2020-03-31 14:16:21 +02:00
Hristo Terezov 31d9fb12c8
ref(Filmstrip): Optimize resizes. (#4992)
* ref(Filmstrip): Optimize resizes.

* fix(thumbnails): resize.

* fix(thumbnails): Issue with height 0, width 0.

* doc(Filmstrip): Improve JSDoc.
2020-01-24 16:28:47 +00:00
theunafraid c2cf09a2ca Add conference timer (#4958) 2020-01-13 17:12:25 +00:00
paweldomas 6c3968a434 ref: remove features/base/conference -> /app cycle
Move call to reloadNow() on CONNECTION_FAILED to
the ./features/app/middleware to avoid importing higher order feature
from the lower level one.
2020-01-07 17:44:39 +00:00
Jaya Allamsetty 0a64bf2068 feat(presenter): add Presenter Mode
- Adds the ability to share video as a "PiP" when screenshare is in progress.
- Add a method for creating a local presenter track.
- Make sure isLocalVideoTrackMuted returns the correct mute state when only screenshare is present.
- Make sure we get the updated window size of the window being shared before painting it on the canvas.
- Make sure we check if the shared window has been resized
2019-11-26 11:57:03 +01:00
Bettenbuk Zoltan 8f0a12016a fix: return room lock conference, when there is no other 2019-11-20 13:28:47 +01:00
Bettenbuk Zoltan 8bd0da886e feat: safe decodeURIComponent 2019-11-15 15:18:20 +01:00
Дамян Минков 50f4796144
Adds an option to set email through iframe API init and to stats. (#4842)
* Adds an option to set email through iframe API init and to stats.

* Simplifies configuring email and displayName in stats.

Removes enableStatsID as not needed as when off we are sending as callstats id xmpp resource which is unique per call and id must be something that sticks between calls (callstatsUsername).

* Adds email and displayName in stats config for mobile.

* chore(deps): Updates lib-jitsi-meet to latest dd31f0a.

* Removes enableStatsID from config and whitelist.
2019-11-12 13:37:54 +00:00
Bettenbuk Zoltan 6e10ca5dd2 fix: chat error message 2019-10-09 18:35:09 +02:00
Bettenbuk Zoltan 13d78d6b49 fix: utf-8 room name case sensitivity 2019-10-08 10:35:19 +02:00
virtuacoplenny 55ff9dbe80
feat(api): expose method for playing touch tones (#4584) 2019-08-30 14:17:22 -07:00
Bettenbuk Zoltan c1598b7376 feat: make display name prompt platform independent 2019-08-26 22:20:22 +02:00
Saúl Ibarra Corretgé 5a934c071a logging: use individual, names loggers
React Native doesn't define __filename nor __dirname so do it artisanally. In
addition, this helps with centralizing the configuration passed to loggers.
2019-08-23 10:57:38 +02:00
Saúl Ibarra Corretgé 467c9d36cf audio-only,lastn: move audio-only and last N handling to standalone features
This refactors all handling of audio-only and last N to 2 features in preparation
for "low bandwidth mode".

The main motivation to do this is that lastN is a "global" setting so it helps
to have all processing for it in a single place.
2019-08-02 15:54:47 +02:00
Saúl Ibarra Corretgé 4d5332cadf rn,conference: log pin participant analytics events also on mobile 2019-07-30 17:11:43 +02:00
Saúl Ibarra Corretgé 5261f61110 conference: don't pin participants on the JVB
When a participant is pinned in the UI we then proceed to mark it as selected on
the JVB. This will make the participant part of the last N set and will receive
the highest (or configured highest) video quality.

Pinning a participant at the JVB level just makes sure it will be part of the
last N set.

Since only one participant can be pinned in the UI, there is no point in pinning
it at the JVB level, since selecting it already achieved the same result.
2019-07-30 17:11:43 +02:00
damencho 0e9e695251 Passes confID when initializing JitsiConference.
The confID is domain.com/RoomName or domain.com/tenant/RoomName, adds the tenant if any and also keeps the room name case.
2019-07-11 14:58:14 +01:00
virtuacoplenny 249dd7b8b8
fix(invite): decode the meeting name (#4411)
* fix(invite): decode the meeting name

* squash: try to make mobile join same encoded meeting name as web

* Decodes and generated texts for share and copy meeting info.

Decodes in all cases except when it contains a space, as it will generate wrong links when pasted/shared in external applications.
2019-07-10 10:27:11 -07:00
paweldomas 033aa0dd6e fix(base/conference/reducer): check if room is defined
This was hit on a corner case when ConnectionService will deny
the request to start the call. I am not sure, but it could have been
that the conference object has been disposed or closed or something
else, but the fact is that 'conference.room' was not defined and things
crashed. It is not safe to access conference's private field 'room'. It
is true JitsiConference doesn't follow the practice of marking this
field as private with the underscore '_', but it is not a public field.
2019-06-20 13:19:04 -05:00
Hristo Terezov a91b49c2c1 feat(reload): on offer / answer error. 2019-06-19 05:25:43 -07:00
Дамян Минков 6eb66b639e
Notify for kick and mute (#4328)
* Updates kick showing who kicked us.

* Notify participants that someone was kicked.

* Shows notification to user who is remotely muted.

* Updates the notification type.

* Muted by notification for mobile.

* Moves code to react and adds the kick notifications to mobile.

* Updates lib-jitsi-meet.
2019-06-17 16:00:09 +02:00
Saúl Ibarra Corretgé 579d291bca config: add ability to pass the subject as a URL parameter 2019-05-29 14:48:02 +02:00
Saúl Ibarra Corretgé 871026f4ba conference: clear the pending subject after it has been set 2019-05-29 14:48:02 +02:00
Saúl Ibarra Corretgé 9a8a070c62 rn: show conference subject if set 2019-05-29 14:48:02 +02:00
Saúl Ibarra Corretgé a4cf79c161 rn: fix losing audio if call is hangup too quickly
This PR changes the logic for connecting / disconnecting conferences. Instead of
doing it in mount / unmount events from the Conference component, it moves the
logic to the appNavigatee action.

This fixes a regression introduced in 774c5ecd when trying to make sure the
conference terminated event is always sent.

By moving the logic to appNavigate we no longer depend on side-effects for
connecting / disconnecting, and the code should be more maintainable moving
forward.

An improvement to this is the concept of sessions, which, while not tackled
here, was taken into consideration.
2019-05-23 15:16:31 +02:00
Saúl Ibarra Corretgé 774c5ecd18 rn: ensure the conference terminated event is always sent
Dear reader, I'm not proud at all of what you are about to read, but sometimes
life just gives you lemons, so enjoy some lemonade!

Joining a conference implies first creating the XMPP connection and then joining
the MUC. It's very possible the XMPP connection was made but there was no chance
for the conference to be created.

This patch fixes this case by artificially genrating a conference terminated
event in such case. In order to have all the necessary knowledge for this event
to be sent the connection now keeps track of the conference that runs it.

In addition, there is an even more obscure corner case: it's not impossible to
try to disconnect when there is not even a connection. This was fixed by
creating a fake disconnect event. Alas the location URL is lost at this point,
but it's better than nothing I guess.
2019-04-25 14:04:26 +02:00
virtuacoplenny c7013f5c4b
ref(follow-me): hook into redux (#3991)
Use subscribers to detect state change and emit those
out to other participants. Use middleware to register
the command listener.
2019-04-17 08:05:32 -07:00
paweldomas e839684ae9 fix(base/conference): tracks not added to the conference
If tracks are created while the conference is in the 'joining' state
they will never be added.
2019-03-27 10:06:59 +01:00
Saúl Ibarra Corretgé c025c7e132 flow: tame the beast
🔥🔥🔥
2019-03-21 14:47:55 +01:00
Saúl Ibarra Corretgé 0e92e73789 chore: use strings as action types
Using anything non-serializable for action types is discouraged:
https://redux.js.org/faq/actions#actions

In fact, this is the Flow definition for dispatching actions:

declare export type DispatchAPI<A> = (action: A) => A;
declare export type Dispatch<A: { type: $Subtype<string> }> = DispatchAPI<A>;

Note how the `type` field is defined as a subtype of string, which Symbol isn’t.
2019-03-21 14:47:55 +01:00
Hristo Terezov cb8e9eed5e feat(subject): UI 2019-03-12 23:03:58 +00:00
damencho fc129d9849 Adds setting subject and adding event on receiving such change. 2019-02-19 13:22:27 +00:00
Bettenbuk Zoltan 9f3ef43daa [RN] Add conference navigation bar 2019-02-06 14:27:25 +01:00
virtuacoplenny 6f57d58dd9
fix(participant): update local name only on explicit update (#3849)
Dominant speaker events can trigger local participant updates
without a display name. Do not update the name unless there
is an explicit update in the action.
2019-01-31 15:46:34 -08:00
damencho 4d440f5f64 Fixes showing video after waiting for owner. Fixes #3671. 2019-01-20 14:17:50 -08:00
Bettenbuk Zoltan 79209535ea Centralise display name normalisation 2019-01-16 11:03:29 +01:00
Bettenbuk Zoltan 82f714b608 Move display name handling into redux 2019-01-15 10:15:02 +01:00
Leonard Kim 8c9ba325ca fix(pinning): send a participant id on unpin
Analytics is erroring when unpinning because the logged
event sends null for the objectId. The objectId should
be the id of the person getting unpinned.
2019-01-15 09:58:45 +01:00
Bettenbuk Zoltan 3fdf944763 Fix eslint/jsdoc warnings (doc change only!) 2018-11-08 15:52:34 +01:00
Saúl Ibarra Corretgé 7162080d00 feat(flow): tame the beast 2018-10-10 18:07:36 +02:00
paweldomas 26d906fa46 feat(RN): displays transcription subtitles 2018-09-05 18:43:49 -05:00
paweldomas 6dea107bcd ref(conference.js): unify "user joined/left" handling on web and RN
Extracts methods which share the common logic. There are still some
leftovers on the web side left which are not used on RN. But this can be
a first step.
2018-09-05 18:43:49 -05:00
virtuacoplenny c353e9377f feat(tile-view): initial implementation for tile view (#3317)
* feat(tile-view): initial implementation for tile view

- Modify the classname on the app root so layout can adjust
  depending on the desired layout mode--vertical filmstrip,
  horizontal filmstrip, and tile view.
- Create a button for toggling tile view.
- Add a StateListenerRegistry to automatically update the
  selected participant and max receiver frame height on tile
  view toggle.
- Rezise thumbnails when switching in and out of tile view.
- Move the local video when switching in and out of tile view.
- Update reactified pieces of thumbnails when switching in and
  out of tile view.
- Cap the max receiver video quality in tile view based on tile
  size.
- Use CSS to hide UI components that should not display in tile
  view.
- Signal follow me changes.

* change local video id for tests

* change approach: leverage more css

* squash: fix some formatting

* squash: prevent pinning, hide pin border in tile view

* squash: change logic for maxReceiverQuality due to sidestepping resizing logic

* squash: fix typo, columns configurable, remove unused constants

* squash: resize with js again

* squash: use yana's math for calculating tile size
2018-08-08 13:48:23 -05:00
Bettenbuk Zoltan b41bf22be7 Replace console with logger 2018-08-05 17:04:19 -05:00
hristoterezov fb75180632 ref(RecentList): Improvements after review. 2018-08-03 11:25:03 -05:00
Leonard Kim 0b1224495b ref(video-quality): update video quality post redux update
Move away from middleware and instead update video quality
when the selected video quality updates in redux. This also
lead to removing of automatically exiting audio only because
with the change it's not so readily possible to tell if the
user switched off audio only by re-selecting the already
preferred video quality. Removing this automagic removed
some additional checking done for mobile.
2018-07-25 12:17:13 -07:00
Leonard Kim ee7d180cbb feat(video-quality): be able to set an internal max
The internal max will be used for tile view. Whatever the
user has set for preferred video quality, the internal
maximum will be respected. This allows for the case where
the user prefers high definition video, but in tile view
it only makes sense to send low definition; ux wise the
user is allowed to continue messing with the video quality
slider.
2018-07-25 12:17:13 -07:00
Leonard Kim 4d3383c620 ref(video-quality): rename receiveVideoQuality to preferredReceiverVideoQuality
- "preferred" is being appended because in tile view there is a
  concept of what the user prefers to be the maximum video quality
  but there is also a maximum respected internall. For example,
  the user may prefer HD, but in tile view the tiles may be small
  so internall the preferred would be set to LD.
- "receive" is being renamed to "receiver" to be consistent with
  the naming in lib-jitsi-meet.
2018-07-25 12:17:13 -07:00
Nik d3dd54ac3b Show subtitles when Jigasi sends transcription results in JSON (#1914)
* Show subtitles when Jigasi sends transcription results in JSON

* fix: Import PropTypes from prop-types.

* apply feedback on initial PR

* Changed Object to Map, alphabetic ordering fixes ,css changes in transcription subtitles

* Sends Map of transcriptMessages as prop to Component

* Documentation fixes and uses config in redux state

* Minor doc fix

* rename feature 'transcription' to 'subtitles'

* Moves subtitles config to interfaceConfig and minor fixes

* minor lint fix
2018-07-17 12:31:12 -05:00
Saúl Ibarra Corretgé 155e02bbfb core: refactor routing
Unfortunately, as the Jitsi Meet development evolved the routing mechanism
became more complex and thre logic ended up spread across multiple parts of the
codebase, which made it hard to follow and extend.

This change aims to fix that by rewriting the routing logic and centralizing it
in (pretty much) a single place, with no implicit inter-dependencies.

In order to arrive there, however, some extra changes were needed, which were
not caught early enough and are thus part of this change:

- JitsiMeetJS initialization is now synchronous: there is nothing async about
  it, and the only async requirement (Temasys support) was lifted. See [0].
- WebRTC support can be detected early: building on top of the above, WebRTC
  support can now be detected immediately, so take advantage of this to simplify
  how we handle unsupported browsers. See [0].

The new router takes decissions based on the Redux state at the time of
invocation. A route can be represented by either a component or a URl reference,
with the latter taking precedence. On mobile, obviously, there is no concept of
URL reference so routing is based solely on components.

[0]: https://github.com/jitsi/lib-jitsi-meet/pull/779
2018-07-11 22:58:41 -05:00
hristoterezov 769e782c6f feat(callee-info): Redesign. 2018-07-09 20:22:43 -05:00
virtuacoplenny 84b589719f fix(connection): reload immediately on possible split-brain (#3162)
* fix(connection): reload immediately on possible split-brain

There isn't an explicit way to know when a split brain
scenario has happened. It is assumed it arises when an
"item-not-found" connection error is encountered early
on in the conference. So, store when a connection has
happened so it be calculated how much time has
elapsed and if the threshold has not been exceeded
then do an immediate reload of the app instead of
showing the overlay with a reload timer.

* squash: rename isItemNotFoundError -> isShardChangedError
2018-07-02 16:22:51 -05:00
damencho 682169e44c Renames isBot -> isFakeParticipant. 2018-06-22 18:23:17 -05:00
Saúl Ibarra Corretgé 333a0f5f90 [RN] Handle presence
Up until now, mobile was oblivious to participants' presence state. Presence
state handling is required (probably, amongst other things) for "call flows".
So, let's add it! This is done by gathering the presence state when a
participant first joins, and handling subsequent changes.
2018-06-22 12:22:12 +02:00
Hristo Terezov 1f8fa3b6d4 Refactor settings modal (#3121)
* feat(settings): setting dialog

- Move device selection, profile edit, language select, moderator
  options, and server auth into one modal with tabs.
- Remove side panel profile and settings and logic used to update
  them.
- Pipe server auth status into redux to display in the settings
  dialog.
- Change filmstrip only device selection popup to use the new
  stateless settings dialog component.

* squash: do not show profile tab if not guest

* squash: profile button not clickable if no profile to show

* squash: nits

* ref: Settings dialog.
2018-06-20 13:19:53 -07:00
paweldomas 675eea7b99 fix(base/conference): do not execute leave conference on web
On web CONFERENCE_FAILED handlers are not setting the 'recoverable'
flag thus any middleware which rely on those should not execute on web.
2018-06-20 10:58:57 -05:00
Saúl Ibarra Corretgé 146ffb0918
Merge pull request #3153 from jitsi/connection_corner_cases
Connection corner cases
2018-06-20 16:53:48 +02:00
paweldomas 57b302da3e feat(base/conference): CONFERENCE_FAILED on CONNECTION_FAILED
Emits CONFERENCE_FAILED in response to CONNECTION_FAILED event
which then triggers JitsiConference.leave() through the middleware
processing. Also base/conference state will be adjusted. It is to have
a consistent redux state in which both connection and conference are
failed. It could happen that in a buggy environment the XMPP connection
is dropped, but the media is still flowing which would result in weird
user experience.
2018-06-20 15:52:46 +02:00
Daniel Ornelas ad259988b9 [RN] Fix for creating video track when conference is ending. 2018-06-20 11:24:07 +02:00
Дамян Минков ac834326e7
Token based features (#3075)
* Adds an option to disable features based on token data.

Reverts changes from b84e910086, removes disableDesktopSharing option and an interface_config option.

* Disable recording button based on token features data.

Hide recording if local participant isGuest and roles based on token.
When enableUserRolesBasedOnToken is enabled we were not hiding the record button for guests.

* Adds filtering of jibri iqs and rayo based on features.

Moves feature checking in separate utility function.
Renames utility method.

* Adds a footer text when outbound-call is not feature enabled.

* Fixes comments.
2018-06-15 13:10:22 -05:00
paweldomas dbd1091364 ref: use getCurrentConference
Try to use the getCurrentConference function wherever the indention is
to check for the current conference.
2018-05-30 16:29:27 +02:00
Saúl Ibarra Corretgé 4d21c28421 feat(conference): don't add hidden participants to redux
This includes recording agents, for example.
2018-05-30 12:13:32 +02:00
Lyubo Marinov 693b1c392f Fix joining a locked room 2018-05-29 23:13:01 -05:00
Saúl Ibarra Corretgé bbf505c076 ref(base/conference): simplify code
Simplify parts of the logic introduced in
11b7144ad0.

Specificaly, using all the state change avoiding functions doesn't give us much
since we need to copy the state for sure.
2018-05-29 23:13:01 -05:00
paweldomas 7186a9c79c fix(base/participants): ensure default local id outside of conference
Makes sure that whenever a conference is left or switched, the local
participant's id will be equal to the default value.

The problem fixed by this commit is a situation where the local
participant may end up sharing the same ID with it's "ghost" when
rejoining a disconnected conference. The most important and easiest to
hit case is when the conference is left after the CONFERENCE_FAILED
event.

Another rare and harder to encounter in the real world issue is
where CONFERENCE_LEFT may come with the delay due to it's asynchronous
nature. The step by step scenario is as follows: trying to leave a
conference, but the network is not doing well, so it takes time,
requests are timing out. After getting back to the welcome page the
the CONFERENCE_LEFT has not arrived yet. The same conference is joined
again and the load config may timeout, but it will be read from the
cache. Now the network gets better and conference is joining which
results in our ghost participant added to the redux state. At this point
there's the root issue: two participants with the same id, because the
local one was neither cleared nor set to the new one yet
(PARTICIPANT_JOINED come, before CONFERENCE_JOINED where we adjust the
id). Then comes CONFERENCE_JOINED and we try to update our local id.
We're updating the ID of both ghost and local participant. It could be
also that the delayed CONFERENCE_LEFT comes for the old conference, but
it's too late and it would update the id for both participants.

The approach here reasons that the ID of the local participant
may be reset as soon as the local participant and, respectively, her ID
is no longer involved in a recoverable JitsiConference of interest to
the user and, consequently, the app.

Co-authored-by: Pawel Domas <pawel.domas@jitsi.org>
Co-authored-by: Lyubo Marinov <lmarinov@atlassian.com>
2018-05-29 13:44:06 +02:00
paweldomas 11b7144ad0 ref(base/conference): clear the 'conference' field on WILL_LEAVE
Pawel Domas said:
The conference state field is referring to the current conference in
progress, so it feels like this field should be cleared as soon as we
declare that the conference is being left and the asynchronous process
of leaving the conference starts (which happens on
CONFERENCE_WILL_LEAVE).

Lyubo Marinov said:
Merely setting conference to undefined is incomplete because there are
other redux state properties associated with conference.

What we're doing here is redefining the redux action
CONFERENCE_WILL_LEAVE:

The redux action CONFERENCE_WILL_LEAVE represents the order of the user
to leave a JitsiConference instance. From the user's perspective, there's
no going back (with respect to the instance itself). The app will perform
due clean-up like leaving the associated room, but the instance is no
longer the focus of the attention of the user and, consequently, the app.

Now CONFERENCE_LEFT and CONFERENCE_WILL_LEAVE have more in common than
before and we can do a much better job by expressing the common parts in
source code. Additionally, our source code can be rewritten to better
express the meaning of any of these two actions.

Co-authored-by: Pawel Domas <pawel.domas@jitsi.org>
Co-authored-by: Lyubo Marinov <lmarinov@atlassian.com>
2018-05-29 12:24:39 +02:00
Lyubo Marinov 771d60f954 Associate remote participant w/ JitsiConference (_UPDATED)
The commit message of "Associate remote participant w/ JitsiConference
(_JOINED)" explains the motivation for this commit.

Practically, _JOINED and _LEFT combined with "Remove remote participants
who are no longer of interest" should alleviate the problem with
multiplying remote participants to an acceptable level of annoyance.

Technically though, a remote participant cannot be identified by an ID
only. The ID is (somewhat) "unique" in the context of a single
JitsiConference instance. So in order to not have to scratch our heads
over an obscure corner, racing case, it's better to always identify
remote participants by the pair id-conference. Unfortunately, that's a
bit of a high order given the existing source code. So I've implemented
the cases which are the easiest so that new source code written with
participantUpdated is more likely to identify a remote participant with
the pair id-conference.

Additionally, the commit "Reduce direct read access to the
features/base/participants redux state" brings more control back to the
functions of the feature base/participants so that one day we can (if we
choose to) do something like, for example:

If getParticipants is called with a conference, it returns the
participants from features/base/participants who are associated with the
specified conference. If no conference is specified in the function
call, then default to the conference which is the primary focus of the
app at the time of the function call. Added to the above, this should
allow us to further reduce the cases in which we're identifying remote
participants by id only and get us even closer to a more "predictable"
behavior in corner, racing cases.
2018-05-23 09:46:15 -05:00
Lyubo Marinov 37cd5bb5b9 Associate remote participant w/ JitsiConference (_LEFT)
The commit message of "Associate remote participant w/ JitsiConference
(_JOINED)" explains the motivation for this commit.
2018-05-23 09:46:15 -05:00
Lyubo Marinov 983e62ffe9 Associate remote participant w/ JitsiConference (_JOINED)
The plan set in motion here is to associate remote participants with the
JitsiConference instances that created them in order to be able to
remove remote participants when a JitsiConference is no longer the
primary focus of the jitsi-meet app. And that's supposed to alleviate a
problem with multiplying remote thumbnails.

Doing all of the above in a single commit is a bit of a high order. So
I'm splitting the whole into multiple successive commits for the
purposes of observability, comprehension. Each commit is supposed to be
safe even if subsequent commits are not accepted, are reverted,
whatever. Obviously, without the successive commits, a commit may be
"unused".

One of the important pieces of the multiplying remote thumbnails "fix"
offered is removing remote participants who are no longer of interest
i.e. PARTICIPANT_LEFT. But in order for _LEFT to be implemented, _JOINED
must be implemented first.
2018-05-23 09:44:26 -05:00
Lyubo Marinov 22ce001f14 Coding style: commends, formatting, sorting order 2018-05-20 22:58:34 -05:00
paweldomas 9650404099 fix(base/conference): leave a failed conference
Because a conference can fail before or after it's joined it must be
"left" in order to release any allocated resources like peerconnections,
tracks and all the other things.
2018-05-20 21:23:25 -05:00
zbettenbuk 008645568c Fix startAudioOnly and startWithVideoMuted collision on start from URL
Zoltan Bettenbuk suggested the following:

         const state = getState();

          if (desiredTypes.length === 0) {
 -            const { audio, video } = state['features/base/media'];
 -
 -            audio.muted || desiredTypes.push(MEDIA_TYPE.AUDIO);
 -            video.muted || desiredTypes.push(MEDIA_TYPE.VIDEO);
 +            const startAudioOnly = getPropertyValue(state, 'startAudioOnly');
 +            const startWithAudioMuted
 +                = getPropertyValue(state, 'startWithAudioMuted');
 +            const startWithVideoMuted
 +                = getPropertyValue(state, 'startWithVideoMuted');
 +
 +            if (!startWithAudioMuted) {
 +                desiredTypes.push(MEDIA_TYPE.AUDIO);
 +            }
 +            if (!startAudioOnly && !startWithVideoMuted) {
 +                desiredTypes.push(MEDIA_TYPE.VIDEO);
 +            }
          }

          const availableTypes

The final commit is really a different implementation of the same idea
but takes into account that the state of base/media already contains the
intent of the URL and notices the delay in the realization of the
background app state.

Additionally, unbreaks one more case where setAudioOnly is incorrectly
dispatched on CONFERENCE_LEFT or CONFERENCE_FAILED and, consequently,
overrides the intent of the URL.
2018-04-16 22:02:37 -05:00
paweldomas 6f11bbc400 feat(mobile): handle kicked out of the conference
Being kicked out of the conference will result with a conference failed
event with 'conference.kicked' reason and take the user back to
the welcome page by navigating to 'undefined'.
2018-04-03 16:02:15 -05:00
Leonard Kim d93782af8a feat(new-toolbars): initial implementation 2018-03-27 00:54:30 -05:00
Lyubo Marinov a30412ba65 [RN] Automatically dispatch CONFERENCE_LEFT 2018-03-04 19:28:44 -06:00
Leonard Kim ce6e8472f0 Revert "fix(hangup): destroy local tracks on conference leave (#2502)"
This reverts commit 88325aeef2.
Turns out a conference with a password triggers a failed conference
join. It's going to be tricky to decipher when to do actual
cleanup, and where to shove that code, so reverting is easier for
now.
2018-03-01 14:07:30 -06:00
Lyubo Marinov d727ee80b2 [RN] Fix base/profile and recent-list bugs 2018-02-27 20:52:34 -06:00
virtuacoplenny 88325aeef2 fix(hangup): destroy local tracks on conference leave (#2502)
Destroy local tracks and also destroy large video so the
user does not wonder why camera (and mic) are still enabled
even though hangup has been pressed.
2018-02-26 21:10:49 -08:00
Lyubo Marinov 9f69c4d730 Grow features/settings from features/app-settings and features/settings-menu 2018-02-26 19:19:01 -06:00
zbettenbuk 04690dfc8f Facelift Welcome screen 2018-02-26 18:39:48 -06:00
Lyubo Marinov 10f72f8e40 [RN] Unpin participant and set last N to 1 if the filmstrip is disabled (Coding style: consistency) 2018-02-13 11:58:26 -06:00
Saúl Ibarra Corretgé c087e90099 [RN] Fix setReceivedVideoQuality if we are not yet in a conference
It may happen that such action is fired while joining.
2018-02-02 14:33:49 -06:00
Saúl Ibarra Corretgé da0ae73d10 [RN] Fix pinParticipant if we are not yet in a conference
It may happen that such action is fired while joining.
2018-02-02 14:32:15 -06:00
bgrozev 090f2f9ccb Restructures the analytics events (#2333)
* ref: Restructures the pinned/unpinned events.

* ref: Refactors the "audio only disabled" event.

* ref: Refactors the "stream switch delay" event.

* ref: Refactors the "select participant failed" event.

* ref: Refactors the "initially muted" events.

* ref: Refactors the screen sharing started/stopped events.

* ref: Restructures the "device list changed" events.

* ref: Restructures the "shared video" events.

* ref: Restructures the "start muted" events.

* ref: Restructures the "start audio only" event.

* ref: Restructures the "sync track state" event.

* ref: Restructures the "callkit" events.

* ref: Restructures the "replace track".

* ref: Restructures keyboard shortcuts events.

* ref: Restructures most of the toolbar events.

* ref: Refactors the API events.

* ref: Restructures the video quality, profile button and invite dialog events.

* ref: Refactors the "device changed" events.

* ref: Refactors the page reload event.

* ref: Removes an unused function.

* ref: Removes a method which is needlessly exposed under a different name.

* ref: Refactors the events from the remote video menu.

* ref: Refactors the events from the profile pane.

* ref: Restructures the recording-related events.

Removes events fired when recording with something other than jibri
(which isn't currently supported anyway).

* ref: Cleans up AnalyticsEvents.js.

* ref: Removes an unused function and adds documentation.

* feat: Adds events for all API calls.

* fix: Addresses feedback.

* fix: Brings back mistakenly removed code.

* fix: Simplifies code and fixes a bug in toggleFilmstrip

when the 'visible' parameter is defined.

* feat: Removes the resolution change application log.

* ref: Uses consistent naming for events' attributes.

Uses "_" as a separator instead of camel case or ".".

* ref: Don't add the user agent and conference name

as permanent properties. The library does this on its own now.

* ref: Adapts the GA handler to changes in lib-jitsi-meet.

* ref: Removes unused fields from the analytics handler initializaiton.

* ref: Renames the google analytics file and add docs.

* fix: Fixes the push-to-talk events and logs.

* npm: Updates lib-jitsi-meet to 515374c8d383cb17df8ed76427e6f0fb5ea6ff1e.

* fix: Fixes a recently introduced bug in the google analytics handler.

* ref: Uses "value" instead of "delay" since this is friendlier to GA.
2018-01-03 13:24:07 -08:00
Leonard Kim f0a180cf0c fix(display-name): listen for display name changes
Make sure participants in the redux store have updated names.
This will be needed for showing avatars with user initials.
2017-12-19 17:13:10 -06:00
damencho 2f3ea1b458 [Android] Add module that provides getWiFiStats 2017-12-19 11:07:11 +01:00
Saúl Ibarra Corretgé 87a87eebb9 [RN] Add reload overlay in case of connection / conference errors 2017-12-12 22:58:46 -06:00
virtuacoplenny 9b67e796bd ref(analytics): centralize all event names (#2272)
* ref(analytics): centralize all event names

* squash: fix typo and alpha ordering

* squash: rename file to AnalyticsEvents to parallel lib-jitsi-meet
2017-12-11 12:48:32 -06:00
Leonard Kim c9b54845d9 ref(settings): convert panel to react
The goal is to reduce usage on atlassian/aui. New components
have been created to display the settings panel. Language
selection will reach into i18n for state whereas moderator
options will keep state in redux.
2017-12-04 16:19:18 -06:00
Lyubo Marinov 0eafee2a95 feat(errors): fix error handling for connection and conference 2017-12-04 16:01:28 -06:00
Saúl Ibarra Corretgé de0d69a20e feat(errors): fix error handling for connection and conference
Properly handle errors while connecting or joining a conference. Prior to this
patch, only errors on established conferences / connections were saved to the
redux store.
2017-12-04 15:52:52 -06:00
Lyubo Marinov 569b3547c8 Upgrade NPM dependencies/packages: react-native 0.50 2017-12-04 00:45:18 -06:00
Saúl Ibarra Corretgé d0859b3ce1 feat(conference): store conference errors in redux 2017-11-27 17:45:11 -06:00
Дамян Минков 7b1b873b6e VideoSIPGW updates (#2201)
* Adds initial documentation for sipgw jibri.

Also explains enabling the people search service and the request/response that are made around sipgw jibri service.

* Fixes add people dialog to invite users and rooms.

No invitation is sent when there is nobody to invite.

* Reuse some recording strings, by using arguments.

* Make sure web also dispatches CONFERENCE_WILL_JOIN.

* Introduces new feature videosipgw.

* Fixes lint errors.

* Renames methods to use people, chatRooms and videoRooms.

* Updates to latest lib-jitsi-meet (dc3397b18b).
2017-11-21 14:45:14 -08: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
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 0b50578de9 style(analytics): sendEvent -> sendAnalyticsEvent 2017-10-17 19:33:32 -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
Lyubo Marinov 2d73e9ace4 Flow, coding style 2017-10-09 10:39:31 -05:00
Lyubo Marinov c98e7a204c CONFERENCE_FAILED error as object 2017-10-05 13:25:17 -05:00
Lyubo Marinov f53c79ab24 Flow, coding style 2017-10-05 13:25:17 -05:00