Compare commits

..

18 Commits

Author SHA1 Message Date
Calinteodor
52d630b3ff feat(android): list post notifications permission (#14657)
* feat(android): list post notifications permission
2024-04-23 13:35:58 +03:00
Calin-Teodor
c23c611e7b chore(rn, versions): bump app versions 2024-04-19 14:48:31 +03:00
Calin-Teodor
008e5f3b2e chore(rn, versions): bump sdk versions 2024-04-19 14:47:37 +03:00
Calin-Teodor
c22287b022 chore(rn, versions): bump react native sdk version and dependencies 2024-04-19 14:45:17 +03:00
Calin-Teodor
ff0f3544f5 chore(rn, versions): bump sdk versions 2024-04-19 14:45:17 +03:00
Calin-Teodor
92d114c1d1 chore(rn, versions): bump app version 2024-04-19 14:45:17 +03:00
Calin-Teodor
39f79c075c chore(rn, versions): bump app versions 2024-04-19 14:45:17 +03:00
Calin-Teodor
1ba747e0f1 chore(rn, versions): bump sdk versions 2024-04-19 14:45:17 +03:00
Ilayda Dastan
ce840cc7b6 fix(chat) improve new message visibility for local participant
Closes: https://github.com/jitsi/jitsi-meet/issues/14561
2024-04-19 09:58:40 +02:00
Saúl Ibarra Corretgé
cc03949b90 chore(deps) react-native-webrtc@118.0.7 2024-04-18 16:56:08 +02:00
Calin-Teodor
158e1a56e5 feat(react-native-sdk): update readme file 2024-04-18 17:55:54 +03:00
Calin-Teodor
16597a2535 feat(android): list media projection permission in manifest 2024-04-18 17:14:25 +03:00
Saúl Ibarra Corretgé
2f3cf9f530 chore(deps) lib-jitsi-meet@latest
https://github.com/jitsi/lib-jitsi-meet/compare/v1811.0.0+86e2fb2b...v1812.0.0+2eddb859
2024-04-18 15:11:59 +02:00
Дамян Минков
347cc32ecc chore(deps) lib-jitsi-meet@latest (#14642) 2024-04-16 19:53:23 -04:00
Calin-Teodor
c0602abbca feat(base/config): whitelist customToolbarButtons 2024-04-16 17:39:20 +03:00
Calin-Teodor
55e9136b91 feat(toolbox/native): fixed icon for CustomOptionButton and styles 2024-04-16 16:21:12 +03:00
damencho
da01ca23db fix(visitors): Fixes promote all. 2024-04-16 06:20:06 -05:00
Hristo Terezov
b470c201b2 fix(conference): use up to date state in useVideoStream. 2024-04-12 16:08:21 -05:00
21 changed files with 7105 additions and 128 deletions

View File

@@ -26,5 +26,5 @@ android.useAndroidX=true
android.enableJetifier=true
android.bundle.enableUncompressedNativeLibs=false
appVersion=99.0.0
sdkVersion=99.0.0
appVersion=24.2.2
sdkVersion=9.2.2

View File

@@ -13,6 +13,8 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-feature
android:glEsVersion="0x00020000"

View File

@@ -16,6 +16,8 @@
package org.jitsi.meet.sdk;
import static android.Manifest.permission.POST_NOTIFICATIONS;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
@@ -24,6 +26,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ServiceInfo;
import android.os.Build;
import android.os.Bundle;
@@ -31,6 +34,8 @@ import android.os.IBinder;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import com.facebook.react.modules.core.PermissionListener;
import org.jitsi.meet.sdk.log.JitsiMeetLogger;
import java.util.HashMap;
@@ -52,12 +57,13 @@ public class JitsiMeetOngoingConferenceService extends Service
private final BroadcastReceiver broadcastReceiver = new BroadcastReceiver();
private static final int POST_NOTIFICATIONS_PERMISSION_REQUEST_CODE = (int) (Math.random() * Short.MAX_VALUE);
private boolean isAudioMuted;
static final int NOTIFICATION_ID = new Random().nextInt(99999) + 10000;
public static void launch(Context context, HashMap<String, Object> extraData) {
private static void doLaunch(Context context, HashMap<String, Object> extraData) {
OngoingNotification.createNotificationChannel((Activity) context);
@@ -87,6 +93,31 @@ public class JitsiMeetOngoingConferenceService extends Service
}
}
public static void launch(Context context, HashMap<String, Object> extraData) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
PermissionListener listener = new PermissionListener() {
@Override
public boolean onRequestPermissionsResult(int i, String[] strings, int[] results) {
if (results.length > 0 && results[0] == PackageManager.PERMISSION_GRANTED) {
doLaunch(context, extraData);
}
return true;
}
};
JitsiMeetActivityDelegate.requestPermissions(
(Activity) context,
new String[]{POST_NOTIFICATIONS},
POST_NOTIFICATIONS_PERMISSION_REQUEST_CODE,
listener
);
} else {
doLaunch(context, extraData);
}
}
public static void abort(Context context) {
Intent intent = new Intent(context, JitsiMeetOngoingConferenceService.class);
context.stopService(intent);

View File

@@ -1337,12 +1337,11 @@ export default {
* @returns {Promise}
*/
useVideoStream(newTrack) {
const state = APP.store.getState();
logger.debug(`useVideoStream: ${newTrack}`);
return new Promise((resolve, reject) => {
_replaceLocalVideoTrackQueue.enqueue(onFinish => {
const state = APP.store.getState();
const oldTrack = getLocalJitsiVideoTrack(state);
logger.debug(`useVideoStream: Replacing ${oldTrack} with ${newTrack}`);

View File

@@ -453,7 +453,7 @@ PODS:
- react-native-video/Video (6.0.0-alpha.11):
- PromisesSwift
- React-Core
- react-native-webrtc (118.0.6):
- react-native-webrtc (118.0.7):
- JitsiWebRTC (~> 118.0.0)
- React-Core
- react-native-webview (13.5.1):
@@ -881,7 +881,7 @@ SPEC CHECKSUMS:
react-native-slider: 1cdd6ba29675df21f30544253bf7351d3c2d68c4
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
react-native-video: 472b7c366eaaaa0207e546d9a50410df89790bcf
react-native-webrtc: 4a9428c3ced472d3b08e1fbc4bfdc082692f2d5d
react-native-webrtc: 8b024c7bb9a005d2b9efeba4c691172dbd00268d
react-native-webview: 8baa0f5c6d336d6ba488e942bcadea5bf51f050a
React-NativeModulesApple: 4225ac31a26696c02c54b471052b3e85e74a9a0c
React-perflogger: cb433f318c6667060fc1f62e26eb58d6eb30a627

View File

@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>99.0.0</string>
<string>24.2.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>

View File

@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>99.0.0</string>
<string>24.2.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>

View File

@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>99.0.0</string>
<string>24.2.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>UISupportedInterfaceOrientations</key>

View File

@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>99.0.0</string>
<string>24.2.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CLKComplicationPrincipalClass</key>

View File

@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>99.0.0</string>
<string>9.2.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>

View File

@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>99.0.0</string>
<string>9.2.2</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>

24
package-lock.json generated
View File

@@ -61,7 +61,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/v1807.0.0+b59b8cb0/lib-jitsi-meet.tgz",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1812.0.0+2eddb859/lib-jitsi-meet.tgz",
"lodash": "4.17.21",
"moment": "2.29.4",
"moment-duration-format": "2.2.2",
@@ -100,7 +100,7 @@
"react-native-url-polyfill": "2.0.0",
"react-native-video": "6.0.0-alpha.11",
"react-native-watch-connectivity": "1.1.0",
"react-native-webrtc": "118.0.6",
"react-native-webrtc": "118.0.7",
"react-native-webview": "13.5.1",
"react-native-youtube-iframe": "2.3.0",
"react-redux": "7.2.9",
@@ -12866,8 +12866,8 @@
},
"node_modules/lib-jitsi-meet": {
"version": "0.0.0",
"resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1807.0.0+b59b8cb0/lib-jitsi-meet.tgz",
"integrity": "sha512-M51XeZWqPiSUzRNz8JPxbi45iBBYzK3Z+7l/MFDGBoDtNNe3KXnWUjwL/F6PK/AL1VlN5nvp51sxQ8K/gOXl1g==",
"resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1812.0.0+2eddb859/lib-jitsi-meet.tgz",
"integrity": "sha512-svKmkJzs6BNrOgTHST7aAxpGHLAVAlxuX7VQrGVL8HUpU6FDrqHBRSMQXX0937jir6OpIhSCjoFK6maZ9xfOZg==",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
@@ -16914,9 +16914,9 @@
}
},
"node_modules/react-native-webrtc": {
"version": "118.0.6",
"resolved": "https://registry.npmjs.org/react-native-webrtc/-/react-native-webrtc-118.0.6.tgz",
"integrity": "sha512-4PD22zk3MPYCZnEz2n8jVOqopzrawrWRkrPQfZ6sElH2HgPyZXpVXjt5uIMiAHHaS0nxqqKSuKNzNELfTNvvUg==",
"version": "118.0.7",
"resolved": "https://registry.npmjs.org/react-native-webrtc/-/react-native-webrtc-118.0.7.tgz",
"integrity": "sha512-odgd4CNSGQmI8n/pEbxlUtJBTJ8uqE51B1/NUEAvO1AQbeXsyFNHEG0H2T27eMefo5u0GKcRpNkZpXi6fctTkQ==",
"dependencies": {
"base64-js": "1.5.1",
"debug": "4.3.4",
@@ -29374,8 +29374,8 @@
}
},
"lib-jitsi-meet": {
"version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1807.0.0+b59b8cb0/lib-jitsi-meet.tgz",
"integrity": "sha512-M51XeZWqPiSUzRNz8JPxbi45iBBYzK3Z+7l/MFDGBoDtNNe3KXnWUjwL/F6PK/AL1VlN5nvp51sxQ8K/gOXl1g==",
"version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1812.0.0+2eddb859/lib-jitsi-meet.tgz",
"integrity": "sha512-svKmkJzs6BNrOgTHST7aAxpGHLAVAlxuX7VQrGVL8HUpU6FDrqHBRSMQXX0937jir6OpIhSCjoFK6maZ9xfOZg==",
"requires": {
"@jitsi/js-utils": "2.2.1",
"@jitsi/logger": "2.0.2",
@@ -32312,9 +32312,9 @@
}
},
"react-native-webrtc": {
"version": "118.0.6",
"resolved": "https://registry.npmjs.org/react-native-webrtc/-/react-native-webrtc-118.0.6.tgz",
"integrity": "sha512-4PD22zk3MPYCZnEz2n8jVOqopzrawrWRkrPQfZ6sElH2HgPyZXpVXjt5uIMiAHHaS0nxqqKSuKNzNELfTNvvUg==",
"version": "118.0.7",
"resolved": "https://registry.npmjs.org/react-native-webrtc/-/react-native-webrtc-118.0.7.tgz",
"integrity": "sha512-odgd4CNSGQmI8n/pEbxlUtJBTJ8uqE51B1/NUEAvO1AQbeXsyFNHEG0H2T27eMefo5u0GKcRpNkZpXi6fctTkQ==",
"requires": {
"base64-js": "1.5.1",
"debug": "4.3.4",

View File

@@ -67,7 +67,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/v1807.0.0+b59b8cb0/lib-jitsi-meet.tgz",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1812.0.0+2eddb859/lib-jitsi-meet.tgz",
"lodash": "4.17.21",
"moment": "2.29.4",
"moment-duration-format": "2.2.2",
@@ -106,7 +106,7 @@
"react-native-url-polyfill": "2.0.0",
"react-native-video": "6.0.0-alpha.11",
"react-native-watch-connectivity": "1.1.0",
"react-native-webrtc": "118.0.6",
"react-native-webrtc": "118.0.7",
"react-native-webview": "13.5.1",
"react-native-youtube-iframe": "2.3.0",
"react-redux": "7.2.9",

View File

@@ -6,13 +6,15 @@ Inside your project, run;
```console
npm i @jitsi/react-native-sdk
```
<br/><br/>Additionally, if not already installed, some dependencies will need to be added.
If there are conflicts, you can use ```--force```
<br/>Additionally, if not already installed, some dependencies will need to be added.
This can be done by running the following script:
```console
node node_modules/@jitsi/react-native-sdk/update_dependencies.js
```
This will check and update all your dependencies.<br/><br/>
After that you need to ```npm i```, if some dependency versions were updated.
[comment]: # (These deps definitely need to be added manually, more could be neccesary)
@@ -47,7 +49,7 @@ module.exports = (async () => {
})();
```
### iOS
## iOS
#### Project Info.plist
- Add a *Privacy - Camera Usage Description*
@@ -65,7 +67,7 @@ Run;
cd ios && pod install && cd ..
```
### Android
## Android
- In your build.gradle have at least `minSdkVersion = 24`
- In `android/app/src/debug/AndroidManifest.xml` and `android/app/src/main/AndroidManifest.xml`, under the `</application>` tag, include
@@ -73,26 +75,56 @@ cd ios && pod install && cd ..
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
```
- In `android/app/src/main/AndroidManifest.xml`, under the `</application>` tag, include
### Services
#### Screen share
- Go to your `MainApplication.java` file and add:
1. `import com.oney.WebRTCModule.WebRTCModuleOptions;` that comes from `react-native-webrtc` dependency.
2. `WebRTCModuleOptions options = WebRTCModuleOptions.getInstance();` instance it.
3. `options.enableMediaProjectionService = true;` enable foreground service that takes care of screen-sharing feature.
- Go to your `android/app/src/main/AndroidManifest.xml`, under the `</application>` tag and include
```xml
<service
android:name="org.jitsi.meet.sdk.JitsiMeetOngoingConferenceService"
android:foregroundServiceType="mediaProjection" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
```
This will take care of the screen share feature.
If you want to test all the steps before applying them to your app, you can check our React Native SDK sample app here:
https://github.com/jitsi/jitsi-meet-sdk-samples/tree/master/react-native
### Using JWT tokens
## Using JWT tokens
- If you are planning to use tokens or another domain you can do that by updating the following props, as shown below.
- For example:
```javascript
<JitsiMeeting
room={'ThisIsNotATestRoomName'}
serverURL={'https://meet.jit.si/'}
token={'dkhalhfajhflahlfaahalhfahfsl'} />
room = { 'ThisIsNotATestRoomName' }
serverURL = { 'https://meet.jit.si/' }
token={ 'dkhalhfajhflahlfaahalhfahfsl' } />
```
## Using custom overflow menu buttons
- If you are planning to use tokens or another domain you can do that by updating the following props, as shown below.
- For example:
```javascript
<JitsiMeeting
config = {{
customToolbarButtons: [
{
icon: "https://w7.pngwing.com/pngs/987/537/png-transparent-download-downloading-save-basic-user-interface-icon-thumbnail.png",
id: "btn1",
text: "Button one"
}, {
icon: "https://w7.pngwing.com/pngs/987/537/png-transparent-download-downloading-save-basic-user-interface-icon-thumbnail.png",
id: "btn2",
text: "Button two"
}
]
}}
room = { 'ThisIsNotATestRoomName' }
serverURL = { 'https://meet.jit.si/' }
token = { 'dkhalhfajhflahlfaahalhfahfsl' } />
```
For more details on how you can use React Native SDK with React Native app, you can follow this link:

6891
react-native-sdk/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@jitsi/react-native-sdk",
"version": "0.0.0",
"version": "2.2.1",
"description": "React Native SDK for Jitsi Meet.",
"main": "index.tsx",
"license": "Apache-2.0",
@@ -11,83 +11,83 @@
"url": "git+https://github.com/jitsi/jitsi-meet.git"
},
"dependencies": {
"@jitsi/js-utils": "0.0.0",
"@jitsi/logger": "0.0.0",
"@jitsi/rtcstats": "0.0.0",
"@react-navigation/bottom-tabs": "0.0.0",
"@react-navigation/elements": "0.0.0",
"@react-navigation/material-top-tabs": "0.0.0",
"@react-navigation/native": "0.0.0",
"@react-navigation/stack": "0.0.0",
"@xmldom/xmldom": "0.0.0",
"base64-js": "0.0.0",
"grapheme-splitter": "0.0.0",
"i18n-iso-countries": "0.0.0",
"i18next": "0.0.0",
"js-md5": "0.0.0",
"i18next-http-backend": "0.0.0",
"js-sha512": "0.0.0",
"jwt-decode": "0.0.0",
"lib-jitsi-meet": "0.0.0",
"lodash": "0.0.0",
"moment": "0.0.0",
"moment-duration-format": "0.0.0",
"optional-require": "0.0.0",
"promise.allsettled": "0.0.0",
"punycode": "0.0.0",
"react-emoji-render": "0.0.0",
"react-i18next": "0.0.0",
"react-linkify": "0.0.0",
"react-native-dialog": "0.0.0",
"react-native-svg-transformer": "0.0.0",
"react-native-tab-view": "0.0.0",
"react-native-url-polyfill": "0.0.0",
"react-native-youtube-iframe": "0.0.0",
"react-redux": "0.0.0",
"redux": "0.0.0",
"redux-thunk": "0.0.0",
"unorm": "0.0.0",
"util": "0.0.0",
"uuid": "0.0.0",
"zxcvbn": "0.0.0"
"@jitsi/js-utils": "2.2.1",
"@jitsi/logger": "2.0.2",
"@jitsi/rtcstats": "9.5.1",
"@react-navigation/bottom-tabs": "6.5.8",
"@react-navigation/elements": "1.3.18",
"@react-navigation/material-top-tabs": "6.6.3",
"@react-navigation/native": "6.1.7",
"@react-navigation/stack": "6.3.17",
"@xmldom/xmldom": "0.8.7",
"base64-js": "1.5.1",
"grapheme-splitter": "1.0.4",
"i18n-iso-countries": "6.8.0",
"i18next": "17.0.6",
"js-md5": "0.6.1",
"i18next-http-backend": "2.2.1",
"js-sha512": "0.8.0",
"jwt-decode": "2.2.0",
"lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1811.0.0+86e2fb2b/lib-jitsi-meet.tgz",
"lodash": "4.17.21",
"moment": "2.29.4",
"moment-duration-format": "2.2.2",
"optional-require": "1.0.3",
"promise.allsettled": "1.0.4",
"punycode": "2.3.0",
"react-emoji-render": "1.2.4",
"react-i18next": "10.11.4",
"react-linkify": "1.0.0-alpha",
"react-native-dialog": "https://github.com/jitsi/react-native-dialog/releases/download/v9.2.2-jitsi.1/react-native-dialog-9.2.2.tgz",
"react-native-svg-transformer": "1.1.0",
"react-native-tab-view": "3.5.2",
"react-native-url-polyfill": "2.0.0",
"react-native-youtube-iframe": "2.3.0",
"react-redux": "7.2.9",
"redux": "4.0.4",
"redux-thunk": "2.4.1",
"unorm": "1.6.0",
"util": "0.12.1",
"uuid": "8.3.2",
"zxcvbn": "4.4.2"
},
"peerDependencies": {
"@amplitude/react-native": "0.0.0",
"@braintree/sanitize-url": "0.0.0",
"@giphy/react-native-sdk": "0.0.0",
"@react-native/metro-config": "0.0.0",
"@react-native-async-storage/async-storage": "0.0.0",
"@react-native-community/clipboard": "0.0.0",
"@react-native-community/netinfo": "0.0.0",
"@react-native-community/slider": "0.0.0",
"@react-native-google-signin/google-signin": "0.0.0",
"@amplitude/react-native": "2.7.0",
"@braintree/sanitize-url": "7.0.0",
"@giphy/react-native-sdk": "2.3.0",
"@react-native/metro-config": "0.72.9",
"@react-native-async-storage/async-storage": "1.19.4",
"@react-native-community/clipboard": "1.5.1",
"@react-native-community/netinfo": "11.1.0",
"@react-native-community/slider": "4.4.3",
"@react-native-google-signin/google-signin": "10.1.0",
"react-native": "*",
"react": "*",
"react-native-background-timer": "0.0.0",
"react-native-calendar-events": "0.0.0",
"react-native-default-preference": "0.0.0",
"react-native-device-info": "0.0.0",
"react-native-get-random-values": "0.0.0",
"react-native-gesture-handler": "0.0.0",
"react-native-immersive-mode": "0.0.0",
"react-native-keep-awake": "0.0.0",
"react-native-pager-view": "0.0.0",
"react-native-paper": "0.0.0",
"react-native-performance": "0.0.0",
"react-native-orientation-locker": "0.0.0",
"react-native-safe-area-context": "0.0.0",
"react-native-screens": "0.0.0",
"react-native-sound": "0.0.0",
"react-native-splash-screen": "0.0.0",
"react-native-svg": "0.0.0",
"react-native-video": "0.0.0",
"react-native-watch-connectivity": "0.0.0",
"react-native-webrtc": "0.0.0",
"react-native-webview": "0.0.0",
"text-encoding": "0.0.0"
"react-native-background-timer": "2.4.1",
"react-native-calendar-events": "2.2.0",
"react-native-default-preference": "1.4.4",
"react-native-device-info": "10.9.0",
"react-native-get-random-values": "1.9.0",
"react-native-gesture-handler": "2.9.0",
"react-native-immersive-mode": "2.0.1",
"react-native-keep-awake": "4.0.0",
"react-native-pager-view": "6.2.0",
"react-native-paper": "5.10.3",
"react-native-performance": "5.0.0",
"react-native-orientation-locker": "1.6.0",
"react-native-safe-area-context": "4.7.1",
"react-native-screens": "3.24.0",
"react-native-sound": "0.11.2",
"react-native-splash-screen": "3.3.0",
"react-native-svg": "13.13.0",
"react-native-video": "6.0.0-alpha.11",
"react-native-watch-connectivity": "1.1.0",
"react-native-webrtc": "118.0.6",
"react-native-webview": "13.5.1",
"text-encoding": "0.7.0"
},
"overrides": {
"@xmldom/xmldom": "0.0.0"
"@xmldom/xmldom": "0.8.7"
},
"scripts": {
"postinstall": "node sdk_instructions.js",

View File

@@ -76,6 +76,7 @@ export default [
'channelLastN',
'connectionIndicators',
'constraints',
'customToolbarButtons',
'brandingRoomAlias',
'debug',
'debugAudioLevels',

View File

@@ -2,7 +2,7 @@ import throttle from 'lodash/throttle';
import React, { RefObject } from 'react';
import { scrollIntoView } from 'seamless-scroll-polyfill';
import { MESSAGE_TYPE_REMOTE } from '../../constants';
import { MESSAGE_TYPE_LOCAL, MESSAGE_TYPE_REMOTE } from '../../constants';
import AbstractMessageContainer, { IProps } from '../AbstractMessageContainer';
import ChatMessageGroup from './ChatMessageGroup';
@@ -134,17 +134,19 @@ export default class MessageContainer extends AbstractMessageContainer<IProps, I
/**
* Implements {@code Component#componentDidUpdate}.
* If the user receive a new message scroll automatically to the bottom if scroll position was at the bottom.
* If the user receive a new message or the local user send a new message,
* scroll automatically to the bottom if scroll position was at the bottom.
* Otherwise update hasNewMessages from component state.
*
* @inheritdoc
* @returns {void}
*/
componentDidUpdate(prevProps: IProps) {
const hasNewMessages = this.props.messages.length !== prevProps.messages.length;
const newMessages = this.props.messages.filter(message => !prevProps.messages.includes(message));
const hasLocalMessage = newMessages.map(message => message.messageType).includes(MESSAGE_TYPE_LOCAL);
if (hasNewMessages) {
if (this.state.isScrolledToBottom) {
if (newMessages.length > 0) {
if (this.state.isScrolledToBottom || hasLocalMessage) {
this.scrollToElement(false, null);
} else {
// eslint-disable-next-line react/no-did-update-set-state

View File

@@ -1,10 +1,10 @@
import React from 'react';
import { Image } from 'react-native';
import { SvgCssUri } from 'react-native-svg';
import { connect } from 'react-redux';
import { translate } from '../../../base/i18n/functions';
import AbstractButton, { IProps as AbstractButtonProps }
from '../../../base/toolbox/components/AbstractButton';
import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
import styles from './styles';
@@ -30,11 +30,30 @@ class CustomOptionButton extends AbstractButton<IProps> {
*
* @returns {React.Component}
*/
icon = () => (
<Image
source = {{ uri: this.iconSrc }}
style = { styles.iconImageStyles } />
);
icon = () => {
let iconComponent;
if (!this.iconSrc) {
return null;
}
if (this.iconSrc?.includes('svg')) {
iconComponent
= (
<SvgCssUri
style = { styles.iconImageStyles }
uri = { this.iconSrc } />);
} else {
iconComponent
= (
<Image
source = {{ uri: this.iconSrc }}
style = { styles.iconImageStyles }
tintColor = { 'white' } />);
}
return iconComponent;
};
label = this.text;
}

View File

@@ -106,8 +106,8 @@ const styles = {
},
iconImageStyles: {
height: BaseTheme.spacing[5],
width: BaseTheme.spacing[5]
height: BaseTheme.spacing[4],
width: BaseTheme.spacing[4]
}
};

View File

@@ -443,8 +443,8 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul
process_promotion_response(room, data.id, data.approved and 'true' or 'false');
else
-- we are in the case with admit all, we need to read data.ids
for i in pairs(data.ids) do
process_promotion_response(room, data.id, data.approved and 'true' or 'false');
for _,value in pairs(data.ids) do
process_promotion_response(room, value, data.approved and 'true' or 'false');
end
end
end