浏览代码

Remove UI for local connectivity issues (#5016)

* ref(web): removes video blur when ICE is disconnected.

Removes the blur effect from the large video and stops showing
the network connectivity issues message when ICE disconnects.

The feature has been considered too disruptive and there's a plan to
have it replaced with a more subtle indication.

* remove RECONNECTING key from main.json
master
Paweł Domas 5 年前
父节点
当前提交
97e8a6c3f3
没有帐户链接到提交者的电子邮件

+ 0
- 23
css/_videolayout_default.scss 查看文件

578
     filter: grayscale(100%);
578
     filter: grayscale(100%);
579
 }
579
 }
580
 
580
 
581
-.videoProblemFilter {
582
-    -webkit-filter: blur(10px) grayscale(.5) opacity(0.8);
583
-    filter: blur(10px) grayscale(.5) opacity(0.8);
584
-}
585
-
586
 .videoThumbnailProblemFilter {
581
 .videoThumbnailProblemFilter {
587
     -webkit-filter: grayscale(100%);
582
     -webkit-filter: grayscale(100%);
588
     filter: grayscale(100%);
583
     filter: grayscale(100%);
618
     display: none;
613
     display: none;
619
 }
614
 }
620
 
615
 
621
-#localConnectionMessage {
622
-    display: none;
623
-    position: absolute;
624
-    left: 0;
625
-    width: 100%;
626
-    top:50%;
627
-    z-index: $zindex2;
628
-    font-weight: 600;
629
-    font-size: 14px;
630
-    text-align: center;
631
-    color: #FFF;
632
-    opacity: .80;
633
-    text-shadow:    0px 0px 1px rgba(0,0,0,0.3),
634
-                    0px 1px 1px rgba(0,0,0,0.3),
635
-                    1px 0px 1px rgba(0,0,0,0.3),
636
-                    0px 0px 1px rgba(0,0,0,0.3);
637
-}
638
-
639
 .display-avatar-with-name {
616
 .display-avatar-with-name {
640
     .avatar-container {
617
     .avatar-container {
641
         visibility: visible;
618
         visibility: visible;

+ 0
- 1
css/filmstrip/_tile_view_overrides.scss 查看文件

22
         display: none;
22
         display: none;
23
     }
23
     }
24
 
24
 
25
-    #localConnectionMessage,
26
     #remoteConnectionMessage,
25
     #remoteConnectionMessage,
27
     .watermark {
26
     .watermark {
28
         z-index: $filmstripVideosZ + 1;
27
         z-index: $filmstripVideosZ + 1;

+ 0
- 1
lang/main.json 查看文件

81
         "GET_SESSION_ID_ERROR": "Get session-id error: {{code}}",
81
         "GET_SESSION_ID_ERROR": "Get session-id error: {{code}}",
82
         "GOT_SESSION_ID": "Obtaining session-id... Done",
82
         "GOT_SESSION_ID": "Obtaining session-id... Done",
83
         "LOW_BANDWIDTH": "Video for {{displayName}} has been turned off to save bandwidth",
83
         "LOW_BANDWIDTH": "Video for {{displayName}} has been turned off to save bandwidth",
84
-        "RECONNECTING": "A network problem occurred. Reconnecting...",
85
         "USER_CONNECTION_INTERRUPTED": "{{displayName}} is having connectivity issues..."
84
         "USER_CONNECTION_INTERRUPTED": "{{displayName}} is having connectivity issues..."
86
     },
85
     },
87
     "connectionindicator": {
86
     "connectionindicator": {

+ 3
- 87
modules/UI/videolayout/LargeVideoManager.js 查看文件

140
         container.onHoverOut(e);
140
         container.onHoverOut(e);
141
     }
141
     }
142
 
142
 
143
-    /**
144
-     * Called when the media connection has been interrupted.
145
-     */
146
-    onVideoInterrupted() {
147
-        this.enableLocalConnectionProblemFilter(true);
148
-        this._setLocalConnectionMessage('connection.RECONNECTING');
149
-
150
-        // Show the message only if the video is currently being displayed
151
-        this.showLocalConnectionMessage(
152
-            LargeVideoManager.isVideoContainer(this.state));
153
-    }
154
-
155
-    /**
156
-     * Called when the media connection has been restored.
157
-     */
158
-    onVideoRestored() {
159
-        this.enableLocalConnectionProblemFilter(false);
160
-        this.showLocalConnectionMessage(false);
161
-    }
162
-
163
     /**
143
     /**
164
      *
144
      *
165
      */
145
      */
269
                 messageKey = 'connection.LOW_BANDWIDTH';
249
                 messageKey = 'connection.LOW_BANDWIDTH';
270
             }
250
             }
271
 
251
 
272
-            // Make sure no notification about remote failure is shown as
273
-            // its UI conflicts with the one for local connection interrupted.
274
-            // For the purposes of UI indicators, audio only is considered as
275
-            // an "active" connection.
276
-            const overrideAndHide
277
-                = APP.conference.isAudioOnly()
278
-                    || APP.conference.isConnectionInterrupted();
252
+            // Do not show connection status message in the audio only mode,
253
+            // because it's based on the video playback status.
254
+            const overrideAndHide = APP.conference.isAudioOnly();
279
 
255
 
280
             this.updateParticipantConnStatusIndication(
256
             this.updateParticipantConnStatusIndication(
281
                     id,
257
                     id,
390
             .forEach(type => this.resizeContainer(type, animate));
366
             .forEach(type => this.resizeContainer(type, animate));
391
     }
367
     }
392
 
368
 
393
-    /**
394
-     * Enables/disables the filter indicating a video problem to the user caused
395
-     * by the problems with local media connection.
396
-     *
397
-     * @param enable <tt>true</tt> to enable, <tt>false</tt> to disable
398
-     */
399
-    enableLocalConnectionProblemFilter(enable) {
400
-        this.videoContainer.enableLocalConnectionProblemFilter(enable);
401
-    }
402
-
403
     /**
369
     /**
404
      * Updates the src of the dominant speaker avatar
370
      * Updates the src of the dominant speaker avatar
405
      */
371
      */
478
         $('.watermark').css('visibility', show ? 'visible' : 'hidden');
444
         $('.watermark').css('visibility', show ? 'visible' : 'hidden');
479
     }
445
     }
480
 
446
 
481
-    /**
482
-     * Shows/hides the message indicating problems with local media connection.
483
-     * @param {boolean|null} show(optional) tells whether the message is to be
484
-     * displayed or not. If missing the condition will be based on the value
485
-     * obtained from {@link APP.conference.isConnectionInterrupted}.
486
-     */
487
-    showLocalConnectionMessage(show) {
488
-        if (typeof show !== 'boolean') {
489
-            // eslint-disable-next-line no-param-reassign
490
-            show = APP.conference.isConnectionInterrupted();
491
-        }
492
-
493
-        const element = document.getElementById('localConnectionMessage');
494
-
495
-        if (element) {
496
-            if (show) {
497
-                element.classList.add('show');
498
-            } else {
499
-                element.classList.remove('show');
500
-            }
501
-        }
502
-
503
-        if (show) {
504
-            // Avatar message conflicts with 'videoConnectionMessage',
505
-            // so it must be hidden
506
-            this.showRemoteConnectionMessage(false);
507
-        }
508
-    }
509
-
510
     /**
447
     /**
511
      * Shows hides the "avatar" message which is to be displayed either in
448
      * Shows hides the "avatar" message which is to be displayed either in
512
      * the middle of the screen or below the avatar image.
449
      * the middle of the screen or below the avatar image.
531
 
468
 
532
         if (show) {
469
         if (show) {
533
             $('#remoteConnectionMessage').css({ display: 'block' });
470
             $('#remoteConnectionMessage').css({ display: 'block' });
534
-
535
-            // 'videoConnectionMessage' message conflicts with 'avatarMessage',
536
-            // so it must be hidden
537
-            this.showLocalConnectionMessage(false);
538
         } else {
471
         } else {
539
             $('#remoteConnectionMessage').hide();
472
             $('#remoteConnectionMessage').hide();
540
         }
473
         }
560
         }
493
         }
561
     }
494
     }
562
 
495
 
563
-    /**
564
-     * Updated the text which is to be shown on the top of large video, when
565
-     * local media connection is interrupted.
566
-     *
567
-     * @param {string} msgKey the translation key which will be used to get
568
-     * the message text to be displayed on the large video.
569
-     *
570
-     * @private
571
-     */
572
-    _setLocalConnectionMessage(msgKey) {
573
-        $('#localConnectionMessage')
574
-            .attr('data-i18n', msgKey);
575
-        APP.translation.translateElement($('#localConnectionMessage'));
576
-    }
577
-
578
     /**
496
     /**
579
      * Add container of specified type.
497
      * Add container of specified type.
580
      * @param {string} type container type
498
      * @param {string} type container type
655
 
573
 
656
         if (LargeVideoManager.isVideoContainer(this.state)) {
574
         if (LargeVideoManager.isVideoContainer(this.state)) {
657
             this.showWatermark(false);
575
             this.showWatermark(false);
658
-            this.showLocalConnectionMessage(false);
659
             this.showRemoteConnectionMessage(false);
576
             this.showRemoteConnectionMessage(false);
660
         }
577
         }
661
         oldContainer.hide();
578
         oldContainer.hide();
675
                 // at the same time, but the latter is of higher priority and it
592
                 // at the same time, but the latter is of higher priority and it
676
                 // will hide the avatar one if will be displayed.
593
                 // will hide the avatar one if will be displayed.
677
                 this.showRemoteConnectionMessage(/* fetch the current state */);
594
                 this.showRemoteConnectionMessage(/* fetch the current state */);
678
-                this.showLocalConnectionMessage(/* fetch the current state */);
679
             }
595
             }
680
         });
596
         });
681
     }
597
     }

+ 0
- 23
modules/UI/videolayout/VideoContainer.js 查看文件

19
 
19
 
20
 const FADE_DURATION_MS = 300;
20
 const FADE_DURATION_MS = 300;
21
 
21
 
22
-/**
23
- * The CSS class used to add a filter effect on the large video when there is
24
- * a problem with local video.
25
- *
26
- * @private
27
- * @type {string}
28
- */
29
-const LOCAL_PROBLEM_FILTER_CLASS = 'videoProblemFilter';
30
-
31
 /**
22
 /**
32
  * The CSS class used to add a filter effect on the large video when there is
23
  * The CSS class used to add a filter effect on the large video when there is
33
  * a problem with remote video.
24
  * a problem with remote video.
289
         this._resizeListeners.add(callback);
280
         this._resizeListeners.add(callback);
290
     }
281
     }
291
 
282
 
292
-    /**
293
-     * Enables a filter on the video which indicates that there are some
294
-     * problems with the local media connection.
295
-     *
296
-     * @param {boolean} enable <tt>true</tt> if the filter is to be enabled or
297
-     * <tt>false</tt> otherwise.
298
-     */
299
-    enableLocalConnectionProblemFilter(enable) {
300
-        this.$video.toggleClass(LOCAL_PROBLEM_FILTER_CLASS, enable);
301
-        this._updateBackground();
302
-    }
303
-
304
     /**
283
     /**
305
      * Obtains media stream ID of the underlying {@link JitsiTrack}.
284
      * Obtains media stream ID of the underlying {@link JitsiTrack}.
306
      * @return {string|null}
285
      * @return {string|null}
686
                     && this.localFlipX
665
                     && this.localFlipX
687
                 }
666
                 }
688
                 orientationFit = { this._backgroundOrientation }
667
                 orientationFit = { this._backgroundOrientation }
689
-                showLocalProblemFilter
690
-                    = { this.$video.hasClass(LOCAL_PROBLEM_FILTER_CLASS) }
691
                 showRemoteProblemFilter
668
                 showRemoteProblemFilter
692
                     = { this.$video.hasClass(REMOTE_PROBLEM_FILTER_CLASS) }
669
                     = { this.$video.hasClass(REMOTE_PROBLEM_FILTER_CLASS) }
693
                 videoElement = { this.$video && this.$video[0] }
670
                 videoElement = { this.$video && this.$video[0] }

+ 1
- 14
modules/UI/videolayout/VideoLayout.js 查看文件

1
 /* global APP, $, interfaceConfig  */
1
 /* global APP, $, interfaceConfig  */
2
 const logger = require('jitsi-meet-logger').getLogger(__filename);
2
 const logger = require('jitsi-meet-logger').getLogger(__filename);
3
 
3
 
4
-import {
5
-    JitsiParticipantConnectionStatus
6
-} from '../../../react/features/base/lib-jitsi-meet';
7
 import { VIDEO_TYPE } from '../../../react/features/base/media';
4
 import { VIDEO_TYPE } from '../../../react/features/base/media';
8
 import {
5
 import {
9
     getLocalParticipant as getLocalParticipantFromStore,
6
     getLocalParticipant as getLocalParticipantFromStore,
427
      * Shows/hides warning about a user's connectivity issues.
424
      * Shows/hides warning about a user's connectivity issues.
428
      *
425
      *
429
      * @param {string} id - The ID of the remote participant(MUC nickname).
426
      * @param {string} id - The ID of the remote participant(MUC nickname).
430
-     * @param {status} status - The new connection status.
431
      * @returns {void}
427
      * @returns {void}
432
      */
428
      */
433
-    onParticipantConnectionStatusChanged(id, status) {
429
+    onParticipantConnectionStatusChanged(id) {
434
         if (APP.conference.isLocalId(id)) {
430
         if (APP.conference.isLocalId(id)) {
435
-            // Maintain old logic of passing in either interrupted or active
436
-            // to updateConnectionStatus.
437
-            localVideoThumbnail.updateConnectionStatus(status);
438
-
439
-            if (status === JitsiParticipantConnectionStatus.INTERRUPTED) {
440
-                largeVideo && largeVideo.onVideoInterrupted();
441
-            } else {
442
-                largeVideo && largeVideo.onVideoRestored();
443
-            }
444
 
431
 
445
             return;
432
             return;
446
         }
433
         }

+ 0
- 1
react/features/large-video/components/LargeVideo.web.js 查看文件

68
                 </div>
68
                 </div>
69
                 { interfaceConfig.DISABLE_TRANSCRIPTION_SUBTITLES
69
                 { interfaceConfig.DISABLE_TRANSCRIPTION_SUBTITLES
70
                     || <Captions /> }
70
                     || <Captions /> }
71
-                <span id = 'localConnectionMessage' />
72
             </div>
71
             </div>
73
         );
72
         );
74
     }
73
     }

+ 0
- 8
react/features/large-video/components/LargeVideoBackground.web.js 查看文件

43
      */
43
      */
44
     orientationFit: string,
44
     orientationFit: string,
45
 
45
 
46
-    /**
47
-     * Whether or not to display a filter on the video to visually indicate a
48
-     * problem with the video being displayed.
49
-     */
50
-    showLocalProblemFilter: boolean,
51
-
52
     /**
46
     /**
53
      * Whether or not to display a filter on the video to visually indicate a
47
      * Whether or not to display a filter on the video to visually indicate a
54
      * problem with the video being displayed.
48
      * problem with the video being displayed.
138
         const {
132
         const {
139
             hidden,
133
             hidden,
140
             mirror,
134
             mirror,
141
-            showLocalProblemFilter,
142
             showRemoteProblemFilter
135
             showRemoteProblemFilter
143
         } = this.props;
136
         } = this.props;
144
         const classNames = `large-video-background ${mirror ? 'flip-x' : ''} ${
137
         const classNames = `large-video-background ${mirror ? 'flip-x' : ''} ${
145
             hidden ? 'invisible' : ''} ${
138
             hidden ? 'invisible' : ''} ${
146
-            showLocalProblemFilter ? 'videoProblemFilter' : ''} ${
147
             showRemoteProblemFilter ? 'remoteVideoProblemFilter' : ''}`;
139
             showRemoteProblemFilter ? 'remoteVideoProblemFilter' : ''}`;
148
 
140
 
149
         return (
141
         return (

正在加载...
取消
保存