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.
This commit is contained in:
Leonard Kim 2018-04-10 15:03:10 -07:00 committed by Saúl Ibarra Corretgé
parent a5e4fb000f
commit abee3331aa
6 changed files with 1 additions and 108 deletions

View File

@ -1376,37 +1376,6 @@ export default {
});
},
/**
* Triggers a tooltip to display when a feature was attempted to be used
* while in audio only mode.
*
* @param {string} featureName - The name of the feature that attempted to
* toggle.
* @private
* @returns {void}
*/
_displayAudioOnlyTooltip(featureName) {
let buttonName = null;
let tooltipElementId = null;
switch (featureName) {
case 'screenShare':
buttonName = 'desktop';
tooltipElementId = 'screenshareWhileAudioOnly';
break;
case 'videoMute':
buttonName = 'camera';
tooltipElementId = 'unmuteWhileAudioOnly';
break;
}
if (tooltipElementId) {
APP.UI.showToolbar(6000);
APP.UI.showCustomToolbarPopup(
buttonName, tooltipElementId, true, 5000);
}
},
/**
* Returns whether or not the conference is currently in audio only mode.
*
@ -1517,8 +1486,6 @@ export default {
}
if (this.isAudioOnly()) {
this._displayAudioOnlyTooltip('screenShare');
return Promise.reject('No screensharing in audio only mode');
}
@ -1860,9 +1827,6 @@ export default {
room.on(JitsiConferenceEvents.TALK_WHILE_MUTED, () => {
APP.UI.showToolbar(6000);
APP.UI.showCustomToolbarPopup(
'microphone', 'talkWhileMutedPopup', true, 5000);
});
room.on(
@ -1939,10 +1903,6 @@ export default {
reportError(e);
}
});
APP.UI.addListener(
UIEvents.VIDEO_UNMUTING_WHILE_AUDIO_ONLY,
() => this._displayAudioOnlyTooltip('videoMute'));
}
room.on(JitsiConferenceEvents.CONNECTION_INTERRUPTED, () => {
@ -2064,11 +2024,7 @@ export default {
this.muteAudio(muted);
});
APP.UI.addListener(UIEvents.VIDEO_MUTED, muted => {
if (this.isAudioOnly() && !muted) {
this._displayAudioOnlyTooltip('videoMute');
} else {
this.muteVideo(muted);
}
this.muteVideo(muted);
});
room.addCommandListener(this.commands.defaults.ETHERPAD,

View File

@ -640,22 +640,6 @@ UI.inputDisplayNameHandler = function(newDisplayName) {
eventEmitter.emit(UIEvents.NICKNAME_CHANGED, newDisplayName);
};
/**
* Show custom popup/tooltip for a specified button.
*
* @param {string} buttonName - The name of the button as specified in the
* button configurations for the toolbar.
* @param {string} popupSelectorID - The id of the popup to show as specified in
* the button configurations for the toolbar.
* @param {boolean} show - True or false/show or hide the popup
* @param {number} timeout - The time to show the popup
* @returns {void}
*/
// eslint-disable-next-line max-params, no-unused-vars
UI.showCustomToolbarPopup = function(buttonName, popupID, show, timeout) {
// TODO: this is no longer implemented as of Toolbox v2. Remove?
};
/**
* Return the type of the remote video.
* @param jid the jid for the remote video

View File

@ -364,7 +364,6 @@ export default class SharedVideoManager {
player.setVolume(attributes.volume);
logger.info(`Player change of volume:${attributes.volume}`);
this.showSharedVideoMutedPopup(false);
}
if (isPlayerPaused) {
@ -564,8 +563,6 @@ export default class SharedVideoManager {
this.smartAudioMute();
}
}
this.showSharedVideoMutedPopup(mute);
}
/**
@ -580,7 +577,6 @@ export default class SharedVideoManager {
sendAnalytics(createEvent('audio.unmuted'));
logger.log('Shared video: audio unmuted');
this.emitter.emit(UIEvents.AUDIO_MUTED, false, false);
this.showMicMutedPopup(false);
}
}
@ -594,38 +590,8 @@ export default class SharedVideoManager {
sendAnalytics(createEvent('audio.muted'));
logger.log('Shared video: audio muted');
this.emitter.emit(UIEvents.AUDIO_MUTED, true, false);
this.showMicMutedPopup(true);
}
}
/**
* Shows a popup under the microphone toolbar icon that notifies the user
* of automatic mute after a shared video has started.
* @param show boolean, show or hide the notification
*/
showMicMutedPopup(show) {
if (show) {
this.showSharedVideoMutedPopup(false);
}
APP.UI.showCustomToolbarPopup(
'microphone', 'micMutedPopup', show, 5000);
}
/**
* Shows a popup under the shared video toolbar icon that notifies the user
* of automatic mute of the shared video after the user has unmuted their
* mic.
* @param show boolean, show or hide the notification
*/
showSharedVideoMutedPopup(show) {
if (show) {
this.showMicMutedPopup(false);
}
APP.UI.showCustomToolbarPopup(
'sharedvideo', 'sharedVideoMutedPopup', show, 5000);
}
}
/**

View File

@ -1,11 +0,0 @@
/**
* Mapping of tooltip positions to equivalent {@code AKInlineDialog} positions.
*
* @private
*/
export const TOOLTIP_TO_POPUP_POSITION = {
bottom: 'bottom center',
left: 'left middle',
top: 'top center',
right: 'right middle'
};

View File

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

View File

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