Browse Source

ref(toolbar): remove remnant of custom tooltip display on demand

The feature was not ported to the new toolbar. Arguable these
can all be moved into notification but for now simply the
logic will be removed and worked on again as demand arised.
j8
Leonard Kim 7 years ago
parent
commit
abee3331aa

+ 1
- 45
conference.js View File

@@ -1376,37 +1376,6 @@ export default {
1376 1376
             });
1377 1377
     },
1378 1378
 
1379
-    /**
1380
-     * Triggers a tooltip to display when a feature was attempted to be used
1381
-     * while in audio only mode.
1382
-     *
1383
-     * @param {string} featureName - The name of the feature that attempted to
1384
-     * toggle.
1385
-     * @private
1386
-     * @returns {void}
1387
-     */
1388
-    _displayAudioOnlyTooltip(featureName) {
1389
-        let buttonName = null;
1390
-        let tooltipElementId = null;
1391
-
1392
-        switch (featureName) {
1393
-        case 'screenShare':
1394
-            buttonName = 'desktop';
1395
-            tooltipElementId = 'screenshareWhileAudioOnly';
1396
-            break;
1397
-        case 'videoMute':
1398
-            buttonName = 'camera';
1399
-            tooltipElementId = 'unmuteWhileAudioOnly';
1400
-            break;
1401
-        }
1402
-
1403
-        if (tooltipElementId) {
1404
-            APP.UI.showToolbar(6000);
1405
-            APP.UI.showCustomToolbarPopup(
1406
-                buttonName, tooltipElementId, true, 5000);
1407
-        }
1408
-    },
1409
-
1410 1379
     /**
1411 1380
      * Returns whether or not the conference is currently in audio only mode.
1412 1381
      *
@@ -1517,8 +1486,6 @@ export default {
1517 1486
         }
1518 1487
 
1519 1488
         if (this.isAudioOnly()) {
1520
-            this._displayAudioOnlyTooltip('screenShare');
1521
-
1522 1489
             return Promise.reject('No screensharing in audio only mode');
1523 1490
         }
1524 1491
 
@@ -1860,9 +1827,6 @@ export default {
1860 1827
 
1861 1828
         room.on(JitsiConferenceEvents.TALK_WHILE_MUTED, () => {
1862 1829
             APP.UI.showToolbar(6000);
1863
-
1864
-            APP.UI.showCustomToolbarPopup(
1865
-                'microphone', 'talkWhileMutedPopup', true, 5000);
1866 1830
         });
1867 1831
 
1868 1832
         room.on(
@@ -1939,10 +1903,6 @@ export default {
1939 1903
                     reportError(e);
1940 1904
                 }
1941 1905
             });
1942
-
1943
-            APP.UI.addListener(
1944
-                UIEvents.VIDEO_UNMUTING_WHILE_AUDIO_ONLY,
1945
-                () => this._displayAudioOnlyTooltip('videoMute'));
1946 1906
         }
1947 1907
 
1948 1908
         room.on(JitsiConferenceEvents.CONNECTION_INTERRUPTED, () => {
@@ -2064,11 +2024,7 @@ export default {
2064 2024
             this.muteAudio(muted);
2065 2025
         });
2066 2026
         APP.UI.addListener(UIEvents.VIDEO_MUTED, muted => {
2067
-            if (this.isAudioOnly() && !muted) {
2068
-                this._displayAudioOnlyTooltip('videoMute');
2069
-            } else {
2070
-                this.muteVideo(muted);
2071
-            }
2027
+            this.muteVideo(muted);
2072 2028
         });
2073 2029
 
2074 2030
         room.addCommandListener(this.commands.defaults.ETHERPAD,

+ 0
- 16
modules/UI/UI.js View File

@@ -640,22 +640,6 @@ UI.inputDisplayNameHandler = function(newDisplayName) {
640 640
     eventEmitter.emit(UIEvents.NICKNAME_CHANGED, newDisplayName);
641 641
 };
642 642
 
643
-/**
644
- * Show custom popup/tooltip for a specified button.
645
- *
646
- * @param {string} buttonName - The name of the button as specified in the
647
- * button configurations for the toolbar.
648
- * @param {string} popupSelectorID - The id of the popup to show as specified in
649
- * the button configurations for the toolbar.
650
- * @param {boolean} show - True or false/show or hide the popup
651
- * @param {number} timeout - The time to show the popup
652
- * @returns {void}
653
- */
654
-// eslint-disable-next-line max-params, no-unused-vars
655
-UI.showCustomToolbarPopup = function(buttonName, popupID, show, timeout) {
656
-    // TODO: this is no longer implemented as of Toolbox v2. Remove?
657
-};
658
-
659 643
 /**
660 644
  * Return the type of the remote video.
661 645
  * @param jid the jid for the remote video

+ 0
- 34
modules/UI/shared_video/SharedVideo.js View File

@@ -364,7 +364,6 @@ export default class SharedVideoManager {
364 364
 
365 365
                 player.setVolume(attributes.volume);
366 366
                 logger.info(`Player change of volume:${attributes.volume}`);
367
-                this.showSharedVideoMutedPopup(false);
368 367
             }
369 368
 
370 369
             if (isPlayerPaused) {
@@ -564,8 +563,6 @@ export default class SharedVideoManager {
564 563
                 this.smartAudioMute();
565 564
             }
566 565
         }
567
-
568
-        this.showSharedVideoMutedPopup(mute);
569 566
     }
570 567
 
571 568
     /**
@@ -580,7 +577,6 @@ export default class SharedVideoManager {
580 577
             sendAnalytics(createEvent('audio.unmuted'));
581 578
             logger.log('Shared video: audio unmuted');
582 579
             this.emitter.emit(UIEvents.AUDIO_MUTED, false, false);
583
-            this.showMicMutedPopup(false);
584 580
         }
585 581
     }
586 582
 
@@ -594,38 +590,8 @@ export default class SharedVideoManager {
594 590
             sendAnalytics(createEvent('audio.muted'));
595 591
             logger.log('Shared video: audio muted');
596 592
             this.emitter.emit(UIEvents.AUDIO_MUTED, true, false);
597
-            this.showMicMutedPopup(true);
598 593
         }
599 594
     }
600
-
601
-    /**
602
-     * Shows a popup under the microphone toolbar icon that notifies the user
603
-     * of automatic mute after a shared video has started.
604
-     * @param show boolean, show or hide the notification
605
-     */
606
-    showMicMutedPopup(show) {
607
-        if (show) {
608
-            this.showSharedVideoMutedPopup(false);
609
-        }
610
-
611
-        APP.UI.showCustomToolbarPopup(
612
-            'microphone', 'micMutedPopup', show, 5000);
613
-    }
614
-
615
-    /**
616
-     * Shows a popup under the shared video toolbar icon that notifies the user
617
-     * of automatic mute of the shared video after the user has unmuted their
618
-     * mic.
619
-     * @param show boolean, show or hide the notification
620
-     */
621
-    showSharedVideoMutedPopup(show) {
622
-        if (show) {
623
-            this.showMicMutedPopup(false);
624
-        }
625
-
626
-        APP.UI.showCustomToolbarPopup(
627
-            'sharedvideo', 'sharedVideoMutedPopup', show, 5000);
628
-    }
629 595
 }
630 596
 
631 597
 /**

+ 0
- 11
react/features/toolbox/constants.js View File

@@ -1,11 +0,0 @@
1
-/**
2
- * Mapping of tooltip positions to equivalent {@code AKInlineDialog} positions.
3
- *
4
- * @private
5
- */
6
-export const TOOLTIP_TO_POPUP_POSITION = {
7
-    bottom: 'bottom center',
8
-    left: 'left middle',
9
-    top: 'top center',
10
-    right: 'right middle'
11
-};

+ 0
- 1
react/features/toolbox/index.js View File

@@ -1,7 +1,6 @@
1 1
 export * from './actions';
2 2
 export * from './actionTypes';
3 3
 export * from './components';
4
-export * from './constants';
5 4
 export * from './functions';
6 5
 
7 6
 import './middleware';

+ 0
- 1
service/UI/UIEvents.js View File

@@ -18,7 +18,6 @@ export default {
18 18
      */
19 19
     AUDIO_MUTED: 'UI.audio_muted',
20 20
     VIDEO_MUTED: 'UI.video_muted',
21
-    VIDEO_UNMUTING_WHILE_AUDIO_ONLY: 'UI.video_unmuting_while_audio_only',
22 21
     ETHERPAD_CLICKED: 'UI.etherpad_clicked',
23 22
     SHARED_VIDEO_CLICKED: 'UI.start_shared_video',
24 23
 

Loading…
Cancel
Save