From 64eb4b56095de9f1c116a8bb26eaf711013585b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Fri, 14 Jun 2019 12:16:08 +0100 Subject: [PATCH] Updates start silent, turning on startWithAudioMuted and few UI tweaks. (#4314) * Updates start silent, turning on startWithAudioMuted and few UI tweaks. Disabled mic unmute button and removes remote participants volume slider. * Adds analytics for start silent. * Removes extra semi colon. * Updates lib-jitsi-meet and updates meeting info text. --- conference.js | 5 ++++- css/_toolbars.scss | 6 +++--- lang/main.json | 9 ++++----- modules/UI/videolayout/RemoteVideo.js | 5 ++++- react/features/analytics/AnalyticsEvents.js | 12 ++++++++++++ .../components/info-dialog/web/InfoDialog.js | 10 +++------- .../toolbox/components/AudioMuteButton.js | 17 ++++++++++++++++- 7 files changed, 46 insertions(+), 18 deletions(-) diff --git a/conference.js b/conference.js index 38bfe2c3a..eb62003a1 100644 --- a/conference.js +++ b/conference.js @@ -16,6 +16,7 @@ import * as JitsiMeetConferenceEvents from './ConferenceEvents'; import { createDeviceChangedEvent, + createStartSilentEvent, createScreenSharingEvent, createStreamSwitchDelayEvent, createTrackMutedEvent, @@ -729,6 +730,7 @@ export default { // based on preferred devices, loose label matching can be done in // cases where the exact ID match is no longer available, such as // when the camera device has switched USB ports. + // when in startSilent mode we want to start with audio muted this._initDeviceList() .catch(error => logger.warn( 'initial device list initialization failed', error)) @@ -736,7 +738,7 @@ export default { options.roomName, { startAudioOnly: config.startAudioOnly, startScreenSharing: config.startScreenSharing, - startWithAudioMuted: config.startWithAudioMuted, + startWithAudioMuted: config.startWithAudioMuted || config.startSilent, startWithVideoMuted: config.startWithVideoMuted })) .then(([ tracks, con ]) => { @@ -793,6 +795,7 @@ export default { } if (config.startSilent) { + sendAnalytics(createStartSilentEvent()); APP.store.dispatch(showNotification({ descriptionKey: 'notify.startSilentDescription', titleKey: 'notify.startSilentTitle' diff --git a/css/_toolbars.scss b/css/_toolbars.scss index 757edc63e..70b78532a 100644 --- a/css/_toolbars.scss +++ b/css/_toolbars.scss @@ -116,9 +116,9 @@ } } i.disabled, .disabled i { - cursor: initial; - color: #fff; - background-color: #a4b8d1; + cursor: initial !important; + color: #fff !important; + background-color: #a4b8d1 !important; } .icon-mic-disabled, .icon-microphone, .icon-camera-disabled, .icon-camera { diff --git a/lang/main.json b/lang/main.json index 31d9c8092..c81a4b9d8 100644 --- a/lang/main.json +++ b/lang/main.json @@ -356,12 +356,11 @@ "dialInTollFree": "Toll Free", "genericError": "Whoops, something went wrong.", "inviteLiveStream": "To view the live stream of this meeting, click this link: __url__", - "invitePhone": "One tap audio Dial In: __number__,,__conferenceID__#", - "invitePhoneAlternatives": "Looking for a different dial in number? Please see: __url__", + "invitePhone": "To join by phone instead, tap this: __number__,,__conferenceID__#\n", + "invitePhoneAlternatives": "Looking for a different dial-in number?\nSee meeting dial-in numbers: __url__\n\n\nIf also dialing-in through a room phone, join without connecting to audio: __silentUrl__", "inviteURLFirstPartGeneral": "You are invited to join a meeting.", - "inviteURLFirstPartPersonal": "__name__ is inviting you to a meeting.", - "inviteURLSecondPart": "\n__moreInfo__\nJoin meeting: __url__\n", - "inviteURLMoreInfo": "Meeting ID: __conferenceID__#\n", + "inviteURLFirstPartPersonal": "__name__ is inviting you to a meeting.\n", + "inviteURLSecondPart": "\nJoin the meeting:\n__url__\n", "liveStreamURL": "Live stream:", "moreNumbers": "More numbers", "noNumbers": "No dial-in numbers.", diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js index d7a382985..065b5a483 100644 --- a/modules/UI/videolayout/RemoteVideo.js +++ b/modules/UI/videolayout/RemoteVideo.js @@ -165,7 +165,10 @@ RemoteVideo.prototype._generatePopupContent = function() { const initialVolumeValue = this._audioStreamElement && this._audioStreamElement.volume; - const onVolumeChange = this._setAudioVolume; + + // hide volume when in silent mode + const onVolumeChange = APP.store.getState()['features/base/config'].startSilent + ? undefined : this._setAudioVolume; const { isModerator } = APP.conference; const participantID = this.id; diff --git a/react/features/analytics/AnalyticsEvents.js b/react/features/analytics/AnalyticsEvents.js index b1c1aa15e..997f19df4 100644 --- a/react/features/analytics/AnalyticsEvents.js +++ b/react/features/analytics/AnalyticsEvents.js @@ -551,6 +551,18 @@ export function createStartAudioOnlyEvent(audioOnly) { }; } +/** + * Creates an event which indicates the "start silent" configuration. + * + * @returns {Object} The event in a format suitable for sending via + * sendAnalytics. + */ +export function createStartSilentEvent() { + return { + action: 'start.silent' + }; +} + /** * Creates an event which indicates the "start muted" configuration. * diff --git a/react/features/invite/components/info-dialog/web/InfoDialog.js b/react/features/invite/components/info-dialog/web/InfoDialog.js index 20c8fafd9..521782a49 100644 --- a/react/features/invite/components/info-dialog/web/InfoDialog.js +++ b/react/features/invite/components/info-dialog/web/InfoDialog.js @@ -309,18 +309,13 @@ class InfoDialog extends Component { _getTextToCopy() { const { _localParticipant, liveStreamViewURL, t } = this.props; const shouldDisplayDialIn = this._shouldDisplayDialIn(); - const moreInfo - = shouldDisplayDialIn - ? t('info.inviteURLMoreInfo', { conferenceID: this.props.dialIn.conferenceID }) - : ''; let invite = _localParticipant && _localParticipant.name ? t('info.inviteURLFirstPartPersonal', { name: _localParticipant.name }) : t('info.inviteURLFirstPartGeneral'); invite += t('info.inviteURLSecondPart', { - url: this.props._inviteURL, - moreInfo + url: this.props._inviteURL }); if (liveStreamViewURL) { @@ -337,7 +332,8 @@ class InfoDialog extends Component { conferenceID: this.props.dialIn.conferenceID }); const moreNumbers = t('info.invitePhoneAlternatives', { - url: this._getDialInfoPageURL() + url: this._getDialInfoPageURL(), + silentUrl: `${this.props._inviteURL}#config.startSilent=true` }); invite = `${invite}\n${dial}\n${moreNumbers}`; diff --git a/react/features/toolbox/components/AudioMuteButton.js b/react/features/toolbox/components/AudioMuteButton.js index d67116031..6e2eddbae 100644 --- a/react/features/toolbox/components/AudioMuteButton.js +++ b/react/features/toolbox/components/AudioMuteButton.js @@ -27,6 +27,11 @@ type Props = AbstractButtonProps & { */ _audioMuted: boolean, + /** + * Whether the button is disabled. + */ + _disabled: boolean, + /** * The redux {@code dispatch} function. */ @@ -128,6 +133,15 @@ class AudioMuteButton extends AbstractAudioMuteButton { typeof APP === 'undefined' || APP.UI.emitEvent(UIEvents.AUDIO_MUTED, audioMuted, true); } + + /** + * Return a boolean value indicating if this button is disabled or not. + * + * @returns {boolean} + */ + _isDisabled() { + return this.props._disabled; + } } /** @@ -144,7 +158,8 @@ function _mapStateToProps(state): Object { const tracks = state['features/base/tracks']; return { - _audioMuted: isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO) + _audioMuted: isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO), + _disabled: state['features/base/config'].startSilent }; }