Compare commits

...

76 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
d2521bc67a feat(android) bump minimum API level to 24
Some of our dependencies (most notably WebRTC) have dropped it and we
can no longer claim to support API level 23).
2023-05-01 11:06:44 +02:00
damencho
38a293f8f6 fix(chat): Fixes long display name that overflow the message bubble. 2023-04-28 13:31:14 -05:00
damencho
13e8f992b5 fix(chat): White square when both scrolls are visible. 2023-04-28 13:31:14 -05:00
damencho
c384d0d3a9 Revert "fix(chat) Make the name fit the chat bubble"
This reverts commit e56c7070c2.
2023-04-28 13:31:14 -05:00
Дамян Минков
2b71fa512b feat: Adds conference duration to the amplitude stat. (#13294) 2023-04-28 11:09:13 -05:00
damencho
d381ceb040 feat: Shows html in notification warning. 2023-04-27 12:42:28 -05:00
damencho
e18c428f52 fix: Hide virtual background for unsupported browsers from vide preview. 2023-04-27 12:42:12 -05:00
Gabriel Borlea
9fc32dc59b fix: multiselect for invite people (#13287)
* fix: multiselect duplicates

* set multiselect height to 200px
2023-04-27 10:14:16 -05:00
robertpin
6f45622ef1 fix(dialog) Fix close animation moves whole body 2023-04-27 10:06:17 -05:00
robertpin
e56c7070c2 fix(chat) Make the name fit the chat bubble 2023-04-27 09:40:27 -05:00
damencho
0aef7a36aa fix: Fixes unresolved function. 2023-04-27 09:25:07 -05:00
damencho
c030cf941e feat: Implements amplitude events for messages count. 2023-04-27 09:24:59 -05:00
Robert Pintilii
f6760e4ac7 fix(chat) Focus input on chat open (#13285) 2023-04-27 17:23:47 +03:00
Robert Pintilii
9060c77307 ref(TS) Convert some native components to TS (#13266) 2023-04-27 08:44:20 +03:00
Дамян Минков
a1d018eef4 feat: Disables sending localstats in visitor mode. (#13279) 2023-04-27 07:38:57 +02:00
Jaya Allamsetty
3f724d8fb7 fix(visitors) Do not add tracks in redux to conference. 2023-04-26 16:51:19 -04:00
Jaya Allamsetty
49d69a5a02 chore(deps) lib-jitsi-meet@latest
https://github.com/jitsi/lib-jitsi-meet/compare/v1623.0.0+c520877a...v1624.0.0+e3a8472f
2023-04-26 13:04:01 -04:00
damencho
6db9e42876 fix: Allows jicofo entering rooms without requiring a password.
The case where the main room is locked and everyone leaves it to a breakout room and then coming back allows jicofo entering without a password.
2023-04-26 09:04:55 -05:00
Jaya Allamsetty
ad3e8f9f53 chore(deps) lib-jitsi-meet@latest
https://github.com/jitsi/lib-jitsi-meet/compare/v1620.0.0+7f0012f7...v1623.0.0+c520877a
2023-04-26 09:26:34 -04:00
Mihaela Dumitru
9f39caa247 feat(external-api) support assumed bandwidth bps config and command (#13164) 2023-04-26 15:32:53 +03:00
Avram Tudor
1402a63324 ref(keyboard-shortcuts) refactor keyboard shortcuts to use redux (#13260)
* ref(keyboard-shortcuts) refactor keyboard shortcuts to use redux

fix unsynced default value between config flag and local storage

* code review

* fix build
2023-04-26 11:21:42 +03:00
robertpin
a9863e65c3 fix(dial-in) Make text selectable on Dial In page 2023-04-25 19:41:27 -05:00
Robert Pintilii
646c58f7d1 ref(TS) Convert some native components to TS (#13264) 2023-04-25 13:50:52 +03:00
Дамян Минков
a78ea7ca9c fix: Updates the option for disabling iframe to show a warning. (#13263)
* fix: Updates the option for disabling iframe to show a warning.

It will give a timeout of 5 mins for the conference, before navigating away from it.

* squash: Fix lint error.

* squash: Fix mobile build.
2023-04-24 14:59:25 -05:00
Robert Pintilii
8b8565bf60 ref(TS) Convert some native components to TS (#13259) 2023-04-24 20:14:02 +03:00
Saúl Ibarra Corretgé
b9e30f3c1b ref(android) remove unused code
This basically reverts
e61ccc956f
since we are no longer interested in using Detox.

In addition, the WebRTC initialization code was only placed in the RAN
instance manager holder's App initialization path, which is now gone, so
add it to the Activity initialization path.
2023-04-24 14:08:50 +02:00
Robert Pintilii
96b6edccf8 ref(TS) Remove flow comments in TS files (#13258) 2023-04-24 14:49:56 +03:00
Robert Pintilii
2af9dc88e6 ref|(TS) Convert some native components to TS (#13239) 2023-04-24 14:09:50 +03:00
Robert Pintilii
eda25ca3c9 fix(toolbar) Remove focus on hide (#13256) 2023-04-24 14:07:42 +03:00
Amga
c99da17973 fix(lang) update Mongolian translation 2023-04-24 11:58:07 +02:00
Saúl Ibarra Corretgé
9e147d7842 fix(android) fix JitsiMeetActivity.onDestroy not leaving the room
When we refactored the external API to use broadcast actions leave() was
changes to use the hangup broadcast action.

This mechanism does not seem to work while onDestroy is getting
executed, however.

There is another way to accomplish the same, for the particular case of
hangup: to pass empty props to the running RN application. This was the
previous behavior too.

This PR introduces a new abort() method on JitsiMeetView, which does
exactly that, passes empty props to RN. This allows cleanup to happen
and the meeting properly ends when the activity is swipped from the
recents list.

Fixes: https://github.com/jitsi/jitsi-meet/issues/13175
2023-04-24 10:14:06 +02:00
Jaya Allamsetty
d7afaf871f fix(visitor): Do not add media tracks in visitor mode.
When gUM resolves after the user has joined as a visitor, skip adding the local tracks to the conference.
2023-04-21 15:25:21 -04:00
Calin-Teodor
c4f6d37aa1 feat(conference): fixed raisedhandcountlabel and filmstrip conflict 2023-04-21 15:58:51 +03:00
Calinteodor
a5663872d9 feat(invite/native): add people functionality fixes (#13240)
feat(invite/native): add people functionality fixes
2023-04-21 14:13:25 +03:00
Robert Pintilii
007283aab3 chore(deps) Cleanup (#13246)
Remove @atlaskit and styled-components
Upgrade @emotion and @mui packages
Move @types packages to devDeps
2023-04-21 10:11:56 +03:00
Saúl Ibarra Corretgé
3b612376f2 chore(deps,giphy) update @giphy/react-components (#13243)
Also update the patches to match the new package versions.
2023-04-21 09:31:50 +03:00
Amga
1a312e2140 lang: update translation for mongolian language (#13237) 2023-04-20 22:46:15 -05:00
Saúl Ibarra Corretgé
6f5d0400b8 fix(deps) override xmldom dependency from strophe.js
lib-jitsi-meet does not bundle xmldom anyway, and we are providing it
here. strophe seems to be stuck in a slightly old version which creates
spurious security warnings.
2023-04-20 19:13:43 +02:00
Gabriel Borlea
aec86cecc0 ref(invite): add people form (#13207) 2023-04-20 14:00:42 +03:00
Robert Pintilii
bf1dde7cd1 ref(TS) Convert some files to TS (#13223) 2023-04-20 12:06:45 +03:00
Calin-Teodor
91e9005f08 feat(base/config): commented out mobile codecs override 2023-04-20 11:49:26 +03:00
Дамян Минков
57f9ea2865 feat: Adds an option to disable iframeAPI. (#13235)
* feat: Adds an option to disable iframeAPI.

* squash: Use utility.
2023-04-19 16:56:32 -05:00
damencho
1f6425fbfd fix: Fix handling visitor messages and msgs limits module. 2023-04-19 08:55:58 -05:00
damencho
e169979bab fix: Fix logs to use module logger.
When using log in the log file is printed 'general' instead of the module that logs it.
2023-04-19 08:55:58 -05:00
Mihaela Dumitru
6e9e9c9a6a fix(whiteboard/pinning) mark whiteboard participant as pinned in the active participant logic (#13232) 2023-04-19 16:37:31 +03:00
Jaya Allamsetty
102a369bca chore(deps) lib-jitsi-meet@latest
https://github.com/jitsi/lib-jitsi-meet/compare/v1619.0.0+c8d76d4a...v1620.0.0+7f0012f7
2023-04-18 23:41:21 -04:00
Дамян Минков
b318b987a7 feat: Adds a module for restricting number of messages in a room. (#13229)
* feat: Adds a module for restricting number of messages in a room.

* squash: Adds logic to reload config.

* squash: Ignore polls-answers.

* squash: Rename variables.
2023-04-18 16:42:53 -05:00
George Politis
78ce68160a fix: Reinitialize rtcstats when the config changes (#13181)
* fix: Reinitialize rtcstats when the config changes

The mobile app does not exit after the user has left the meeting. This
means we need to re-initialize rtcstats every time a user joins a call to
be sure we are using the correct deployment information.

* Wrap the sendStats method.

* Uses lighter syntax.

* Fixes the linter and adds a warning.

* Bind the `statsEntry` callback to `this`.

* Removes obsolette comment.
2023-04-18 13:48:30 -07:00
Jaya Allamsetty
6aff616af4 fix(mobile) Do not disableAudioLevels on RN since it uses feature detection now (#13226)
* fix(mobile) Do not disableAudioLevels on RN since it uses feature detection now.
Local and remote audio levels will automatically be disabled on RN since receiver stats and local audio stats are not supported there.
2023-04-18 13:55:31 -04:00
Jaya Allamsetty
0140a49641 chore(deps) lib-jitsi-meet@latest
https://github.com/jitsi/lib-jitsi-meet/compare/v1617.0.0+faeff49a...v1619.0.0+c8d76d4a
2023-04-18 13:54:54 -04:00
damencho
732754c566 feat: Module to expose turn credentials via http endpoint. 2023-04-18 11:07:35 -05:00
Saúl Ibarra Corretgé
b360a9e572 fix(build) drop unused file
Also generalize the lib-jitsi-meet files rule so it can also work with
development (unminimized) builds.
2023-04-18 17:19:59 +02:00
Saúl Ibarra Corretgé
f88fa81616 deps(rn) update react-native-webrtc to version 111.0.0
Adapt to changes in the Android plugin initialization.

Leverage the new module initialization to simplify enabling WebRTC
logging.
2023-04-18 17:11:04 +02:00
Calin-Teodor
e0e66119f5 fix(google-api): sign out button label on smaller devices 2023-04-18 17:03:19 +03:00
Calinteodor
ba4784f149 feat(subtitles): rework feature (#12484)
* feat(subtitles): separated web from native and created native subtitles screen
2023-04-18 16:01:34 +03:00
Saúl Ibarra Corretgé
7fb7c3de9c chore(deps) update xmldom to the latest version 2023-04-18 13:46:37 +02:00
Saúl Ibarra Corretgé
3d2d449d31 chore(deps) react-native-google-signin@latest
Updates the Google SignIn SDK to the latest.
2023-04-18 13:16:09 +02:00
Saúl Ibarra Corretgé
ca60c33dda fix(ios) disable CallKit when running in the simulator
It doesn't actually work on the simulator but it never caused trouble...
until iOS 16.4 (or maybe earlier). Disable it.
2023-04-18 10:58:42 +02:00
damencho
162512496a feat: Module to rate limit based on sent stanzas via ip. 2023-04-17 18:09:16 -05:00
damencho
7819c97839 feat: Module to kick jigasi from a meeting via http endpoint. 2023-04-17 18:09:16 -05:00
damencho
e9c8603c3c feat: Module to invite jigasi to a meeting via http endpoint. 2023-04-17 18:09:16 -05:00
damencho
9e165c337a feat: Module to ban users based on external service. 2023-04-17 18:09:16 -05:00
damencho
58af1b98c0 feat: Module to provide http endpoint for ending a meeting. 2023-04-17 18:09:16 -05:00
damencho
6a077333c6 feat: Module to hide rooms for some queries. 2023-04-17 18:09:16 -05:00
damencho
cb234e6b1b feat: Module to flip devices. 2023-04-17 18:09:16 -05:00
damencho
67a9f35176 feat: Module to restrict muc access. 2023-04-17 18:09:16 -05:00
Jaya Allamsetty
9396e8b0c0 chore(deps) lib-jitsi-meet@latest
https://github.com/jitsi/lib-jitsi-meet/compare/v1615.0.0+a23a8c7c...v1617.0.0+faeff49a
2023-04-17 16:46:13 -04:00
dependabot[bot]
200d857012 chore(deps-dev): bump webpack from 5.57.1 to 5.76.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.57.1 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.57.1...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 09:50:18 +02:00
Christoph Settgast
1a22b7d0dd fix(desktop-picker): Populate list of desktop app windows to share
Fix bug introduced via #12994 where id was changed and "-tab" was appended. Due to this the selected tab was not anymore working and empty object was returned here: 05da37b56d/react/features/desktop-picker/components/DesktopPicker.tsx (L270)

Originally part of #13096 by @dudumanbogdan, but pulled ahead to fix application
window sharing via Electron desktop app.

Fixes: jitsi/jitsi-meet-electron#857
2023-04-13 23:12:37 -05:00
Calin-Teodor
035cccb97b fix(toolbox): imports 2023-04-14 00:05:25 +03:00
Saúl Ibarra Corretgé
ca1c00acb0 feat(external-api) drop iframe sandbox
It has created more trouble than it sat to solve, I'm dropping it for
now so we can re-evaluate.
2023-04-13 10:30:15 -05:00
Robert Pintilii
8836669c9f ref(audio-picker) Styles refactor (#13193)
Move styles from SCSS to JSS
Convert components from class to function
2023-04-13 16:41:16 +03:00
Robert Pintilii
13e818e135 ref(TS) Convert some native components to TS (#13203) 2023-04-13 15:49:51 +03:00
Robert Pintilii
fc0fd2d08c ref(TS) Convert some components to TS (#13198) 2023-04-13 15:49:34 +03:00
Robert Pintilii
cc91cfe7b5 ref: Styles refactor (#13196)
Move some styles from SCSS to JSS
Remove unnecessary styles
Remove feedback stars animation option
2023-04-13 15:49:15 +03:00
Robert Pintilii
33564a311b ref(video-picker) Styles refactor (#13206)
Move styles from SCSS to JSS
Convert a component from class to function
2023-04-13 13:22:30 +03:00
481 changed files with 8062 additions and 8038 deletions

View File

@@ -63,10 +63,7 @@ deploy-appbundle:
deploy-lib-jitsi-meet:
cp \
$(LIBJITSIMEET_DIR)/dist/umd/lib-jitsi-meet.min.js \
$(LIBJITSIMEET_DIR)/dist/umd/lib-jitsi-meet.min.map \
$(LIBJITSIMEET_DIR)/dist/umd/lib-jitsi-meet.e2ee-worker.js \
$(LIBJITSIMEET_DIR)/modules/browser/capabilities.json \
$(LIBJITSIMEET_DIR)/dist/umd/lib-jitsi-meet.* \
$(DEPLOY_DIR)
deploy-olm:

View File

@@ -7,7 +7,6 @@
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:name=".MainApplication"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme">
<meta-data

View File

@@ -1,47 +0,0 @@
/*
* Copyright @ 2022-present 8x8, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jitsi.meet;
import android.app.Application;
import android.util.Log;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import org.jitsi.meet.sdk.JitsiReactNativeHost;
/**
* Application class for Jitsi Meet. The only reason why this exists is for Detox
* to believe our app is a "greenfield" app. SDK users need not use this.
*/
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new JitsiReactNativeHost(this);
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
// Initialize RN
Log.d(this.getClass().getCanonicalName(), "app onCreate");
getReactNativeHost().getReactInstanceManager();
}
}

View File

@@ -19,7 +19,7 @@ buildscript {
ext {
buildToolsVersion = "31.0.0"
compileSdkVersion = 32
minSdkVersion = 23
minSdkVersion = 24
targetSdkVersion = 32
supportLibVersion = "28.0.0"

View File

@@ -1,46 +0,0 @@
/*
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
package org.jitsi.meet.sdk;
import org.webrtc.VideoCodecInfo;
import java.util.Map;
import java.util.HashMap;
/** Container for static helper functions related to dealing with H264 codecs. */
class H264Utils {
public static final String H264_FMTP_PROFILE_LEVEL_ID = "profile-level-id";
public static final String H264_FMTP_LEVEL_ASYMMETRY_ALLOWED = "level-asymmetry-allowed";
public static final String H264_FMTP_PACKETIZATION_MODE = "packetization-mode";
public static final String H264_PROFILE_CONSTRAINED_BASELINE = "42e0";
public static final String H264_PROFILE_CONSTRAINED_HIGH = "640c";
public static final String H264_LEVEL_3_1 = "1f"; // 31 in hex.
public static final String H264_CONSTRAINED_HIGH_3_1 =
H264_PROFILE_CONSTRAINED_HIGH + H264_LEVEL_3_1;
public static final String H264_CONSTRAINED_BASELINE_3_1 =
H264_PROFILE_CONSTRAINED_BASELINE + H264_LEVEL_3_1;
public static Map<String, String> getDefaultH264Params(boolean isHighProfile) {
final Map<String, String> params = new HashMap<>();
params.put(VideoCodecInfo.H264_FMTP_LEVEL_ASYMMETRY_ALLOWED, "1");
params.put(VideoCodecInfo.H264_FMTP_PACKETIZATION_MODE, "1");
params.put(VideoCodecInfo.H264_FMTP_PROFILE_LEVEL_ID,
isHighProfile ? VideoCodecInfo.H264_CONSTRAINED_HIGH_3_1
: VideoCodecInfo.H264_CONSTRAINED_BASELINE_3_1);
return params;
}
public static VideoCodecInfo DEFAULT_H264_BASELINE_PROFILE_CODEC =
new VideoCodecInfo("H264", getDefaultH264Params(/* isHighProfile= */ false));
public static VideoCodecInfo DEFAULT_H264_HIGH_PROFILE_CODEC =
new VideoCodecInfo("H264", getDefaultH264Params(/* isHighProfile= */ true));
}

View File

@@ -16,6 +16,7 @@
package org.jitsi.meet.sdk;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -177,8 +178,11 @@ public class JitsiMeetActivity extends AppCompatActivity
}
protected void leave() {
Intent hangupBroadcastIntent = BroadcastIntentHelper.buildHangUpIntent();
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(hangupBroadcastIntent);
if (this.jitsiView != null) {
this.jitsiView.abort();
} else {
JitsiMeetLogger.w("Cannot leave, view is null");
}
}
private @Nullable
@@ -295,6 +299,7 @@ public class JitsiMeetActivity extends AppCompatActivity
JitsiMeetActivityDelegate.requestPermissions(this, permissions, requestCode, listener);
}
@SuppressLint("MissingSuperCall")
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
JitsiMeetActivityDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);

View File

@@ -157,6 +157,14 @@ public class JitsiMeetView extends FrameLayout {
setProps(options != null ? options.asProps() : new Bundle());
}
/**
* Internal method which aborts running RN by passing empty props.
* This is only meant to be used from the enclosing Activity's onDestroy.
*/
public void abort() {
setProps(new Bundle());
}
/**
* Creates the {@code ReactRootView} for the given app name with the given
* props. Once created it's set as the view of this {@code FrameLayout}.

View File

@@ -1,41 +0,0 @@
package org.jitsi.meet.sdk;
import android.app.Application;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import java.util.List;
/**
* This is the minimal implementation of ReactNativeHost that will make things like the
* Detox testing framework believe we are a "greenfield" app.
*
* Generally speaking, apps using the SDK (other than the Jitsi Meet app itself) should not
* need to use this because the
*/
public class JitsiReactNativeHost extends ReactNativeHost {
public JitsiReactNativeHost(Application application) {
super(application);
}
@Override
public boolean getUseDeveloperSupport() {
// Unused since we override `createReactInstanceManager`.
return false;
}
@Override
protected List<ReactPackage> getPackages() {
// Unused since we override `createReactInstanceManager`.
return null;
}
@Override
protected ReactInstanceManager createReactInstanceManager() {
ReactInstanceManagerHolder.initReactInstanceManager(this.getApplication());
return ReactInstanceManagerHolder.getReactInstanceManager();
}
}

View File

@@ -17,7 +17,6 @@
package org.jitsi.meet.sdk;
import android.app.Activity;
import android.app.Application;
import android.util.Log;
import androidx.annotation.Nullable;
@@ -32,17 +31,17 @@ import com.facebook.react.jscexecutor.JSCExecutorFactory;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.facebook.react.uimanager.ViewManager;
import com.oney.WebRTCModule.EglUtils;
import com.oney.WebRTCModule.RTCVideoViewManager;
import com.oney.WebRTCModule.WebRTCModule;
import com.oney.WebRTCModule.WebRTCModuleOptions;
import com.oney.WebRTCModule.webrtcutils.H264AndSoftwareVideoDecoderFactory;
import com.oney.WebRTCModule.webrtcutils.H264AndSoftwareVideoEncoderFactory;
import org.devio.rn.splashscreen.SplashScreenModule;
import org.webrtc.EglBase;
import org.webrtc.audio.AudioDeviceModule;
import org.webrtc.audio.JavaAudioDeviceModule;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
class ReactInstanceManagerHolder {
@@ -79,30 +78,11 @@ class ReactInstanceManagerHolder {
nativeModules.add(new RNConnectionService(reactContext));
}
// Initialize the WebRTC module by hand, since we want to override some
// initialization options.
WebRTCModule.Options options = new WebRTCModule.Options();
AudioDeviceModule adm = JavaAudioDeviceModule.builder(reactContext)
.setEnableVolumeLogger(false)
.createAudioDeviceModule();
options.setAudioDeviceModule(adm);
EglBase.Context eglContext = EglUtils.getRootEglBaseContext();
options.setVideoDecoderFactory(new WebRTCVideoDecoderFactory(eglContext));
options.setVideoEncoderFactory(new WebRTCVideoEncoderFactory(eglContext));
nativeModules.add(new WebRTCModule(reactContext, options));
return nativeModules;
}
private static List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Arrays.<ViewManager>asList(
// WebRTC, see createNativeModules for details.
new RTCVideoViewManager()
);
return Collections.emptyList();
}
static List<ReactPackage> getReactNativePackages() {
@@ -122,6 +102,7 @@ class ReactInstanceManagerHolder {
new com.reactnativecommunity.webview.RNCWebViewPackage(),
new com.kevinresol.react_native_default_preference.RNDefaultPreferencePackage(),
new com.learnium.RNDeviceInfo.RNDeviceInfo(),
new com.oney.WebRTCModule.WebRTCModulePackage(),
new com.swmansion.gesturehandler.RNGestureHandlerPackage(),
new org.linusu.RNGetRandomValuesPackage(),
new com.rnimmersive.RNImmersivePackage(),
@@ -239,35 +220,6 @@ class ReactInstanceManagerHolder {
return reactInstanceManager;
}
/**
* Internal method to initialize the React Native instance manager. We
* create a single instance in order to load the JavaScript bundle a single
* time. All {@code ReactRootView} instances will be tied to the one and
* only {@code ReactInstanceManager}.
*
* This method is only meant to be called when integrating with {@code JitsiReactNativeHost}.
*
* @param app {@code Application} current running Application.
*/
static void initReactInstanceManager(Application app) {
if (reactInstanceManager != null) {
return;
}
Log.d(TAG, "initializing RN with Application");
reactInstanceManager
= ReactInstanceManager.builder()
.setApplication(app)
.setBundleAssetName("index.android.bundle")
.setJSMainModulePath("index.android")
.setJavaScriptExecutorFactory(getReactNativeJSFactory())
.addPackages(getReactNativePackages())
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.BEFORE_CREATE)
.build();
}
/**
* Internal method to initialize the React Native instance manager. We
* create a single instance in order to load the JavaScript bundle a single
@@ -281,7 +233,15 @@ class ReactInstanceManagerHolder {
return;
}
Log.d(ReactInstanceManagerHolder.class.getCanonicalName(), "initializing RN with Activity");
// Initialize the WebRTC module options.
WebRTCModuleOptions options = WebRTCModuleOptions.getInstance();
EglBase.Context eglContext = EglUtils.getRootEglBaseContext();
options.videoDecoderFactory = new H264AndSoftwareVideoDecoderFactory(eglContext);
options.videoEncoderFactory = new H264AndSoftwareVideoEncoderFactory(eglContext);
Log.d(TAG, "initializing RN with Activity");
reactInstanceManager
= ReactInstanceManager.builder()

View File

@@ -1,19 +0,0 @@
package org.jitsi.meet.sdk;
/** Enumeration of supported video codec types. */
public enum VideoCodecMimeType {
VP8("video/x-vnd.on2.vp8"),
VP9("video/x-vnd.on2.vp9"),
H264("video/avc"),
AV1("video/av01");
private final String mimeType;
private VideoCodecMimeType(String mimeType) {
this.mimeType = mimeType;
}
String mimeType() {
return mimeType;
}
}

View File

@@ -1,52 +0,0 @@
package org.jitsi.meet.sdk;
import androidx.annotation.Nullable;
import org.webrtc.EglBase;
import org.webrtc.HardwareVideoDecoderFactory;
import org.webrtc.SoftwareVideoDecoderFactory;
import org.webrtc.VideoCodecInfo;
import org.webrtc.VideoDecoder;
import org.webrtc.VideoDecoderFactory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* This is a custom video decoder factory for WebRTC which behaves similarly
* to the default one in iOS. It supports the following codecs:
*
* - In hardware: H.264 (baseline)
* - In software: VP8, VP9, AV1
*/
public class WebRTCVideoDecoderFactory implements VideoDecoderFactory {
private final VideoDecoderFactory hardwareVideoDecoderFactory;
private final VideoDecoderFactory softwareVideoDecoderFactory = new SoftwareVideoDecoderFactory();
public WebRTCVideoDecoderFactory(@Nullable EglBase.Context eglContext) {
this.hardwareVideoDecoderFactory = new HardwareVideoDecoderFactory(eglContext);
}
@Nullable
@Override
public VideoDecoder createDecoder(VideoCodecInfo codecInfo) {
if (codecInfo.name.equalsIgnoreCase(VideoCodecMimeType.H264.name())) {
return this.hardwareVideoDecoderFactory.createDecoder(codecInfo);
}
return this.softwareVideoDecoderFactory.createDecoder(codecInfo);
}
@Override
public VideoCodecInfo[] getSupportedCodecs() {
List<VideoCodecInfo> codecs = new ArrayList<>();
codecs.add(H264Utils.DEFAULT_H264_BASELINE_PROFILE_CODEC);
codecs.add(new VideoCodecInfo(VideoCodecMimeType.VP8.name(), new HashMap<>()));
codecs.add(new VideoCodecInfo(VideoCodecMimeType.VP9.name(), new HashMap<>()));
codecs.add(new VideoCodecInfo(VideoCodecMimeType.AV1.name(), new HashMap<>()));
return codecs.toArray(new VideoCodecInfo[codecs.size()]);
}
}

View File

@@ -1,53 +0,0 @@
package org.jitsi.meet.sdk;
import androidx.annotation.Nullable;
import org.webrtc.EglBase;
import org.webrtc.HardwareVideoEncoderFactory;
import org.webrtc.SoftwareVideoEncoderFactory;
import org.webrtc.VideoCodecInfo;
import org.webrtc.VideoEncoder;
import org.webrtc.VideoEncoderFactory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* This is a custom video encoder factory for WebRTC which behaves similarly
* to the default one in iOS. It supports the following codecs:
*
* - In hardware: H.264 (baseline)
* - In software: VP8, VP9, AV1
*/
public class WebRTCVideoEncoderFactory implements VideoEncoderFactory {
private final VideoEncoderFactory hardwareVideoEncoderFactory;
private final VideoEncoderFactory softwareVideoEncoderFactory = new SoftwareVideoEncoderFactory();
public WebRTCVideoEncoderFactory(@Nullable EglBase.Context eglContext) {
this.hardwareVideoEncoderFactory =
new HardwareVideoEncoderFactory(eglContext, false, false);
}
@Nullable
@Override
public VideoEncoder createEncoder(VideoCodecInfo codecInfo) {
if (codecInfo.name.equalsIgnoreCase(VideoCodecMimeType.H264.name())) {
return this.hardwareVideoEncoderFactory.createEncoder(codecInfo);
}
return this.softwareVideoEncoderFactory.createEncoder(codecInfo);
}
@Override
public VideoCodecInfo[] getSupportedCodecs() {
List<VideoCodecInfo> codecs = new ArrayList<>();
codecs.add(H264Utils.DEFAULT_H264_BASELINE_PROFILE_CODEC);
codecs.add(new VideoCodecInfo(VideoCodecMimeType.VP8.name(), new HashMap<>()));
codecs.add(new VideoCodecInfo(VideoCodecMimeType.VP9.name(), new HashMap<>()));
codecs.add(new VideoCodecInfo(VideoCodecMimeType.AV1.name(), new HashMap<>()));
return codecs.toArray(new VideoCodecInfo[codecs.size()]);
}
}

2
app.js
View File

@@ -18,7 +18,6 @@ import './react/features/base/jitsi-local-storage/setup';
import conference from './conference';
import API from './modules/API';
import UI from './modules/UI/UI';
import keyboardshortcut from './modules/keyboardshortcut/keyboardshortcut';
import translation from './modules/translation/translation';
// Initialize Olm as early as possible.
@@ -38,7 +37,6 @@ window.APP = {
'index.loaded': window.indexLoadedTime
},
keyboardshortcut,
translation,
UI
};

View File

@@ -140,6 +140,7 @@ import { downloadJSON } from './react/features/base/util/downloadJSON';
import { showDesktopPicker } from './react/features/desktop-picker/actions';
import { appendSuffix } from './react/features/display-name/functions';
import { maybeOpenFeedbackDialog, submitFeedback } from './react/features/feedback/actions';
import { initKeyboardShortcuts } from './react/features/keyboard-shortcuts/actions';
import { maybeSetLobbyChatMessageListener } from './react/features/lobby/actions.any';
import { setNoiseSuppressionEnabled } from './react/features/noise-suppression/actions';
import { hideNotification, showNotification, showWarningNotification } from './react/features/notifications/actions';
@@ -162,6 +163,7 @@ import { endpointMessageReceived } from './react/features/subtitles/actions.any'
import { handleToggleVideoMuted } from './react/features/toolbox/actions.any';
import { muteLocal } from './react/features/video-menu/actions.any';
import { setIAmVisitor } from './react/features/visitors/actions';
import { iAmVisitor } from './react/features/visitors/functions';
import UIEvents from './service/UI/UIEvents';
const logger = Logger.getLogger(__filename);
@@ -804,13 +806,14 @@ export default {
* @returns {Promise}
*/
async init({ roomName }) {
const state = APP.store.getState();
const initialOptions = {
startAudioOnly: config.startAudioOnly,
startScreenSharing: config.startScreenSharing,
startWithAudioMuted: getStartWithAudioMuted(APP.store.getState())
|| isUserInteractionRequiredForUnmute(APP.store.getState()),
startWithVideoMuted: getStartWithVideoMuted(APP.store.getState())
|| isUserInteractionRequiredForUnmute(APP.store.getState())
startWithAudioMuted: getStartWithAudioMuted(state)
|| isUserInteractionRequiredForUnmute(state),
startWithVideoMuted: getStartWithVideoMuted(state)
|| isUserInteractionRequiredForUnmute(state)
};
this.roomName = roomName;
@@ -840,7 +843,7 @@ export default {
return tracks;
};
if (isPrejoinPageVisible(APP.store.getState())) {
if (isPrejoinPageVisible(state)) {
_connectionPromise = connect(roomName).then(c => {
// we want to initialize it early, in case of errors to be able
// to gather logs
@@ -863,7 +866,7 @@ export default {
// they may remain as empty strings.
this._initDeviceList(true);
if (isPrejoinPageVisible(APP.store.getState())) {
if (isPrejoinPageVisible(state)) {
return APP.store.dispatch(initPrejoin(tracks, errors));
}
@@ -873,7 +876,7 @@ export default {
let localTracks = handleStartAudioMuted(initialOptions, tracks);
// in case where gum is slow and resolves after the startAudio/VideoMuted coming from jicofo, we can be
// In case where gUM is slow and resolves after the startAudio/VideoMuted coming from jicofo, we can be
// join unmuted even though jicofo had instruct us to mute, so let's respect that before passing the tracks
if (!browser.isWebKitBased()) {
if (room?.isStartAudioMuted()) {
@@ -885,6 +888,11 @@ export default {
localTracks = localTracks.filter(track => track.getType() !== MEDIA_TYPE.VIDEO);
}
// Do not add the tracks if the user has joined the call as a visitor.
if (iAmVisitor(state)) {
return Promise.resolve();
}
return this._setLocalAudioVideoStreams(localTracks);
}
@@ -2301,10 +2309,7 @@ export default {
APP.UI.initConference();
if (!config.disableShortcuts) {
APP.keyboardshortcut.init();
}
dispatch(initKeyboardShortcuts());
dispatch(conferenceJoined(room));
const jwt = APP.store.getState()['features/base/jwt'];

View File

@@ -1406,6 +1406,7 @@ var config = {
disableAGC
disableAP
disableHPF
disableLocalStats
disableNS
enableTalkWhileMuted
forceJVB121Ratio

View File

@@ -1,100 +0,0 @@
.audio-preview {
display: inline-block;
&-content {
position: relative;
right: auto;
margin: 0;
margin-bottom: 4px;
max-height: calc(100vh - 100px);
overflow: auto;
width: 300px;
&-ul {
margin:0;
padding:0;
list-style-type: none;
}
}
&-header:hover {
background-color: initial;
cursor: initial;
}
&-entry-text {
max-width: 213px;
&.left-margin {
margin-left: 36px;
}
}
&-speaker {
position: relative;
&:hover, &:focus-within, &:focus {
.audio-preview-test-button {
display: inline-block;
}
.audio-preview-entry-text {
max-width: 178px;
margin-right: 0;
}
}
.audio-preview-entry-text {
max-width: 238px;
}
}
&-microphone {
position: relative;
&--nometer {
.audio-preview-entry-text {
max-width: 238px;
}
}
&--withmeter {
.audio-preview-entry-text {
max-width: 178px;
}
}
}
&-icon {
border-radius: 50%;
display: inline-block;
width: 14px;
&--exclamation {
margin-left: 6px;
& svg {
fill: #E54B4B;
}
}
}
&-test-button {
display: none;
padding: 4px 10px;
position: absolute;
right: 16px;
top: 6px;
}
&-meter-mic {
position: absolute;
right: 16px;
top: 14px;
}
&-checkbox-container {
padding: 10px 16px;
}
}

View File

@@ -74,6 +74,10 @@
a:active {
color: black;
}
&::-webkit-scrollbar-corner {
background: #3a3a3a;
}
}

View File

@@ -197,14 +197,6 @@
padding-bottom: 10px;
}
.helper-link {
cursor: pointer;
font-weight: bold;
display: inline-block;
flex-shrink: 0;
margin-left: auto;
}
.warning-text {
color:#FFD740;
font-size: 12px;

View File

@@ -1,76 +0,0 @@
.video-preview {
background: none;
display: inline-block;
&-container {
max-height: 456px;
overflow: auto;
margin: 0;
margin-bottom: 4px;
position: relative;
right: auto;
}
&-entry {
cursor: pointer;
height: 138px;
width: 244px;
position: relative;
margin: 0 7px 4px;
border-radius: 6px;
box-sizing: border-box;
overflow: hidden;
&:last-child {
margin-bottom: 0;
}
&--selected {
border: 2px solid #4687ED;
}
}
&-video {
height: 100%;
object-fit: cover;
width: 100%;
}
&-error {
align-items: center;
display: flex;
height: 100%;
justify-content: center;
position: absolute;
width: 100%;
}
&-label {
position: absolute;
bottom: 0;
left: 0;
right: 0;
max-width: 100%;
padding: 8px;
z-index: 2;
&-text {
background-color: rgba(0, 0, 0, 0.7);
border-radius: 4px;
padding: 4px 8px;
color: #fff;
font-size: 12px;
line-height: 16px;
font-weight: 600;
max-width: calc(100% - 16px);
overflow: hidden;
text-overflow: ellipsis;
width: fit-content;
white-space: nowrap;
}
}
&-checkbox-container {
padding: 10px 14px;
}
}

View File

@@ -108,6 +108,10 @@
#largeVideoContainer {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
margin: 0 !important;
}
#largeVideoWrapper {

View File

@@ -1,101 +0,0 @@
.button-control {
box-sizing: border-box;
display: inline-block;
border: 1px solid $buttonBorder;
vertical-align: baseline;
height: 30px;
min-width: 60px;
padding: 4px 10px;
margin: 0;
line-height: 1.5em;
outline: none;
background-color: transparent;
float: right;
font-size: 14px;
margin-left: 10px;
color: $buttonColor;
font-weight: $buttonFontWeight;
@include transition(background-color .1s ease-out);
&[disabled] {
color: #666;
cursor: default;
}
&_full-width {
margin: 0;
width: 100%;
}
&:hover {
border: 1px solid $buttonHoverBorder;
background-color: $buttonHoverBackground;
@include transition(background-color .1s ease-in);
}
&:active {
@include box-shadow(0, 0, 1px, $buttonShadowColor, true);
}
&_light {
color: $defaultDarkColor;
background-color: $buttonLightBackground;
border: 1px solid $buttonLightBorder;
&:hover {
border: 1px solid $buttonLightHoverBorder;
background-color: $buttonLightHoverBackground;
}
}
&_link {
color: $buttonLinkColor;
background-color: $buttonLinkBackground;
&:hover {
background-color: $buttonLinkBackground;
}
}
&_overlay {
color: $primaryButtonColor;
background-color: $overlayButtonBg;
border-radius: 2px;
border: none;
&:hover {
background-color: $primaryButtonBackground;
border: none;
}
}
&_primary {
background-color: $primaryButtonBackground;
border: 1px solid $primaryButtonBackground;
color: $primaryButtonColor !important;
font-weight: $primaryButtonFontWeight;
&:hover {
border: 1px solid $primaryButtonHoverBackground;
background-color: $primaryButtonHoverBackground;
}
&[disabled] {
color: $primaryButtonColor;
}
}
&_close {
color: $defaultFontColor;
}
&_submit {
color: $linkFontColor;
&:hover {
color: $linkHoverFontColor;
}
}
&_center {
float: none !important;
}
}

View File

@@ -1,49 +0,0 @@
.form-control {
padding: $formPadding 0;
&:first-child {
padding-top: 0;
}
&:last-child {
padding-bottom: 0;
}
&__text {
margin: 8px 0;
font-size: 1em
}
&__label {
font-size: 1em;
font-weight: $labelFontWeight;
}
&__em {
color: $inputControlEmColor;
}
&__container {
position: relative;
width: 100%;
margin-top: 5px;
margin-bottom: 5px;
@include flex();
.button-control {
margin: 1px 0 1px 10px;
}
}
&__right {
position: absolute;
right: 0;
}
}
/**
* Set a specific color for read only style.
*/
input:read-only {
color: $readOnlyInputColor;
}

View File

@@ -1,29 +0,0 @@
.input-control {
@include transition(all .2s ease-in);
display: inline-block;
width: 100%;
padding: 5px 7px;
border-radius: $borderRadius;
line-height: 32px;
height: 32px;
text-align: left;
margin-bottom: 8px;
&:last-child {
margin-bottom: inherit;
}
&::selection {
background-color: $defaultDarkSelectionColor;
}
&.error {
color: $errorColor;
border-color: $errorColor;
}
}
@include placeholder {
color: $placeHolderColor;
}

View File

@@ -1,20 +0,0 @@
.link {
cursor: pointer;
color: $linkFontColor;
@include transition(color .1s ease-out);
&:hover {
color: $linkHoverFontColor;
text-decoration: underline;
@include transition(color .1s ease-in);
}
}
/**
* Helper links are links that are meant to open a documentation page or more
* detailed info.
*/
.helper-link {
@extend .link;
font-size: 12px;
}

View File

@@ -33,8 +33,6 @@ $flagsImagePath: "../images/";
@import 'mini_toolbox';
@import 'modals/desktop-picker/desktop-picker';
@import 'modals/dialog';
@import 'modals/embed-meeting/embed-meeting';
@import 'modals/feedback/feedback';
@import 'modals/invite/info';
@import 'modals/screen-share/share-audio';
@import 'modals/screen-share/share-screen-warning';
@@ -51,10 +49,6 @@ $flagsImagePath: "../images/";
@import 'welcome_page_settings_toolbar';
@import 'toolbars';
@import 'redirect_page';
@import 'components/form-control';
@import 'components/link';
@import 'components/button-control';
@import 'components/input-control';
@import 'components/input-slider';
@import '404';
@import 'policy';
@@ -66,7 +60,6 @@ $flagsImagePath: "../images/";
@import 'filmstrip/vertical_filmstrip';
@import 'filmstrip/vertical_filmstrip_overrides';
@import 'unsupported-browser/main';
@import 'modals/invite/add-people';
@import 'deep-linking/main';
@import 'transcription-subtitles';
@import '_meetings_list.scss';
@@ -77,8 +70,6 @@ $flagsImagePath: "../images/";
@import 'chrome-extension-banner';
@import 'settings-button';
@import 'meter';
@import 'audio-preview';
@import 'video-preview';
@import 'premeeting/main';
@import 'modals/invite/invite_more';
@import 'modals/security/security';

View File

@@ -12,24 +12,6 @@
}
}
/**
* Styling inline dialog errors.
*/
.inline-dialog-error {
margin-top: 16px;
&-text {
color: $dialogErrorText;
margin-bottom: 8px;
text-align: center;
}
&-button {
display: block;
margin: 16px auto 0 auto;
}
}
/**
* Styling shared video dialog errors.
*/

View File

@@ -1,42 +0,0 @@
.embed-meeting {
&-dialog {
display: flex;
flex-direction: column;
}
&-copy {
color: white;
font-size: 15px;
margin-left: auto;
margin-top: 16px;
}
&-code {
background: transparent;
border: 1px solid #A4B8D1;
color: white;
font-size: 15px;
height: 165px;
line-height: 24px;
padding: 8px;
width: 100%;
resize: vertical;
}
&-trigger {
display: flex;
align-items: center;
padding: 8px 8px 8px 16px;
margin-top: 24px;
width: calc(100% - 24px);
height: 24px;
background: #2A3A4B;
border: 1px solid #5E6D7A;
border-radius: 4px;
cursor: pointer;
.jitsi-icon {
margin-right: 20px;
}
}
}

View File

@@ -1,46 +0,0 @@
@-webkit-keyframes shake-rotate {
0% {
-webkit-transform:scale(1) rotate(0deg);
transform:scale(1) rotate(0deg)
}
50% {
-webkit-transform:scale(.8) rotate(-5deg);
transform:scale(.8) rotate(-5deg)
}
to {
-webkit-transform:scale(1) rotate(3deg);
transform:scale(1) rotate(3deg)
}
}
@keyframes shake-rotate {
0% {
-webkit-transform:scale(1) rotate(0deg);
transform:scale(1) rotate(0deg)
}
50% {
-webkit-transform:scale(.8) rotate(-5deg);
transform:scale(.8) rotate(-5deg)
}
to {
-webkit-transform:scale(1) rotate(3deg);
transform:scale(1) rotate(3deg)
}
}
.shake-rotate {
display: inline-block;
-webkit-animation-duration: .4s;
animation-duration: .4s;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-name: shake-rotate;
animation-name: shake-rotate;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out
}

View File

@@ -41,10 +41,3 @@
}
}
}
/**
* Styles errors in the MultiSelectAutocomplete.
*/
.autocomplete-error {
min-width: 260px;
}

View File

@@ -57,6 +57,10 @@
line-height: 24px;
border-collapse: collapse;
* {
user-select: text;
}
thead {
text-align: left;
}

View File

@@ -1,57 +1,4 @@
.invite-more {
&-container {
margin-bottom: 8px;
transition: margin-bottom 0.3s;
&.elevated {
margin-bottom: 36px;
}
}
&-content {
display: flex;
flex-direction: column;
align-items: center;
padding: 16px;
background: rgba(0, 0, 0, 0.7);
border-radius: 8px;
color: #fff;
font-size: 14px;
line-height: 24px;
font-weight: 600;
}
&-header {
max-width: 100%;
margin-bottom: 16px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
&-button {
display: flex;
max-width: 100%;
height: 40px;
box-sizing: border-box;
padding: 8px 16px;
background: #0376DA;
border-radius: 3px;
cursor: pointer;
@media (hover: hover) and (pointer: fine) {
&:hover {
background: #278ADF;
}
}
&-text {
margin-left: 8px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
&-dialog {
color: #fff;
font-size: 15px;
@@ -65,59 +12,6 @@
background: #5E6D7A;
}
&.email-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 8px 8px 16px;
margin-top: 24px;
width: calc(100% - 26px);
height: 22px;
background: #2A3A4B;
border: 1px solid #5E6D7A;
border-radius: 3px;
cursor: pointer;
&.active {
border-radius: 3px 3px 0 0;
}
}
&.invite-buttons {
width: 100%;
text-align: right;
margin-top: 8px;
& > a {
display: inline-block;
height: 24px;
min-width: 48px;
border-radius: 3px;
text-align: center;
text-decoration: none;
cursor: pointer;
}
&-cancel {
margin-right: 16px;
padding: 7px 15px;
background: #2A3A4B;
border: 1px solid #5E6D7A;
}
&-add {
padding: 8px 16px;
background: #0376DA;
}
&.disabled {
& > a {
pointer-events: none;
}
}
}
&.stream {
display: flex;
justify-content: space-between;
@@ -158,14 +52,3 @@
}
}
}
.mobile-browser {
.invite-more-content {
font-size: 16px;
}
.invite-more-button {
height: 48px;
padding: 12px 16px;
}
}

View File

@@ -78,13 +78,18 @@ Component "conference.jitmeet.example.com" "muc"
restrict_room_creation = true
storage = "memory"
modules_enabled = {
"muc_hide_all";
"muc_meeting_id";
"muc_domain_mapper";
"polls";
--"token_verification";
"muc_rate_limit";
"muc_password_whitelist";
}
admins = { "focusUser@auth.jitmeet.example.com" }
muc_password_whitelist = {
"focusUser@auth.jitmeet.example.com"
}
muc_room_locking = false
muc_room_default_public_jids = true
@@ -92,6 +97,7 @@ Component "breakout.jitmeet.example.com" "muc"
restrict_room_creation = true
storage = "memory"
modules_enabled = {
"muc_hide_all";
"muc_meeting_id";
"muc_domain_mapper";
"muc_rate_limit";
@@ -105,6 +111,7 @@ Component "breakout.jitmeet.example.com" "muc"
Component "internal.auth.jitmeet.example.com" "muc"
storage = "memory"
modules_enabled = {
"muc_hide_all";
"ping";
}
admins = { "focusUser@auth.jitmeet.example.com", "jvb@auth.jitmeet.example.com" }
@@ -139,6 +146,7 @@ Component "lobby.jitmeet.example.com" "muc"
muc_room_locking = false
muc_room_default_public_jids = true
modules_enabled = {
"muc_hide_all";
"muc_rate_limit";
"polls";
}

6
globals.d.ts vendored
View File

@@ -10,12 +10,6 @@ declare global {
API: any;
conference: any;
debugLogs: any;
keyboardshortcut: {
registerShortcut: Function;
unregisterShortcut: Function;
openDialog: Function;
enable: Function;
}
};
const interfaceConfig: any;

View File

@@ -70,7 +70,8 @@ var interfaceConfig = {
ENABLE_DIAL_OUT: true,
ENABLE_FEEDBACK_ANIMATION: false, // Enables feedback star animation.
// DEPRECATED. Animation no longer supported.
// ENABLE_FEEDBACK_ANIMATION: false,
FILM_STRIP_MAX_HEIGHT: 120,

View File

@@ -42,7 +42,7 @@ target 'JitsiMeetSDK' do
pod 'CocoaLumberjack', '3.7.2'
pod 'ObjectiveDropboxOfficial', '6.2.3'
pod 'JitsiWebRTC', '~> 106.0.0'
pod 'JitsiWebRTC', '~> 111.0.0'
end
target 'JitsiMeetSDKLite' do

View File

@@ -3,11 +3,12 @@ PODS:
- amplitude-react-native (2.7.0):
- Amplitude (= 8.7.1)
- React-Core
- AppAuth (1.4.0):
- AppAuth/Core (= 1.4.0)
- AppAuth/ExternalUserAgent (= 1.4.0)
- AppAuth/Core (1.4.0)
- AppAuth/ExternalUserAgent (1.4.0)
- AppAuth (1.6.1):
- AppAuth/Core (= 1.6.1)
- AppAuth/ExternalUserAgent (= 1.6.1)
- AppAuth/Core (1.6.1)
- AppAuth/ExternalUserAgent (1.6.1):
- AppAuth/Core
- boost (1.76.0)
- CocoaLumberjack (3.7.2):
- CocoaLumberjack/Core (= 3.7.2)
@@ -102,56 +103,56 @@ PODS:
- GoogleUtilities/Network (~> 7.7)
- "GoogleUtilities/NSData+zlib (~> 7.7)"
- nanopb (~> 2.30908.0)
- GoogleDataTransport (9.1.4):
- GoogleDataTransport (9.2.2):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleSignIn (6.0.2):
- AppAuth (~> 1.4)
- GTMAppAuth (~> 1.0)
- GTMSessionFetcher/Core (~> 1.1)
- GoogleUtilities/AppDelegateSwizzler (7.7.0):
- GoogleSignIn (6.2.4):
- AppAuth (~> 1.5)
- GTMAppAuth (~> 1.3)
- GTMSessionFetcher/Core (< 3.0, >= 1.1)
- GoogleUtilities/AppDelegateSwizzler (7.11.1):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.7.0):
- GoogleUtilities/Environment (7.11.1):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.7.0):
- GoogleUtilities/Logger (7.11.1):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (7.7.0):
- GoogleUtilities/MethodSwizzler (7.11.1):
- GoogleUtilities/Logger
- GoogleUtilities/Network (7.7.0):
- GoogleUtilities/Network (7.11.1):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.7.0)"
- GoogleUtilities/Reachability (7.7.0):
- "GoogleUtilities/NSData+zlib (7.11.1)"
- GoogleUtilities/Reachability (7.11.1):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (7.7.0):
- GoogleUtilities/UserDefaults (7.11.1):
- GoogleUtilities/Logger
- GTMAppAuth (1.2.2):
- AppAuth/Core (~> 1.4)
- GTMSessionFetcher/Core (~> 1.5)
- GTMSessionFetcher/Core (1.7.0)
- JitsiWebRTC (106.0.0)
- libwebp (1.2.1):
- libwebp/demux (= 1.2.1)
- libwebp/mux (= 1.2.1)
- libwebp/webp (= 1.2.1)
- libwebp/demux (1.2.1):
- GTMAppAuth (1.3.1):
- AppAuth/Core (~> 1.6)
- GTMSessionFetcher/Core (< 3.0, >= 1.5)
- GTMSessionFetcher/Core (2.3.0)
- JitsiWebRTC (111.0.1)
- libwebp (1.2.4):
- libwebp/demux (= 1.2.4)
- libwebp/mux (= 1.2.4)
- libwebp/webp (= 1.2.4)
- libwebp/demux (1.2.4):
- libwebp/webp
- libwebp/mux (1.2.1):
- libwebp/mux (1.2.4):
- libwebp/demux
- libwebp/webp (1.2.1)
- libwebp/webp (1.2.4)
- nanopb (2.30908.0):
- nanopb/decode (= 2.30908.0)
- nanopb/encode (= 2.30908.0)
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- ObjectiveDropboxOfficial (6.2.3)
- PromisesObjC (2.1.1)
- PromisesSwift (2.1.1):
- PromisesObjC (= 2.1.1)
- PromisesObjC (2.2.0)
- PromisesSwift (2.2.0):
- PromisesObjC (= 2.2.0)
- RCT-Folly (2021.06.28.00-v2):
- boost
- DoubleConversion
@@ -389,8 +390,8 @@ PODS:
- react-native-video/Video (6.0.0-alpha.1):
- PromisesSwift
- React-Core
- react-native-webrtc (106.0.7):
- JitsiWebRTC (~> 106.0.0)
- react-native-webrtc (111.0.0):
- JitsiWebRTC (~> 111.0.0)
- React-Core
- react-native-webview (11.15.1):
- React-Core
@@ -471,8 +472,8 @@ PODS:
- React-Core
- RNGestureHandler (2.9.0):
- React-Core
- RNGoogleSignin (7.0.4):
- GoogleSignIn (~> 6.0.0)
- RNGoogleSignin (9.0.2):
- GoogleSignIn (~> 6.2)
- React-Core
- RNScreens (3.13.1):
- React-Core
@@ -500,7 +501,7 @@ DEPENDENCIES:
- Firebase/DynamicLinks (~> 8.0)
- "giphy-react-native-sdk (from `../node_modules/@giphy/react-native-sdk`)"
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- JitsiWebRTC (~> 106.0.0)
- JitsiWebRTC (~> 111.0.0)
- ObjectiveDropboxOfficial (= 6.2.3)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
@@ -701,7 +702,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Amplitude: 834c7332dfb9640a751e21c13efb22a07c0c12d4
amplitude-react-native: 0ed8cab759aafaa94961b82122bf56297da607ad
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
AppAuth: e48b432bb4ba88b10cb2bcc50d7f3af21e78b9c2
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaLumberjack: b7e05132ff94f6ae4dfa9d5bce9141893a21d9da
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
@@ -719,17 +720,17 @@ SPEC CHECKSUMS:
giphy-react-native-sdk: 7abccf2b52123a0f30ce99da895ab6288023680c
glog: 476ee3e89abb49e07f822b48323c51c57124b572
GoogleAppMeasurement: 4c19f031220c72464d460c9daa1fb5d1acce958e
GoogleDataTransport: 5fffe35792f8b96ec8d6775f5eccd83c998d5a3b
GoogleSignIn: fd381840dbe7c1137aa6dc30849a5c3e070c034a
GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
GTMAppAuth: ad5c2b70b9a8689e1a04033c9369c4915bfcbe89
GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91
JitsiWebRTC: f441eb0e2d67f0588bf24e21c5162e97342714fb
libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc
GoogleDataTransport: 8378d1fa8ac49753ea6ce70d65a7cb70ce5f66e6
GoogleSignIn: 5651ce3a61e56ca864160e79b484cd9ed3f49b7a
GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749
GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
JitsiWebRTC: 9619c1f71cc16eeca76df68aa2d213c6d63274a8
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
ObjectiveDropboxOfficial: fe206ce8c0bc49976c249d472db7fdbc53ebbd53
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
PromisesSwift: 99fddfe4a0ec88a56486644c0da106694c92a604
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
PromisesSwift: cf9eb58666a43bbe007302226e510b16c1e10959
RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8
RCTRequired: 92cbd71369a2de6add25fd2403ac39838f1b694f
RCTTypeSafety: 494e8af41d7410ed0b877210859ee3984f37e6b4
@@ -754,7 +755,7 @@ SPEC CHECKSUMS:
react-native-slider: 6e9b86e76cce4b9e35b3403193a6432ed07e0c81
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
react-native-video: bb6f12a7198db53b261fefb5d609dc77417acc8b
react-native-webrtc: 0df36747802476e758af6b6dceccdeaed8c826c2
react-native-webrtc: a9d4d8ef61adb634e006ffd956c494ad8318d95c
react-native-webview: ea4899a1056c782afa96dd082179a66cbebf5504
React-perflogger: 46620fc6d1c3157b60ed28434e08f7fd7f3f3353
React-RCTActionSheet: b1f7e72a0ba760ec684df335c61f730b5179f5ff
@@ -774,13 +775,13 @@ SPEC CHECKSUMS:
RNDefaultPreference: 08bdb06cfa9188d5da97d4642dac745218d7fb31
RNDeviceInfo: 0400a6d0c94186d1120c3cbd97b23abc022187a9
RNGestureHandler: 071d7a9ad81e8b83fe7663b303d132406a7d8f39
RNGoogleSignin: c4381751eefd73c552b923ba347a9bfc6f18771c
RNGoogleSignin: 22e468a9474dbcb8618d8847205ad4f0b2575d13
RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19
RNSound: 27e8268bdb0a1f191f219a33267f7e0445e8d62f
RNSVG: f3b60aeeaa81960e2e0536c3a9eef50b667ef3a9
RNWatch: dae6c858a2051dbdcfb00b9a86cf4d90400263b4
Yoga: 7929b92b1828675c1bebeb114dae8cb8fa7ef6a3
PODFILE CHECKSUM: e671cdcdb80fab67e305861c36bfae8ed5a5b0ef
PODFILE CHECKSUM: d9116cb59cd7e921956e45de7cbbd75bef3862c1
COCOAPODS: 1.11.3

View File

@@ -39,6 +39,11 @@
[builder setFeatureFlag:@"ios.screensharing.enabled" withBoolean:YES];
[builder setFeatureFlag:@"ios.recording.enabled" withBoolean:YES];
builder.serverURL = [NSURL URLWithString:@"https://meet.jit.si"];
#if TARGET_IPHONE_SIMULATOR
// CallKit has started to create problems starting with the iOS 16 simulator.
// Disable it since it never worked in the simulator anyway.
[builder setFeatureFlag:@"call-integration.enabled" withBoolean:NO];
#endif
}];
[jitsiMeet application:application didFinishLaunchingWithOptions:launchOptions];

View File

@@ -15,7 +15,7 @@
*/
#import <Intents/Intents.h>
#import <WebRTC/RTCLogging.h>
#import "Orientation.h"
#import "JitsiMeet+Private.h"
@@ -26,6 +26,8 @@
#import "RNSplashScreen.h"
#import "ScheenshareEventEmiter.h"
#import <react-native-webrtc/WebRTCModuleOptions.h>
#if !defined(JITSI_MEET_SDK_LITE)
#import <RNGoogleSignin/RNGoogleSignin.h>
#import "Dropbox.h"
@@ -52,6 +54,12 @@
- (instancetype)init {
if (self = [super init]) {
#if 0
// Initialize WebRTC options.
WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance];
options.loggingSeverity = RTCLoggingSeverityInfo;
#endif
// Initialize the one and only bridge for interfacing with React Native.
_bridgeWrapper = [[RCTBridgeWrapper alloc] init];
@@ -63,11 +71,6 @@
// Register a log handler for React.
registerReactLogHandler();
#if 0
// Enable WebRTC logs
RTCSetMinDebugLogLevel(RTCLoggingSeverityInfo);
#endif
}
return self;

File diff suppressed because it is too large Load Diff

View File

@@ -675,6 +675,7 @@
"connectedTwoMembers": "{{first}} and {{second}} joined the meeting",
"dataChannelClosed": "Video quality impaired",
"dataChannelClosedDescription": "The bridge channel has been disconnected and thus video quality is limited to its lowest setting.",
"disabledIframe": "Embedding is only meant for demo purposes, so this call will disconnect in {{timeout}} minutes.",
"disconnected": "disconnected",
"displayNotifications": "Display notifications for",
"dontRemindMe": "Do not remind me",

View File

@@ -115,7 +115,11 @@ import { muteAllParticipants } from '../../react/features/video-menu/actions';
import { setVideoQuality } from '../../react/features/video-quality/actions';
import { getJitsiMeetTransport } from '../transport';
import { API_ID, ENDPOINT_TEXT_MESSAGE_NAME } from './constants';
import {
API_ID,
ASSUMED_BANDWIDTH_BPS,
ENDPOINT_TEXT_MESSAGE_NAME
} from './constants';
const logger = Logger.getLogger(__filename);
@@ -310,6 +314,23 @@ function initCommands() {
APP.store.dispatch(sendTones(tones, duration, pause));
},
'set-assumed-bandwidth-bps': value => {
logger.debug('Set assumed bandwidth bps command received', value);
if (typeof value !== 'number' || isNaN(value)) {
logger.error('Assumed bandwidth bps must be a number.');
return;
}
const { conference } = APP.store.getState()['features/base/conference'];
if (conference) {
conference.setAssumedBandwidthBps(value < ASSUMED_BANDWIDTH_BPS
? ASSUMED_BANDWIDTH_BPS
: value);
}
},
'set-follow-me': value => {
logger.debug('Set follow me command received');

View File

@@ -15,3 +15,10 @@ export const API_ID = parseURLParams(window.location).jitsi_meet_external_api_id
* The payload name for the datachannel/endpoint text message event.
*/
export const ENDPOINT_TEXT_MESSAGE_NAME = 'endpoint-text-message';
/**
* The min value that can be set for the assumed bandwidth.
* Setting it to this value means not assuming any bandwidth,
* but rather allowing the estimations to take place.
*/
export const ASSUMED_BANDWIDTH_BPS = -1;

View File

@@ -59,6 +59,7 @@ const commands = {
sendEndpointTextMessage: 'send-endpoint-text-message',
sendParticipantToRoom: 'send-participant-to-room',
sendTones: 'send-tones',
setAssumedBandwidthBps: 'set-assumed-bandwidth-bps',
setFollowMe: 'set-follow-me',
setLargeVideoParticipant: 'set-large-video-participant',
setMediaEncryptionKey: 'set-media-encryption-key',
@@ -393,14 +394,6 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
this._frame.name = frameName;
this._frame.id = frameName;
this._setSize(height, width);
this._frame.sandbox = [
'allow-scripts',
'allow-same-origin',
'allow-popups',
'allow-forms',
'allow-downloads',
'allow-top-navigation-by-user-activation'
].join(' ');
this._frame.setAttribute('allowFullScreen', 'true');
this._frame.style.border = 0;

View File

@@ -11,11 +11,11 @@ import { setColorAlpha } from '../../react/features/base/util/helpers';
import { setDocumentUrl } from '../../react/features/etherpad/actions';
import { setFilmstripVisible } from '../../react/features/filmstrip/actions.any';
import {
joinLeaveNotificationsDisabled,
setNotificationsEnabled,
showNotification
} from '../../react/features/notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE } from '../../react/features/notifications/constants';
import { joinLeaveNotificationsDisabled } from '../../react/features/notifications/functions';
import {
dockToolbox,
setToolboxEnabled,

View File

@@ -1,261 +0,0 @@
/* global APP */
import { jitsiLocalStorage } from '@jitsi/js-utils';
import Logger from '@jitsi/logger';
import {
ACTION_SHORTCUT_PRESSED as PRESSED,
ACTION_SHORTCUT_RELEASED as RELEASED,
createShortcutEvent
} from '../../react/features/analytics/AnalyticsEvents';
import { sendAnalytics } from '../../react/features/analytics/functions';
import { clickOnVideo } from '../../react/features/filmstrip/actions';
import { openSettingsDialog } from '../../react/features/settings/actions';
import { SETTINGS_TABS } from '../../react/features/settings/constants';
const logger = Logger.getLogger(__filename);
/**
* Map of shortcuts. When a shortcut is registered it enters the mapping.
* @type {Map}
*/
const _shortcuts = new Map();
/**
* Map of registered keyboard keys and translation keys describing the
* action performed by the key.
* @type {Map}
*/
const _shortcutsHelp = new Map();
/**
* The key used to save in local storage if keyboard shortcuts are enabled.
*/
const _enableShortcutsKey = 'enableShortcuts';
/**
* Prefer keyboard handling of these elements over global shortcuts.
* If a button is triggered using the Spacebar it should not trigger PTT.
* If an input element is focused and M is pressed it should not mute audio.
*/
const _elementsBlacklist = [
'input',
'textarea',
'button',
'[role=button]',
'[role=menuitem]',
'[role=radio]',
'[role=tab]',
'[role=option]',
'[role=switch]',
'[role=range]',
'[role=log]'
];
/**
* An element selector for elements that have their own keyboard handling.
*/
const _focusedElementsSelector = `:focus:is(${_elementsBlacklist.join(',')})`;
/**
* Maps keycode to character, id of popover for given function and function.
*/
const KeyboardShortcut = {
init() {
this._initGlobalShortcuts();
window.onkeyup = e => {
if (!this.getEnabled()) {
return;
}
const key = this._getKeyboardKey(e).toUpperCase();
const num = parseInt(key, 10);
if (!document.querySelector(_focusedElementsSelector)) {
if (_shortcuts.has(key)) {
_shortcuts.get(key).function(e);
} else if (!isNaN(num) && num >= 0 && num <= 9) {
APP.store.dispatch(clickOnVideo(num));
}
}
};
window.onkeydown = e => {
if (!this.getEnabled()) {
return;
}
const focusedElement = document.querySelector(_focusedElementsSelector);
if (!focusedElement) {
if (this._getKeyboardKey(e).toUpperCase() === ' ') {
if (APP.conference.isLocalAudioMuted()) {
sendAnalytics(createShortcutEvent(
'push.to.talk',
PRESSED));
logger.log('Talk shortcut pressed');
APP.conference.muteAudio(false);
}
}
} else if (this._getKeyboardKey(e).toUpperCase() === 'ESCAPE') {
// Allow to remove focus from selected elements using ESC key.
if (focusedElement && focusedElement.blur) {
focusedElement.blur();
}
}
};
},
/**
* Enables/Disables the keyboard shortcuts.
* @param {boolean} value - the new value.
*/
enable(value) {
jitsiLocalStorage.setItem(_enableShortcutsKey, value);
},
getEnabled() {
// Should be enabled if not explicitly set to false
// eslint-disable-next-line no-unneeded-ternary
return jitsiLocalStorage.getItem(_enableShortcutsKey) === 'false' ? false : true;
},
getShortcutsDescriptions() {
return _shortcutsHelp;
},
/**
* Opens the {@SettingsDialog} dialog on the Shortcuts page.
*
* @returns {void}
*/
openDialog() {
APP.store.dispatch(openSettingsDialog(SETTINGS_TABS.SHORTCUTS, false));
},
/**
* Registers a new shortcut.
*
* @param shortcutChar the shortcut character triggering the action
* @param shortcutAttr the "shortcut" html element attribute mapping an
* element to this shortcut and used to show the shortcut character on the
* element tooltip
* @param exec the function to be executed when the shortcut is pressed
* @param helpDescription the description of the shortcut that would appear
* in the help menu
* @param altKey whether or not the alt key must be pressed.
*/
registerShortcut(// eslint-disable-line max-params
shortcutChar,
shortcutAttr,
exec,
helpDescription,
altKey = false) {
_shortcuts.set(altKey ? `:${shortcutChar}` : shortcutChar, {
character: shortcutChar,
function: exec,
shortcutAttr,
altKey
});
if (helpDescription) {
this._addShortcutToHelp(altKey ? `:${shortcutChar}` : shortcutChar, helpDescription);
}
},
/**
* Unregisters a shortcut.
*
* @param shortcutChar unregisters the given shortcut, which means it will
* no longer be usable
* @param altKey whether or not shortcut is combo with alt key
*/
unregisterShortcut(shortcutChar, altKey = false) {
_shortcuts.delete(altKey ? `:${shortcutChar}` : shortcutChar);
_shortcutsHelp.delete(shortcutChar);
},
/**
* @param e a KeyboardEvent
* @returns {string} e.key or something close if not supported
*/
_getKeyboardKey(e) {
// If alt is pressed a different char can be returned so this takes
// the char from the code. It also prefixes with a colon to differentiate
// alt combo from simple keypress.
if (e.altKey) {
const key = e.code.replace('Key', '');
return `:${key}`;
}
// If e.key is a string, then it is assumed it already plainly states
// the key pressed. This may not be true in all cases, such as with Edge
// and "?", when the browser cannot properly map a key press event to a
// keyboard key. To be safe, when a key is "Unidentified" it must be
// further analyzed by jitsi to a key using e.which.
if (typeof e.key === 'string' && e.key !== 'Unidentified') {
return e.key;
}
if (e.type === 'keypress'
&& ((e.which >= 32 && e.which <= 126)
|| (e.which >= 160 && e.which <= 255))) {
return String.fromCharCode(e.which);
}
// try to fallback (0-9A-Za-z and QWERTY keyboard)
switch (e.which) {
case 27:
return 'Escape';
case 191:
return e.shiftKey ? '?' : '/';
}
if (e.shiftKey || e.type === 'keypress') {
return String.fromCharCode(e.which);
}
return String.fromCharCode(e.which).toLowerCase();
},
/**
* Adds the given shortcut to the help dialog.
*
* @param shortcutChar the shortcut character
* @param shortcutDescriptionKey the description of the shortcut
* @private
*/
_addShortcutToHelp(shortcutChar, shortcutDescriptionKey) {
_shortcutsHelp.set(shortcutChar, shortcutDescriptionKey);
},
/**
* Initialise global shortcuts.
* Global shortcuts are shortcuts for features that don't have a button or
* link associated with the action. In other words they represent actions
* triggered _only_ with a shortcut.
*/
_initGlobalShortcuts() {
this.registerShortcut('?', null, () => {
sendAnalytics(createShortcutEvent('help'));
this.openDialog();
}, 'keyboardShortcuts.toggleShortcuts');
// register SPACE shortcut in two steps to insure visibility of help
// message
this.registerShortcut(' ', null, () => {
sendAnalytics(createShortcutEvent('push.to.talk', RELEASED));
logger.log('Talk shortcut released');
APP.conference.muteAudio(true);
});
this._addShortcutToHelp('SPACE', 'keyboardShortcuts.pushToTalk');
/**
* FIXME: Currently focus keys are directly implemented below in
* onkeyup. They should be moved to the SmallVideo instead.
*/
this._addShortcutToHelp('0', 'keyboardShortcuts.focusLocal');
this._addShortcutToHelp('1-9', 'keyboardShortcuts.focusRemote');
}
};
export default KeyboardShortcut;

3095
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,14 +16,10 @@
"readmeFilename": "README.md",
"dependencies": {
"@amplitude/react-native": "2.7.0",
"@atlaskit/inline-dialog": "13.0.9",
"@atlaskit/inline-message": "11.0.8",
"@atlaskit/multi-select": "15.0.5",
"@atlaskit/theme": "11.0.2",
"@emotion/react": "11.10.0",
"@emotion/styled": "11.10.0",
"@emotion/react": "11.10.6",
"@emotion/styled": "11.10.6",
"@giphy/js-fetch-api": "4.7.1",
"@giphy/react-components": "5.6.0",
"@giphy/react-components": "6.8.1",
"@giphy/react-native-sdk": "1.7.0",
"@hapi/bourne": "2.0.0",
"@jitsi/excalidraw": "https://github.com/jitsi/excalidraw/releases/download/v0.0.12/jitsi-excalidraw-0.0.12.tgz",
@@ -33,13 +29,13 @@
"@jitsi/rtcstats": "9.5.1",
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz",
"@microsoft/microsoft-graph-client": "3.0.1",
"@mui/material": "5.10.2",
"@mui/styles": "5.10.2",
"@mui/material": "5.12.1",
"@mui/styles": "5.12.0",
"@react-native-async-storage/async-storage": "1.17.3",
"@react-native-community/clipboard": "1.5.1",
"@react-native-community/netinfo": "7.1.7",
"@react-native-community/slider": "4.1.12",
"@react-native-google-signin/google-signin": "7.0.4",
"@react-native-google-signin/google-signin": "9.0.2",
"@react-navigation/bottom-tabs": "6.5.3",
"@react-navigation/elements": "1.3.13",
"@react-navigation/material-top-tabs": "6.5.2",
@@ -48,13 +44,9 @@
"@svgr/webpack": "6.3.1",
"@tensorflow/tfjs-backend-wasm": "3.13.0",
"@tensorflow/tfjs-core": "3.13.0",
"@types/amplitude-js": "8.16.2",
"@types/audioworklet": "0.0.29",
"@types/w3c-image-capture": "1.0.6",
"@types/w3c-web-hid": "1.0.3",
"@vladmandic/human": "2.6.5",
"@vladmandic/human-models": "2.5.9",
"@xmldom/xmldom": "0.7.9",
"@xmldom/xmldom": "0.8.7",
"amplitude-js": "8.2.1",
"base64-js": "1.3.1",
"bc-css-flags": "3.0.0",
@@ -73,7 +65,7 @@
"js-md5": "0.6.1",
"js-sha512": "0.8.0",
"jwt-decode": "2.2.0",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1615.0.0+a23a8c7c/lib-jitsi-meet.tgz",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1626.0.0+a41aa571/lib-jitsi-meet.tgz",
"lodash": "4.17.21",
"moment": "2.29.4",
"moment-duration-format": "2.2.2",
@@ -112,7 +104,7 @@
"react-native-url-polyfill": "1.3.0",
"react-native-video": "https://git@github.com/react-native-video/react-native-video#7c48ae7c8544b2b537fb60194e9620b9fcceae52",
"react-native-watch-connectivity": "1.0.11",
"react-native-webrtc": "106.0.7",
"react-native-webrtc": "111.0.0",
"react-native-webview": "11.15.1",
"react-native-youtube-iframe": "2.2.1",
"react-redux": "7.1.0",
@@ -123,7 +115,6 @@
"redux-thunk": "2.4.1",
"resemblejs": "4.0.0",
"seamless-scroll-polyfill": "2.1.8",
"styled-components": "3.4.9",
"tss-react": "4.4.4",
"util": "0.12.1",
"uuid": "8.3.2",
@@ -140,17 +131,23 @@
"@babel/preset-flow": "7.16.0",
"@babel/preset-react": "7.16.0",
"@jitsi/eslint-config": "4.1.5",
"@types/amplitude-js": "8.16.2",
"@types/audioworklet": "0.0.29",
"@types/js-md5": "0.4.3",
"@types/lodash": "4.14.182",
"@types/punycode": "2.1.0",
"@types/react": "17.0.14",
"@types/react-dom": "17.0.14",
"@types/react-linkify": "1.0.1",
"@types/react-native": "0.68.9",
"@types/react-native-video": "5.0.14",
"@types/react-redux": "7.1.24",
"@types/react-window": "1.8.5",
"@types/resemblejs": "^4.1.0",
"@types/unorm": "1.3.28",
"@types/uuid": "8.3.4",
"@types/w3c-image-capture": "1.0.6",
"@types/w3c-web-hid": "1.0.3",
"@types/zxcvbn": "4.4.1",
"@typescript-eslint/eslint-plugin": "5.30.5",
"@typescript-eslint/parser": "5.30.4",
@@ -176,11 +173,16 @@
"ts-loader": "9.4.1",
"typescript": "4.7.4",
"unorm": "1.6.0",
"webpack": "5.57.1",
"webpack": "5.76.0",
"webpack-bundle-analyzer": "4.4.2",
"webpack-cli": "4.9.0",
"webpack-dev-server": "4.7.3"
},
"overrides": {
"strophe.js@1.6.0": {
"@xmldom/xmldom": "0.8.7"
}
},
"engines": {
"node": ">=14.0.0",
"npm": ">=7.0.0"
@@ -197,6 +199,8 @@
"lint-fix": "eslint --ext .js,.ts,.tsx --max-warnings 0 --fix .",
"postinstall": "patch-package --error-on-fail && jetify",
"validate": "npm ls",
"tsc-test:web": "tsc --project tsconfig.web.json --listFilesOnly | grep -v node_modules | grep native",
"tsc-test:native": "tsc --project tsconfig.native.json --listFilesOnly | grep -v node_modules | grep web",
"start": "make dev"
},
"resolutions": {

View File

@@ -1,14 +1,14 @@
diff --git a/node_modules/@giphy/js-analytics/dist/send-pingback.js b/node_modules/@giphy/js-analytics/dist/send-pingback.js
index 001345a..f303443 100644
index 989f0ff..149e77c 100644
--- a/node_modules/@giphy/js-analytics/dist/send-pingback.js
+++ b/node_modules/@giphy/js-analytics/dist/send-pingback.js
@@ -10,6 +10,9 @@ var global_1 = __importDefault(require("./global"));
var environment = (global_1.default === null || global_1.default === void 0 ? void 0 : global_1.default.GIPHY_PINGBACK_URL) || 'https://pingback.giphy.com';
var pingBackUrl = environment + "/v2/pingback?apikey=l0HlIwPWyBBUDAUgM";
var pingBackUrl = "".concat(environment, "/v2/pingback?apikey=l0HlIwPWyBBUDAUgM");
var sendPingback = function (events) {
+ // Disabled.
+ return Promise.resolve();
+
var headers = js_util_1.getGiphySDKRequestHeaders();
var headers = (0, js_util_1.getGiphySDKRequestHeaders)();
/* istanbul ignore next */
headers === null || headers === void 0 ? void 0 : headers.set('Content-Type', 'application/json');

View File

@@ -1,12 +0,0 @@
diff --git a/node_modules/@giphy/js-brand/dist/typography.js b/node_modules/@giphy/js-brand/dist/typography.js
index af796bc..585fa00 100644
--- a/node_modules/@giphy/js-brand/dist/typography.js
+++ b/node_modules/@giphy/js-brand/dist/typography.js
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.css = exports.fontSize = exports.fontFamily = void 0;
var emotion_1 = require("emotion");
// eslint-disable-next-line
-emotion_1.injectGlobal(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Rg.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Rg.woff') format('woff');\n}\n\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: bold;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Bd.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Bd.woff') format('woff');\n}\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: 900;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_XBd.woff') format('woff');\n}\n@font-face {\n font-family: 'nexablack'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/nexa_black-webfont.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/nexa_black-webfont.woff') format('woff');\n}\n@font-face {\n font-family: 'SSStandard'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/ss-standard.woff') format('woff');\n}\n@font-face {\n font-family: 'SSSocial'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/ss-social.woff') format('woff');\n}\n"], ["\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Rg.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Rg.woff') format('woff');\n}\n\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: bold;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Bd.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Bd.woff') format('woff');\n}\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: 900;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_XBd.woff') format('woff');\n}\n@font-face {\n font-family: 'nexablack'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/nexa_black-webfont.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/nexa_black-webfont.woff') format('woff');\n}\n@font-face {\n font-family: 'SSStandard'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/ss-standard.woff') format('woff');\n}\n@font-face {\n font-family: 'SSSocial'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/ss-social.woff') format('woff');\n}\n"])));
exports.fontFamily = {
title: "'nexablack', sans-serif",
body: 'interface, Helvetica Neue, helvetica, sans-serif;',

View File

@@ -0,0 +1,13 @@
diff --git a/node_modules/@giphy/js-brand/dist/typography.js b/node_modules/@giphy/js-brand/dist/typography.js
index 75ad96b..815cb8b 100644
--- a/node_modules/@giphy/js-brand/dist/typography.js
+++ b/node_modules/@giphy/js-brand/dist/typography.js
@@ -6,7 +6,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
Object.defineProperty(exports, "__esModule", { value: true });
exports.css = exports.fontSize = exports.fontFamily = exports.addFonts = void 0;
var emotion_1 = require("emotion");
-var addFonts = function () { return (0, emotion_1.injectGlobal)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Rg.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Rg.woff') format('woff');\n}\n\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: bold;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Bd.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Bd.woff') format('woff');\n}\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: 900;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_XBd.woff') format('woff');\n}\n@font-face {\n font-family: 'nexablack'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/nexa_black-webfont.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/nexa_black-webfont.woff') format('woff');\n}\n@font-face {\n font-family: 'SSStandard'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/ss-standard.woff') format('woff');\n}\n@font-face {\n font-family: 'SSSocial'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/ss-social.woff') format('woff');\n}\n"], ["\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Rg.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Rg.woff') format('woff');\n}\n\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: bold;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Bd.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_Bd.woff') format('woff');\n}\n@font-face {\n font-family: 'interface';\n font-style: normal;\n font-weight: 900;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/InterFace_W_XBd.woff') format('woff');\n}\n@font-face {\n font-family: 'nexablack'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/nexa_black-webfont.woff2') format('woff2'),\n url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/nexa_black-webfont.woff') format('woff');\n}\n@font-face {\n font-family: 'SSStandard'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/ss-standard.woff') format('woff');\n}\n@font-face {\n font-family: 'SSSocial'; \n font-style: normal;\n font-weight: normal;\n src: url('https://s3.amazonaws.com/giphyscripts/react-giphy-brand/fonts/ss-social.woff') format('woff');\n}\n"]))); };
+var addFonts = function () { };
exports.addFonts = addFonts;
try {
// in an env where process.env exists,

View File

@@ -1,5 +1,3 @@
// @flow
/**
* The type of (redux) action which signals that local media duration has changed.
*

View File

@@ -1,5 +1,4 @@
import { AtlasKitThemeProvider } from '@atlaskit/theme';
import React, { Fragment } from 'react';
import React from 'react';
import GlobalStyles from '../../base/ui/components/GlobalStyles.web';
import JitsiThemeProvider from '../../base/ui/components/JitsiThemeProvider.web';
@@ -31,9 +30,9 @@ export class App extends AbstractApp {
*/
_createExtraElement() {
return (
<Fragment>
<JitsiThemeProvider>
<OverlayContainer />
</Fragment>
</JitsiThemeProvider>
);
}
@@ -46,11 +45,9 @@ export class App extends AbstractApp {
_createMainElement(component: React.ComponentType, props: any) {
return (
<JitsiThemeProvider>
<AtlasKitThemeProvider mode = 'dark'>
<GlobalStyles />
<ChromeExtensionBanner />
{ super._createMainElement(component, props) }
</AtlasKitThemeProvider>
<GlobalStyles />
<ChromeExtensionBanner />
{ super._createMainElement(component, props) }
</JitsiThemeProvider>
);
}
@@ -63,9 +60,7 @@ export class App extends AbstractApp {
_renderDialogContainer() {
return (
<JitsiThemeProvider>
<AtlasKitThemeProvider mode = 'dark'>
<DialogContainer />
</AtlasKitThemeProvider>
<DialogContainer />
</JitsiThemeProvider>
);
}

View File

@@ -5,6 +5,7 @@ import '../base/media/middleware';
import '../dynamic-branding/middleware';
import '../e2ee/middleware';
import '../external-api/middleware';
import '../keyboard-shortcuts/middleware';
import '../no-audio-signal/middleware';
import '../notifications/middleware';
import '../noise-detection/middleware';

View File

@@ -1,5 +1,3 @@
// @flow
import '../analytics/reducer';
import '../authentication/reducer';
import '../av-moderation/reducer';

View File

@@ -1,5 +1,3 @@
// @flow
import '../mobile/audio-mode/reducer';
import '../mobile/background/reducer';
import '../mobile/call-integration/reducer';

View File

@@ -3,6 +3,7 @@ import '../base/tooltip/reducer';
import '../e2ee/reducer';
import '../face-landmarks/reducer';
import '../feedback/reducer';
import '../keyboard-shortcuts/reducer';
import '../no-audio-signal/reducer';
import '../noise-detection/reducer';
import '../participants-pane/reducer';

View File

@@ -43,6 +43,7 @@ import { IGifsState } from '../gifs/reducer';
import { IGoogleApiState } from '../google-api/reducer';
import { IInviteState } from '../invite/reducer';
import { IJaaSState } from '../jaas/reducer';
import { IKeyboardShortcutsState } from '../keyboard-shortcuts/types';
import { ILargeVideoState } from '../large-video/reducer';
import { ILobbyState } from '../lobby/reducer';
import { IMobileAudioModeState } from '../mobile/audio-mode/reducer';
@@ -133,6 +134,7 @@ export interface IReduxState {
'features/google-api': IGoogleApiState;
'features/invite': IInviteState;
'features/jaas': IJaaSState;
'features/keyboard-shortcuts': IKeyboardShortcutsState;
'features/large-video': ILargeVideoState;
'features/lobby': ILobbyState;
'features/mobile/audio-mode': IMobileAudioModeState;

View File

@@ -250,7 +250,7 @@ export default class BaseApp<P> extends Component<P, IState> {
* @returns {Promise}
*/
_navigate(route: {
component?: ComponentType;
component?: ComponentType<any>;
href?: string;
props?: Object;
}): Promise<any> {

View File

@@ -1,5 +1,3 @@
// @flow
/**
* The type of (redux) action which sets the audio-only flag for the current
* conference.

View File

@@ -71,7 +71,7 @@ export interface IProps {
/**
* The size of the avatar.
*/
size: number;
size?: number;
/**
* One of the expected status strings (e.g. 'available') to render a badge on the avatar, if necessary.

View File

@@ -3,6 +3,7 @@ import { sendAnalytics } from '../../analytics/functions';
import { appNavigate } from '../../app/actions';
import { IReduxState, IStore } from '../../app/types';
import { endpointMessageReceived } from '../../subtitles/actions.any';
import { iAmVisitor } from '../../visitors/functions';
import { getReplaceParticipant } from '../config/functions';
import { disconnect } from '../connection/actions';
import { JITSI_CONNECTION_CONFERENCE_KEY } from '../connection/constants';
@@ -450,11 +451,12 @@ export function conferenceUniqueIdSet(conference: IJitsiConference) {
*/
export function _conferenceWillJoin(conference: IJitsiConference) {
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
const state = getState();
const localTracks
= getLocalTracks(getState()['features/base/tracks'])
= getLocalTracks(state['features/base/tracks'])
.map(t => t.jitsiTrack);
if (localTracks.length) {
if (localTracks.length && !iAmVisitor(state)) {
_addLocalTracksToConference(conference, localTracks);
}
@@ -806,7 +808,7 @@ export function setStartReactionsMuted(muted: boolean, updateBackend = false) {
export function setPassword(
conference: IJitsiConference | undefined,
method: Function | undefined,
password: string) {
password?: string) {
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
if (!conference) {
return;

View File

@@ -159,7 +159,6 @@ export function forEachConference(
// Does the value of the base/conference's property look like a
// JitsiConference?
if (v && typeof v === 'object') {
// $FlowFixMe
const url: URL = v[JITSI_CONFERENCE_URL_KEY];
// XXX The Web version of Jitsi Meet does not utilize
@@ -309,6 +308,7 @@ export function getVisitorOptions(stateful: IStateful, params: Array<string>) {
muc: config.oldConfig.hosts.muc
},
focusUserJid: focusJid,
disableLocalStats: false,
bosh: config.oldConfig.bosh && appendURLParam(config.oldConfig.bosh, 'customusername', username),
websocket: config.oldConfig.websocket
&& appendURLParam(config.oldConfig.websocket, 'customusername', username),
@@ -339,6 +339,7 @@ export function getVisitorOptions(stateful: IStateful, params: Array<string>) {
},
focusUserJid: focusJid,
disableFocus: true, // This flag disables sending the initial conference request
disableLocalStats: true,
bosh: config.bosh && appendURLParam(config.bosh, 'vnode', vnode),
websocket: config.websocket && appendURLParam(config.websocket, 'vnode', vnode)
};

View File

@@ -1,6 +1,5 @@
// @flow
import { AnyAction } from 'redux';
import { readyToClose } from '../../../features/mobile/external-api/actions';
import {
ACTION_PINNED,
ACTION_UNPINNED,
@@ -9,11 +8,14 @@ import {
} from '../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../analytics/functions';
import { reloadNow } from '../../app/actions';
import { IReduxState, IStore } from '../../app/types';
import { removeLobbyChatParticipant } from '../../chat/actions.any';
import { openDisplayNamePrompt } from '../../display-name/actions';
import { readyToClose } from '../../mobile/external-api/actions';
import { showErrorNotification, showWarningNotification } from '../../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE } from '../../notifications/constants';
import { setIAmVisitor } from '../../visitors/actions';
import { iAmVisitor } from '../../visitors/functions';
import { overwriteConfig } from '../config/actions';
import { CONNECTION_ESTABLISHED, CONNECTION_FAILED } from '../connection/actionTypes';
import { connect, connectionDisconnected, disconnect } from '../connection/actions';
@@ -62,12 +64,10 @@ import {
} from './functions';
import logger from './logger';
declare var APP: Object;
/**
* Handler for before unload event.
*/
let beforeUnloadHandler;
let beforeUnloadHandler: Function | undefined;
/**
* Implements the middleware of the feature base/conference.
@@ -129,7 +129,7 @@ MiddlewareRegistry.register(store => next => action => {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _conferenceFailed({ dispatch, getState }, next, action) {
function _conferenceFailed({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
const { conference, error } = action;
if (error.name === JitsiConferenceErrors.REDIRECTED) {
@@ -191,7 +191,7 @@ function _conferenceFailed({ dispatch, getState }, next, action) {
const newConfig = restoreConferenceOptions(getState);
if (newConfig) {
dispatch(overwriteConfig(newConfig))
dispatch(overwriteConfig(newConfig)) // @ts-ignore
.then(dispatch(conferenceWillLeave(conference)))
.then(conference.leave())
.then(dispatch(disconnect()))
@@ -217,7 +217,7 @@ function _conferenceFailed({ dispatch, getState }, next, action) {
const [ vnode ] = error.params;
dispatch(overwriteConfig(newConfig))
dispatch(overwriteConfig(newConfig)) // @ts-ignore
.then(dispatch(conferenceWillLeave(conference)))
.then(conference.leave())
.then(dispatch(disconnect()))
@@ -234,7 +234,7 @@ function _conferenceFailed({ dispatch, getState }, next, action) {
if (typeof APP === 'undefined') {
!error.recoverable
&& conference
&& conference.leave(CONFERENCE_LEAVE_REASONS.UNRECOVERABLE_ERROR).catch(reason => {
&& conference.leave(CONFERENCE_LEAVE_REASONS.UNRECOVERABLE_ERROR).catch((reason: Error) => {
// Even though we don't care too much about the failure, it may be
// good to know that it happen, so log it (on the info level).
logger.info('JitsiConference.leave() rejected with:', reason);
@@ -267,7 +267,7 @@ function _conferenceFailed({ dispatch, getState }, next, action) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _conferenceJoined({ dispatch, getState }, next, action) {
function _conferenceJoined({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
const result = next(action);
const { conference } = action;
const { pendingSubjectChange } = getState()['features/base/conference'];
@@ -288,6 +288,8 @@ function _conferenceJoined({ dispatch, getState }, next, action) {
beforeUnloadHandler = () => {
dispatch(conferenceWillLeave(conference));
};
// @ts-ignore
window.addEventListener(disableBeforeUnloadHandlers ? 'unload' : 'beforeunload', beforeUnloadHandler);
if (requireDisplayName
@@ -313,7 +315,7 @@ function _conferenceJoined({ dispatch, getState }, next, action) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _connectionEstablished({ dispatch }, next, action) {
function _connectionEstablished({ dispatch }: IStore, next: Function, action: AnyAction) {
const result = next(action);
// FIXME: Workaround for the web version. Currently, the creation of the
@@ -330,7 +332,7 @@ function _connectionEstablished({ dispatch }, next, action) {
* @param {Object} state - The redux state.
* @returns {void}
*/
function _logJwtErrors(message, state) {
function _logJwtErrors(message: string, state: IReduxState) {
const { jwt } = state['features/base/jwt'];
if (!jwt) {
@@ -357,7 +359,7 @@ function _logJwtErrors(message, state) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _connectionFailed({ dispatch, getState }, next, action) {
function _connectionFailed({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
_logJwtErrors(action.error.message, getState());
const result = next(action);
@@ -417,7 +419,7 @@ function _connectionFailed({ dispatch, getState }, next, action) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _conferenceSubjectChanged({ dispatch, getState }, next, action) {
function _conferenceSubjectChanged({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
const result = next(action);
const { subject } = getState()['features/base/conference'];
@@ -442,7 +444,7 @@ function _conferenceSubjectChanged({ dispatch, getState }, next, action) {
* @param {Object} store - The redux store.
* @returns {void}
*/
function _conferenceWillLeave({ getState }: { getState: Function }) {
function _conferenceWillLeave({ getState }: IStore) {
_removeUnloadHandler(getState);
}
@@ -460,7 +462,7 @@ function _conferenceWillLeave({ getState }: { getState: Function }) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _pinParticipant({ getState }, next, action) {
function _pinParticipant({ getState }: IStore, next: Function, action: AnyAction) {
const state = getState();
const { conference } = state['features/base/conference'];
@@ -473,7 +475,7 @@ function _pinParticipant({ getState }, next, action) {
const pinnedParticipant = getPinnedParticipant(state);
const actionName = id ? ACTION_PINNED : ACTION_UNPINNED;
const local
= (participantById && participantById.local)
= participantById?.local
|| (!id && pinnedParticipant && pinnedParticipant.local);
let participantIdForEvent;
@@ -481,7 +483,7 @@ function _pinParticipant({ getState }, next, action) {
participantIdForEvent = local;
} else {
participantIdForEvent
= actionName === ACTION_PINNED ? id : pinnedParticipant && pinnedParticipant.id;
= actionName === ACTION_PINNED ? id : pinnedParticipant?.id;
}
sendAnalytics(createPinnedEvent(
@@ -501,10 +503,11 @@ function _pinParticipant({ getState }, next, action) {
* @param {Function} getState - The redux getState function.
* @returns {void}
*/
function _removeUnloadHandler(getState) {
function _removeUnloadHandler(getState: IStore['getState']) {
if (typeof beforeUnloadHandler !== 'undefined') {
const { disableBeforeUnloadHandlers = false } = getState()['features/base/config'];
// @ts-ignore
window.removeEventListener(disableBeforeUnloadHandlers ? 'unload' : 'beforeunload', beforeUnloadHandler);
beforeUnloadHandler = undefined;
}
@@ -522,7 +525,7 @@ function _removeUnloadHandler(getState) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _sendTones({ getState }, next, action) {
function _sendTones({ getState }: IStore, next: Function, action: AnyAction) {
const state = getState();
const { conference } = state['features/base/conference'];
@@ -549,15 +552,15 @@ function _sendTones({ getState }, next, action) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _setRoom({ dispatch, getState }, next, action) {
function _setRoom({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
const state = getState();
const { localSubject, subject } = state['features/base/config'];
const { room } = action;
if (room) {
// Set the stored subject.
dispatch(setLocalSubject(localSubject));
dispatch(setSubject(subject));
dispatch(setLocalSubject(localSubject ?? ''));
dispatch(setSubject(subject ?? ''));
}
return next(action);
@@ -572,15 +575,20 @@ function _setRoom({ dispatch, getState }, next, action) {
* @private
* @returns {Promise}
*/
function _syncConferenceLocalTracksWithState({ getState }, action) {
const conference = getCurrentConference(getState);
function _syncConferenceLocalTracksWithState({ getState }: IStore, action: AnyAction) {
const state = getState();
const conference = getCurrentConference(state);
let promise;
if (conference) {
const track = action.track.jitsiTrack;
if (action.type === TRACK_ADDED) {
promise = _addLocalTracksToConference(conference, [ track ]);
// If gUM is slow and tracks are created after the user has already joined the conference, avoid
// adding the tracks to the conference if the user is a visitor.
if (!iAmVisitor(state)) {
promise = _addLocalTracksToConference(conference, [ track ]);
}
} else {
promise = _removeLocalTracksFromConference(conference, [ track ]);
}
@@ -603,7 +611,7 @@ function _syncConferenceLocalTracksWithState({ getState }, action) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _trackAddedOrRemoved(store, next, action) {
function _trackAddedOrRemoved(store: IStore, next: Function, action: AnyAction) {
const track = action.track;
// TODO All track swapping should happen here instead of conference.js.
@@ -628,7 +636,7 @@ function _trackAddedOrRemoved(store, next, action) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _updateLocalParticipantInConference({ dispatch, getState }, next, action) {
function _updateLocalParticipantInConference({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
const { conference } = getState()['features/base/conference'];
const { participant } = action;
const result = next(action);

View File

@@ -1,4 +1,3 @@
import {
setPrejoinPageVisibility,
setSkipPrejoinOnReload

View File

@@ -60,6 +60,7 @@ export interface IJitsiConference {
getMetadataHandler: Function;
getName: Function;
getParticipantById: Function;
getParticipantCount: Function;
getParticipants: Function;
getRole: Function;
getSpeakerStats: () => ISpeakerStats;
@@ -101,7 +102,9 @@ export interface IJitsiConference {
sendMessage: Function;
sendPrivateTextMessage: Function;
sendTextMessage: Function;
sendTones: Function;
sessionId: string;
setAssumedBandwidthBps: (value: number) => void;
setDesktopSharingFrameRate: Function;
setDisplayName: Function;
setLocalParticipantProperty: Function;

View File

@@ -253,6 +253,7 @@ export interface IConfig {
disableDeepLinking?: boolean;
disableFilmstripAutohiding?: boolean;
disableFocus?: boolean;
disableIframeAPI?: boolean;
disableIncomingMessageSound?: boolean;
disableInitialGUM?: boolean;
disableInviteFunctions?: boolean;

View File

@@ -7,6 +7,7 @@ import _ from 'lodash';
import { IReduxState } from '../../app/types';
import { browser } from '../lib-jitsi-meet';
import { IMediaState } from '../media/reducer';
import { parseURLParams } from '../util/parseURLParams';
import { IConfig } from './configType';
@@ -65,7 +66,7 @@ export function getMeetingRegion(state: IReduxState) {
* @param {Object} _state - The global state.
* @returns {boolean}
*/
export function getMultipleVideoSendingSupportFeatureFlag(_state: IReduxState) {
export function getMultipleVideoSendingSupportFeatureFlag(_state: IReduxState | IMediaState) {
return browser.supportsUnifiedPlan();
}

View File

@@ -1,4 +1,5 @@
import { IReduxState } from '../../app/types';
import JitsiMeetJS from '../../base/lib-jitsi-meet';
import { IConfig, IDeeplinkingConfig, IDeeplinkingMobileConfig, IDeeplinkingPlatformConfig } from './configType';
import { TOOLBAR_BUTTONS } from './constants';
@@ -75,8 +76,7 @@ export function isToolbarButtonEnabled(buttonName: string, state: IReduxState |
* @returns {boolean}
*/
export function areAudioLevelsEnabled(state: IReduxState): boolean {
// Default to false for React Native as audio levels are of no interest to the mobile app.
return navigator.product !== 'ReactNative' && !state['features/base/config'].disableAudioLevels;
return !state['features/base/config'].disableAudioLevels && JitsiMeetJS.isCollectingLocalStats();
}
/**

View File

@@ -45,25 +45,18 @@ const INITIAL_NON_RN_STATE: IConfig = {
const INITIAL_RN_STATE: IConfig = {
analytics: {},
// FIXME The support for audio levels in lib-jitsi-meet polls the statistics
// of WebRTC at a short interval multiple times a second. Unfortunately,
// React Native is slow to fetch these statistics from the native WebRTC
// API, through the React Native bridge and eventually to JavaScript.
// Because the audio levels are of no interest to the mobile app, it is
// fastest to merely disable them.
disableAudioLevels: true,
// FIXME: Mobile codecs should probably be configurable separately, rather
// than requiring this override here...
// FIXME: than requiring this override here...
// TODO: Remove comments later, after next release, so that the fix is applied
p2p: {
disabledCodec: 'vp9',
preferredCodec: 'vp8'
// disabledCodec: 'vp9',
// preferredCodec: 'vp8'
},
videoQuality: {
disabledCodec: 'vp9',
preferredCodec: 'vp8'
// disabledCodec: 'vp9',
// preferredCodec: 'vp8'
}
};

View File

@@ -1,5 +1,3 @@
// @flow
/**
* The type of (redux) action which signals that a connection disconnected.
*

View File

@@ -72,7 +72,7 @@ export type ConnectionFailedError = {
* connection: JitsiConnection
* }}
*/
export function connectionDisconnected(connection: Object) {
export function connectionDisconnected(connection?: Object) {
return {
type: CONNECTION_DISCONNECTED,
connection

View File

@@ -19,7 +19,7 @@ interface IProps extends AbstractProps, WithTranslation {
/**
* The i18n key of the text label for the cancel button.
*/
cancelLabel: string;
cancelLabel?: string;
/**
* The React {@code Component} children.
@@ -29,7 +29,7 @@ interface IProps extends AbstractProps, WithTranslation {
/**
* The i18n key of the text label for the confirm button.
*/
confirmLabel: string;
confirmLabel?: string;
/**
* Dialog description key for translations.

View File

@@ -30,12 +30,12 @@ export type DialogProps = {
/**
* The handler for onCancel event.
*/
onCancel: Function;
onCancel?: Function;
/**
* The handler for the event when submitting the dialog.
*/
onSubmit: Function;
onSubmit?: Function;
/**
* Additional style to be applied on the dialog.

View File

@@ -1,5 +1,3 @@
// @flow
/**
* Flag indicating if add-people functionality should be enabled.
* Default: enabled (true).

View File

@@ -1,5 +1,3 @@
// @flow
/**
* The type of (redux) action which signals that i18next has been initialized.
*/

View File

@@ -3,7 +3,9 @@ import React, { useCallback } from 'react';
import { Container } from '../../react/components/index';
import { StyleType, styleTypeToObject } from '../../styles/functions';
interface IProps {
import { IIconProps } from './types';
interface IProps extends IIconProps {
/**
* The id of the element this button icon controls.
@@ -60,11 +62,6 @@ interface IProps {
*/
id?: string;
/**
* Function to invoke on click.
*/
onClick?: Function;
/**
* Keydown handler.
*/
@@ -93,7 +90,7 @@ interface IProps {
/**
* Style object to be applied.
*/
style?: StyleType;
style?: StyleType | StyleType[];
/**
* TabIndex for the Icon.

View File

@@ -0,0 +1,5 @@
import { GestureResponderEvent } from 'react-native';
export interface IIconProps {
onClick?: (e?: GestureResponderEvent) => void;
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
export interface IIconProps {
onClick?: (e?: React.MouseEvent) => void;
}

View File

@@ -1,5 +1,3 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/jitsi-local-storage');

View File

@@ -1,6 +1,7 @@
// @flow
// @ts-ignore
import Bourne from '@hapi/bourne';
// eslint-disable-next-line lines-around-comment
// @ts-ignore
import { jitsiLocalStorage } from '@jitsi/js-utils/jitsi-local-storage';
import { browser } from '../lib-jitsi-meet';
@@ -9,9 +10,6 @@ import { parseURLParams } from '../util/parseURLParams';
import logger from './logger';
declare var APP: Object;
declare var config: Object;
/**
* Handles changes of the fake local storage.
@@ -29,7 +27,7 @@ function onFakeLocalStorageChanged() {
* @returns {boolean} - True if the local storage of the host page needs to be used instead jitsi-meet's local storage
* and false otherwise.
*/
function shouldUseHostPageLocalStorage(urlParams) {
function shouldUseHostPageLocalStorage(urlParams: { 'config.useHostPageLocalStorage'?: boolean; }) {
// NOTE: normally the url params and the config will be merged into the redux store. But we want to setup the local
// storage as soon as possible, the store is not created yet and the merging of the URL params and the config
// haven't been executed yet. That's why we need to manually parse the URL params and also access the config through
@@ -58,6 +56,7 @@ function shouldUseHostPageLocalStorage(urlParams) {
* @returns {void}
*/
function setupJitsiLocalStorage() {
// @ts-ignore
const urlParams = parseURLParams(window.location);
if (shouldUseHostPageLocalStorage(urlParams)) {

View File

@@ -1,5 +1,3 @@
// @flow
/**
* The type of (redux) action to add known domains to the list of domains known
* to the feature base/known-domains.

View File

@@ -29,7 +29,7 @@ interface IState {
* A react {@code Component} that implements an expanded label as tooltip-like
* component to explain the meaning of the {@code Label}.
*/
export default class ExpandedLabel<P extends IProps> extends Component<P, IState> {
export default abstract class ExpandedLabel<P extends IProps> extends Component<P, IState> {
/**
* Instantiates a new {@code ExpandedLabel} instance.
*
@@ -85,7 +85,7 @@ export default class ExpandedLabel<P extends IProps> extends Component<P, IState
*
* @returns {string}
*/
_getLabel: () => string;
abstract _getLabel(): string;
/**
* Defines the color of the expanded label. This function returns a default

View File

@@ -1,5 +1,3 @@
// @flow
/**
* The type of (redux) action which sets the last-n for the conference.
*

View File

@@ -2,5 +2,6 @@
// of) the project jitsi-meet.
//
// @ts-ignore
import JitsiMeetJS from 'lib-jitsi-meet';
export { JitsiMeetJS as default };

View File

@@ -1,5 +0,0 @@
// @flow
declare var JitsiMeetJS: Object;
export default JitsiMeetJS;

View File

@@ -0,0 +1,3 @@
declare let JitsiMeetJS: any;
export default JitsiMeetJS;

View File

@@ -157,7 +157,7 @@ export function setVideoAvailable(available: boolean) {
* @returns {Function}
*/
export function setVideoMuted(
muted: boolean,
muted: boolean | number,
authority: number = VIDEO_MUTISM_AUTHORITY.USER,
ensureTrack = false) {
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {

View File

@@ -1,4 +1,4 @@
// @flow
import { AnyAction } from 'redux';
import {
createStartAudioOnlyEvent,
@@ -7,6 +7,7 @@ import {
createTrackMutedEvent
} from '../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../analytics/functions';
import { IStore } from '../../app/types';
import { APP_STATE_CHANGED } from '../../mobile/background/actionTypes';
import { showWarningNotification } from '../../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE } from '../../notifications/constants';
@@ -23,6 +24,7 @@ import { getPropertyValue } from '../settings/functions.any';
import { TRACK_ADDED } from '../tracks/actionTypes';
import { destroyLocalTracks } from '../tracks/actions.any';
import { isLocalTrackMuted, isLocalVideoTrackDesktop, setTrackMuted } from '../tracks/functions.any';
import { ITrack } from '../tracks/types';
import {
SET_AUDIO_MUTED,
@@ -155,7 +157,7 @@ MiddlewareRegistry.register(store => next => action => {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _appStateChanged({ dispatch, getState }, next, action) {
function _appStateChanged({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
if (navigator.product === 'ReactNative') {
const { appState } = action;
const mute = appState !== 'active' && !isLocalVideoTrackDesktop(getState());
@@ -180,7 +182,7 @@ function _appStateChanged({ dispatch, getState }, next, action) {
* @private
* @returns {Object} The value returned by {@code next(action)}.
*/
function _setAudioOnly({ dispatch, getState }, next, action) {
function _setAudioOnly({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
const { audioOnly } = action;
const state = getState();
@@ -209,7 +211,7 @@ function _setAudioOnly({ dispatch, getState }, next, action) {
* @returns {Object} The new state that is the result of the reduction of the
* specified {@code action}.
*/
function _setRoom({ dispatch, getState }, next, action) {
function _setRoom({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
// Figure out the desires/intents i.e. the state of base/media. There are
// multiple desires/intents ordered by precedence such as server-side
// config, config overrides in the user-supplied URL, user's own app
@@ -222,7 +224,7 @@ function _setRoom({ dispatch, getState }, next, action) {
const videoMuted = roomIsValid ? getStartWithVideoMuted(state) : _VIDEO_INITIAL_MEDIA_STATE.muted;
sendAnalytics(
createStartMutedConfigurationEvent('local', audioMuted, videoMuted));
createStartMutedConfigurationEvent('local', audioMuted, Boolean(videoMuted)));
logger.log(
`Start muted: ${audioMuted ? 'audio, ' : ''}${
videoMuted ? 'video' : ''}`);
@@ -295,7 +297,7 @@ function _setRoom({ dispatch, getState }, next, action) {
* @private
* @returns {void}
*/
function _syncTrackMutedState({ getState }, track) {
function _syncTrackMutedState({ getState }: IStore, track: ITrack) {
const state = getState()['features/base/media'];
const mediaType = track.mediaType;
const muted = Boolean(state[mediaType].muted);

View File

@@ -1 +1 @@
import './middleware.any.js';
import './middleware.any';

View File

@@ -1,4 +1,4 @@
import './middleware.any.js';
import './middleware.any';
import { IStore } from '../../app/types';
import { showNotification } from '../../notifications/actions';

View File

@@ -1,5 +1,5 @@
import { useHeaderHeight } from '@react-navigation/elements';
import React, { ReactElement, useCallback, useEffect, useState } from 'react';
import React, { useCallback, useEffect, useState } from 'react';
import {
Keyboard,
KeyboardAvoidingView,
@@ -8,44 +8,44 @@ import {
} from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { StyleType } from '../../styles';
import { StyleType } from '../../styles/functions.any';
type Props = {
interface IProps {
/**
* Adds bottom padding.
*/
addBottomPadding?: boolean,
addBottomPadding?: boolean;
/**
* The children component(s) of the Modal, to be rendered.
*/
children: ReactElement,
children: React.ReactNode;
/**
* Additional style to be appended to the KeyboardAvoidingView content container.
*/
contentContainerStyle?: StyleType,
contentContainerStyle?: StyleType;
/**
* Disable forced keyboard dismiss?
*/
disableForcedKeyboardDismiss?: boolean,
disableForcedKeyboardDismiss?: boolean;
/**
* Is a text input rendered at the bottom of the screen?
*/
hasBottomTextInput: boolean,
hasBottomTextInput: boolean;
/**
* Is the screen rendering a tab navigator?
*/
hasTabNavigator: boolean,
hasTabNavigator: boolean;
/**
* Additional style to be appended to the KeyboardAvoidingView.
*/
style?: StyleType
style?: StyleType;
}
const JitsiKeyboardAvoidingView = (
@@ -57,7 +57,7 @@ const JitsiKeyboardAvoidingView = (
hasTabNavigator,
hasBottomTextInput,
style
}: Props) => {
}: IProps) => {
const headerHeight = useHeaderHeight();
const insets = useSafeAreaInsets();
const [ bottomPadding, setBottomPadding ] = useState(insets.bottom);
@@ -77,11 +77,11 @@ const JitsiKeyboardAvoidingView = (
const iosVerticalOffset
= headerHeight + noNotchDevicePadding + tabNavigatorPadding;
const androidVerticalOffset = hasBottomTextInput
? headerHeight + StatusBar.currentHeight : headerHeight;
? headerHeight + Number(StatusBar.currentHeight) : headerHeight;
// Tells the view what to do with taps
const shouldSetResponse = useCallback(() => !disableForcedKeyboardDismiss);
const onRelease = useCallback(() => Keyboard.dismiss());
const shouldSetResponse = useCallback(() => !disableForcedKeyboardDismiss, []);
const onRelease = useCallback(() => Keyboard.dismiss(), []);
return (
<KeyboardAvoidingView

View File

@@ -1,59 +1,58 @@
import React from 'react';
import { View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { Edge, SafeAreaView } from 'react-native-safe-area-context';
import { StyleType } from '../../styles';
import { StyleType } from '../../styles/functions.any';
import JitsiKeyboardAvoidingView from './JitsiKeyboardAvoidingView';
import styles from './styles';
type Props = {
interface IProps {
/**
* Adds bottom padding.
*/
addBottomPadding: boolean,
/**
* Additional style to be appended to the KeyboardAvoidingView content container.
*/
contentContainerStyle?: StyleType,
addBottomPadding?: boolean;
/**
* The children component(s) of the Modal, to be rendered.
*/
children: React.ReactNode,
children: React.ReactNode;
/**
* Additional style to be appended to the KeyboardAvoidingView content container.
*/
contentContainerStyle?: StyleType;
/**
* Disabled forced keyboard dismiss?
*/
disableForcedKeyboardDismiss?: boolean,
disableForcedKeyboardDismiss?: boolean;
/**
* Optional function that renders a footer component, if needed.
*/
footerComponent?: Function,
footerComponent?: Function;
/**
* Is a text input rendered at the bottom of the screen?
*/
hasBottomTextInput?: boolean,
hasBottomTextInput?: boolean;
/**
* Is the screen rendering a tab navigator?
*/
hasTabNavigator?: boolean,
hasTabNavigator?: boolean;
/**
* Insets for the SafeAreaView.
*/
safeAreaInsets?: Array,
safeAreaInsets?: Edge[];
/**
* Additional style to be appended to the KeyboardAvoidingView containing the content of the modal.
*/
style?: StyleType
style?: StyleType;
}
const JitsiScreen = ({
@@ -66,7 +65,7 @@ const JitsiScreen = ({
hasBottomTextInput = false,
safeAreaInsets = [ 'left', 'right' ],
style
}: Props) => {
}: IProps) => {
const renderContent = () => (
<JitsiKeyboardAvoidingView
addBottomPadding = { addBottomPadding }
@@ -80,7 +79,7 @@ const JitsiScreen = ({
style = { styles.safeArea }>
{ children }
</SafeAreaView>
{ footerComponent && footerComponent() }
{ footerComponent?.() }
</JitsiKeyboardAvoidingView>
);

View File

@@ -1,5 +1,4 @@
// @flow
import { IStateful } from '../../app/types';
import { toState } from '../../redux/functions';
/**
@@ -11,7 +10,7 @@ import { toState } from '../../redux/functions';
* features/base/config.
* @returns {number}.
*/
export function getClientWidth(stateful: Object) {
export function getClientWidth(stateful: IStateful) {
const state = toState(stateful)['features/base/responsive-ui'];
return state.clientWidth;
@@ -26,7 +25,7 @@ export function getClientWidth(stateful: Object) {
* features/base/config.
* @returns {number}.
*/
export function getClientHeight(stateful: Object) {
export function getClientHeight(stateful: IStateful) {
const state = toState(stateful)['features/base/responsive-ui'];
return state.clientHeight;

View File

@@ -1,5 +1,3 @@
// @flow
/**
* Create an action for when dominant speaker changes.
*

View File

@@ -1,20 +1,24 @@
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import { GestureResponderEvent, Text, TextStyle, View, ViewStyle } from 'react-native';
import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import {
isTrackStreamingStatusActive,
isTrackStreamingStatusInactive
} from '../../../connection-indicator/functions';
import SharedVideo from '../../../shared-video/components/native/SharedVideo';
import { IStateful } from '../../app/types';
import Avatar from '../../avatar/components/Avatar';
import { translate } from '../../i18n/functions';
import VideoTrack from '../../media/components/native/VideoTrack';
import { shouldRenderVideoTrack } from '../../media/functions';
import Container from '../../react/components/native/Container';
import { toState } from '../../redux/functions';
import { StyleType } from '../../styles/functions.any';
import TestHint from '../../testing/components/TestHint';
import { getVideoTrackByParticipant } from '../../tracks/functions';
import { ITrack } from '../../tracks/types';
import { getParticipantById, getParticipantDisplayName, isSharedVideoParticipant } from '../functions';
import styles from './styles';
@@ -22,69 +26,69 @@ import styles from './styles';
/**
* The type of the React {@link Component} props of {@link ParticipantView}.
*/
type Props = {
interface IProps {
/**
* Whether the connection is inactive or not.
*
* @private
*/
_isConnectionInactive: boolean,
_isConnectionInactive: boolean;
/**
* Whether the participant is a shared video participant.
*/
_isSharedVideoParticipant: boolean,
_isSharedVideoParticipant: boolean;
/**
* The name of the participant which this component represents.
*
* @private
*/
_participantName: string,
_participantName: string;
/**
* True if the video should be rendered, false otherwise.
*/
_renderVideo: boolean,
_renderVideo: boolean;
/**
* The video Track of the participant with {@link #participantId}.
*/
_videoTrack: Object,
_videoTrack?: ITrack;
/**
* The avatar size.
*/
avatarSize: number,
avatarSize: number;
/**
* Whether video should be disabled for his view.
*/
disableVideo: ?boolean,
disableVideo?: boolean;
/**
* Callback to invoke when the {@code ParticipantView} is clicked/pressed.
*/
onPress: Function,
onPress: (e?: GestureResponderEvent) => void;
/**
* The ID of the participant (to be) depicted by {@link ParticipantView}.
*
* @public
*/
participantId: string,
participantId: string;
/**
* The style, if any, to apply to {@link ParticipantView} in addition to its
* default style.
*/
style: Object,
style: StyleType;
/**
* The function to translate human-readable text.
*/
t: Function,
t: Function;
/**
* The test hint id which can be used to locate the {@code ParticipantView}
@@ -92,26 +96,26 @@ type Props = {
* {@code participantId} with the following format will be used:
* {@code `org.jitsi.meet.Participant#${participantId}`}.
*/
testHintId: ?string,
testHintId?: string;
/**
* Indicates if the connectivity info label should be shown, if appropriate.
* It will be shown in case the connection is interrupted.
*/
useConnectivityInfoLabel: boolean,
useConnectivityInfoLabel: boolean;
/**
* The z-order of the {@link Video} of {@link ParticipantView} in the
* stacking space of all {@code Video}s. For more details, refer to the
* {@code zOrder} property of the {@code Video} class for React Native.
*/
zOrder: number,
zOrder: number;
/**
* Indicates whether zooming (pinch to zoom and/or drag) is enabled.
*/
zoomEnabled: boolean
};
zoomEnabled: boolean;
}
/**
* Implements a React Component which depicts a specific participant's avatar
@@ -119,7 +123,7 @@ type Props = {
*
* @augments Component
*/
class ParticipantView extends Component<Props> {
class ParticipantView extends Component<IProps> {
/**
* Renders the inactive connection status label.
@@ -144,8 +148,8 @@ class ParticipantView extends Component<Props> {
return (
<View
pointerEvents = 'box-none'
style = { containerStyle }>
<Text style = { styles.connectionInfoText }>
style = { containerStyle as ViewStyle }>
<Text style = { styles.connectionInfoText as TextStyle }>
{ t('connection.LOW_BANDWIDTH', { displayName }) }
</Text>
</View>
@@ -200,7 +204,7 @@ class ParticipantView extends Component<Props> {
zoomEnabled = { this.props.zoomEnabled } /> }
{ !renderSharedVideo && !renderVideo
&& <View style = { styles.avatarContainer }>
&& <View style = { styles.avatarContainer as ViewStyle }>
<Avatar
participantId = { this.props.participantId }
size = { this.props.avatarSize } />
@@ -221,9 +225,9 @@ class ParticipantView extends Component<Props> {
* @param {Object} ownProps - The React {@code Component} props passed to the
* associated (instance of) {@code ParticipantView}.
* @private
* @returns {Props}
* @returns {IProps}
*/
function _mapStateToProps(state, ownProps) {
function _mapStateToProps(state: IReduxState, ownProps: any) {
const { disableVideo, participantId } = ownProps;
const participant = getParticipantById(state, participantId);
const videoTrack = getVideoTrackByParticipant(state, participant);
@@ -245,7 +249,7 @@ function _mapStateToProps(state, ownProps) {
* @param {string} id - The ID of the participant.
* @returns {boolean}
*/
function shouldRenderParticipantVideo(stateful, id) {
function shouldRenderParticipantVideo(stateful: IStateful, id: string) {
const state = toState(stateful);
const participant = getParticipantById(state, id);

View File

@@ -1,5 +1,3 @@
// @flow
import { BoxModel } from '../../styles/components/styles/BoxModel';
import { ColorPalette } from '../../styles/components/styles/ColorPalette';

View File

@@ -3,14 +3,18 @@ import { getGravatarURL } from '@jitsi/js-utils/avatar';
import { IReduxState, IStore } from '../../app/types';
import { isStageFilmstripAvailable } from '../../filmstrip/functions';
import { isAddPeopleEnabled, isDialOutEnabled } from '../../invite/functions';
import { toggleShareDialog } from '../../share-room/actions';
import { IStateful } from '../app/types';
import { GRAVATAR_BASE_URL } from '../avatar/constants';
import { isCORSAvatarURL } from '../avatar/functions';
import { getCurrentConference } from '../conference/functions';
import { ADD_PEOPLE_ENABLED } from '../flags/constants';
import { getFeatureFlag } from '../flags/functions';
import i18next from '../i18n/i18next';
import { MEDIA_TYPE, VIDEO_TYPE } from '../media/constants';
import { toState } from '../redux/functions';
import { getScreenShareTrack } from '../tracks/functions';
import { getScreenShareTrack } from '../tracks/functions.any';
import { createDeferred } from '../util/helpers';
import {
@@ -22,6 +26,7 @@ import {
import { preloadImage } from './preloadImage';
import { FakeParticipant, IJitsiParticipant, IParticipant, ISourceInfo } from './types';
/**
* Temp structures for avatar urls to be checked/preloaded.
*/
@@ -706,3 +711,32 @@ export function getRaiseHandsQueue(stateful: IStateful): Array<{ id: string; rai
export function hasRaisedHand(participant?: IParticipant): boolean {
return Boolean(participant?.raisedHandTimestamp);
}
/**
* Add people feature enabling/disabling.
*
* @param {Object|Function} stateful - Object or function that can be resolved
* to the Redux state.
* @returns {boolean}
*/
export const addPeopleFeatureControl = (stateful: IStateful) => {
const state = toState(stateful);
return getFeatureFlag(state, ADD_PEOPLE_ENABLED, true)
&& (isAddPeopleEnabled(state) || isDialOutEnabled(state));
};
/**
* Controls share dialog visibility.
*
* @param {boolean} addPeopleFeatureEnabled - Checks if add people functionality is enabled.
* @param {Function} dispatch - The Redux dispatch function.
* @returns {Function}
*/
export const setShareDialogVisiblity = (addPeopleFeatureEnabled: boolean, dispatch: Function) => {
if (addPeopleFeatureEnabled) {
dispatch(toggleShareDialog(false));
} else {
dispatch(toggleShareDialog(true));
}
};

View File

@@ -1,4 +1,4 @@
import React, { Component, ReactNode } from 'react';
import React, { Component, ComponentType, ReactNode } from 'react';
import { StyleType, getFixedPlatformStyle } from '../../styles/functions';
@@ -27,6 +27,8 @@ export interface IProps {
*/
className?: string;
id?: string;
/**
* The event handler/listener to be invoked when this
* {@code AbstractContainer} is clicked on Web or pressed on React
@@ -36,11 +38,19 @@ export interface IProps {
*/
onClick?: Function;
onKeyDown?: Function;
onKeyPress?: Function;
role?: string;
/**
* The style (as in stylesheet) to be applied to this
* {@code AbstractContainer}.
*/
style?: StyleType;
style?: StyleType | StyleType[];
tabIndex?: number;
/**
* If this instance is to provide visual feedback when touched, then
@@ -48,7 +58,7 @@ export interface IProps {
* undefined and {@link onClick} is defined, {@code touchFeedback} is
* considered defined as {@code true}.
*/
touchFeedback?: Function;
touchFeedback?: boolean;
/**
* Color to display when clicked.
@@ -82,7 +92,7 @@ export default class AbstractContainer<P extends IProps> extends Component<P> {
* @protected
* @returns {ReactElement}
*/
_render(type: string, props?: P) {
_render(type: string | ComponentType<any>, props?: P) {
const {
children,
style,

Some files were not shown because too many files have changed in this diff Show More