Bladeren bron

e2ee: show warning if not all participants support E2EE

Refs: https://github.com/jitsi/lib-jitsi-meet/pull/1108
master
Saúl Ibarra Corretgé 5 jaren geleden
bovenliggende
commit
e2788e0fb2
3 gewijzigde bestanden met toevoegingen van 23 en 1 verwijderingen
  1. 1
    0
      lang/main.json
  2. 7
    0
      react/features/base/participants/middleware.js
  3. 15
    1
      react/features/e2ee/components/E2EEDialog.js

+ 1
- 0
lang/main.json Bestand weergeven

@@ -178,6 +178,7 @@
178 178
         "e2eeDescription": "<p>End-to-End Encryption is currently <strong>EXPERIMENTAL</strong>. Please see <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a> for details.</p><br/><p>Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: recording, live streaming and phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.</p>",
179 179
         "e2eeLabel": "Key",
180 180
         "e2eeTitle": "End-to-End Encryption",
181
+        "e2eeWarning": "<br /><p><strong>WARNING:</strong> Not all participants in this meeting seem to have support for End-to-End encryption. If you enable it they won't be able to see nor hear you.</p>",
181 182
         "enterDisplayName": "Please enter your name here",
182 183
         "error": "Error",
183 184
         "externalInstallationMsg": "You need to install our desktop sharing extension.",

+ 7
- 0
react/features/base/participants/middleware.js Bestand weergeven

@@ -196,6 +196,13 @@ StateListenerRegistry.register(
196 196
                 JitsiConferenceEvents.PARTICIPANT_PROPERTY_CHANGED,
197 197
                 (participant, propertyName, oldValue, newValue) => {
198 198
                     switch (propertyName) {
199
+                    case 'features_e2ee':
200
+                        store.dispatch(participantUpdated({
201
+                            conference,
202
+                            id: participant.getId(),
203
+                            e2eeSupported: newValue
204
+                        }));
205
+                        break;
199 206
                     case 'features_jigasi':
200 207
                         store.dispatch(participantUpdated({
201 208
                             conference,

+ 15
- 1
react/features/e2ee/components/E2EEDialog.js Bestand weergeven

@@ -7,6 +7,7 @@ import { FieldTextStateless as TextField } from '@atlaskit/field-text';
7 7
 import { createE2EEEvent, sendAnalytics } from '../../analytics';
8 8
 import { Dialog } from '../../base/dialog';
9 9
 import { translate, translateToHTML } from '../../base/i18n';
10
+import { getParticipants } from '../../base/participants';
10 11
 import { connect } from '../../base/redux';
11 12
 
12 13
 import { setE2EEKey } from '../actions';
@@ -14,6 +15,11 @@ import { setE2EEKey } from '../actions';
14 15
 
15 16
 type Props = {
16 17
 
18
+    /**
19
+     * Indicates whether all participants in the conference currently support E2EE.
20
+     */
21
+    _everyoneSupportsE2EE: boolean,
22
+
17 23
     /**
18 24
      * The current E2EE key.
19 25
      */
@@ -70,7 +76,7 @@ class E2EEDialog extends Component<Props, State> {
70 76
      * @returns {ReactElement}
71 77
      */
72 78
     render() {
73
-        const { t } = this.props;
79
+        const { _everyoneSupportsE2EE, t } = this.props;
74 80
 
75 81
         return (
76 82
             <Dialog
@@ -81,6 +87,12 @@ class E2EEDialog extends Component<Props, State> {
81 87
                 <div className = 'e2ee-destription'>
82 88
                     { translateToHTML(t, 'dialog.e2eeDescription') }
83 89
                 </div>
90
+                {
91
+                    !_everyoneSupportsE2EE
92
+                        && <div className = 'e2ee-warn'>
93
+                            { translateToHTML(t, 'dialog.e2eeWarning') }
94
+                        </div>
95
+                }
84 96
                 <TextField
85 97
                     autoFocus = { true }
86 98
                     compact = { true }
@@ -133,8 +145,10 @@ class E2EEDialog extends Component<Props, State> {
133 145
  */
134 146
 function mapStateToProps(state) {
135 147
     const { e2eeKey } = state['features/e2ee'];
148
+    const participants = getParticipants(state).filter(p => !p.local);
136 149
 
137 150
     return {
151
+        _everyoneSupportsE2EE: participants.every(p => Boolean(p.e2eeSupported)),
138 152
         _key: e2eeKey || ''
139 153
     };
140 154
 }

Laden…
Annuleren
Opslaan