浏览代码

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.
j8
Дамян Минков 5 年前
父节点
当前提交
64eb4b5609
没有帐户链接到提交者的电子邮件

+ 4
- 1
conference.js 查看文件

@@ -16,6 +16,7 @@ import * as JitsiMeetConferenceEvents from './ConferenceEvents';
16 16
 
17 17
 import {
18 18
     createDeviceChangedEvent,
19
+    createStartSilentEvent,
19 20
     createScreenSharingEvent,
20 21
     createStreamSwitchDelayEvent,
21 22
     createTrackMutedEvent,
@@ -729,6 +730,7 @@ export default {
729 730
             // based on preferred devices, loose label matching can be done in
730 731
             // cases where the exact ID match is no longer available, such as
731 732
             // when the camera device has switched USB ports.
733
+            // when in startSilent mode we want to start with audio muted
732 734
             this._initDeviceList()
733 735
                 .catch(error => logger.warn(
734 736
                     'initial device list initialization failed', error))
@@ -736,7 +738,7 @@ export default {
736 738
                 options.roomName, {
737 739
                     startAudioOnly: config.startAudioOnly,
738 740
                     startScreenSharing: config.startScreenSharing,
739
-                    startWithAudioMuted: config.startWithAudioMuted,
741
+                    startWithAudioMuted: config.startWithAudioMuted || config.startSilent,
740 742
                     startWithVideoMuted: config.startWithVideoMuted
741 743
                 }))
742 744
             .then(([ tracks, con ]) => {
@@ -793,6 +795,7 @@ export default {
793 795
                 }
794 796
 
795 797
                 if (config.startSilent) {
798
+                    sendAnalytics(createStartSilentEvent());
796 799
                     APP.store.dispatch(showNotification({
797 800
                         descriptionKey: 'notify.startSilentDescription',
798 801
                         titleKey: 'notify.startSilentTitle'

+ 3
- 3
css/_toolbars.scss 查看文件

@@ -116,9 +116,9 @@
116 116
             }
117 117
         }
118 118
         i.disabled, .disabled i {
119
-            cursor: initial;
120
-            color: #fff;
121
-            background-color: #a4b8d1;
119
+            cursor: initial !important;
120
+            color: #fff !important;
121
+            background-color: #a4b8d1 !important;
122 122
         }
123 123
 
124 124
         .icon-mic-disabled, .icon-microphone, .icon-camera-disabled, .icon-camera {

+ 4
- 5
lang/main.json 查看文件

@@ -356,12 +356,11 @@
356 356
         "dialInTollFree": "Toll Free",
357 357
         "genericError": "Whoops, something went wrong.",
358 358
         "inviteLiveStream": "To view the live stream of this meeting, click this link: __url__",
359
-        "invitePhone": "One tap audio Dial In: __number__,,__conferenceID__#",
360
-        "invitePhoneAlternatives": "Looking for a different dial in number? Please see: __url__",
359
+        "invitePhone": "To join by phone instead, tap this: __number__,,__conferenceID__#\n",
360
+        "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__",
361 361
         "inviteURLFirstPartGeneral": "You are invited to join a meeting.",
362
-        "inviteURLFirstPartPersonal": "__name__ is inviting you to a meeting.",
363
-        "inviteURLSecondPart": "\n__moreInfo__\nJoin meeting: __url__\n",
364
-        "inviteURLMoreInfo": "Meeting ID: __conferenceID__#\n",
362
+        "inviteURLFirstPartPersonal": "__name__ is inviting you to a meeting.\n",
363
+        "inviteURLSecondPart": "\nJoin the meeting:\n__url__\n",
365 364
         "liveStreamURL": "Live stream:",
366 365
         "moreNumbers": "More numbers",
367 366
         "noNumbers": "No dial-in numbers.",

+ 4
- 1
modules/UI/videolayout/RemoteVideo.js 查看文件

@@ -165,7 +165,10 @@ RemoteVideo.prototype._generatePopupContent = function() {
165 165
 
166 166
     const initialVolumeValue
167 167
         = this._audioStreamElement && this._audioStreamElement.volume;
168
-    const onVolumeChange = this._setAudioVolume;
168
+
169
+    // hide volume when in silent mode
170
+    const onVolumeChange = APP.store.getState()['features/base/config'].startSilent
171
+        ? undefined : this._setAudioVolume;
169 172
     const { isModerator } = APP.conference;
170 173
     const participantID = this.id;
171 174
 

+ 12
- 0
react/features/analytics/AnalyticsEvents.js 查看文件

@@ -551,6 +551,18 @@ export function createStartAudioOnlyEvent(audioOnly) {
551 551
     };
552 552
 }
553 553
 
554
+/**
555
+ * Creates an event which indicates the "start silent" configuration.
556
+ *
557
+ * @returns {Object} The event in a format suitable for sending via
558
+ * sendAnalytics.
559
+ */
560
+export function createStartSilentEvent() {
561
+    return {
562
+        action: 'start.silent'
563
+    };
564
+}
565
+
554 566
 /**
555 567
  * Creates an event which indicates the "start muted" configuration.
556 568
  *

+ 3
- 7
react/features/invite/components/info-dialog/web/InfoDialog.js 查看文件

@@ -309,18 +309,13 @@ class InfoDialog extends Component<Props, State> {
309 309
     _getTextToCopy() {
310 310
         const { _localParticipant, liveStreamViewURL, t } = this.props;
311 311
         const shouldDisplayDialIn = this._shouldDisplayDialIn();
312
-        const moreInfo
313
-            = shouldDisplayDialIn
314
-                ? t('info.inviteURLMoreInfo', { conferenceID: this.props.dialIn.conferenceID })
315
-                : '';
316 312
 
317 313
         let invite = _localParticipant && _localParticipant.name
318 314
             ? t('info.inviteURLFirstPartPersonal', { name: _localParticipant.name })
319 315
             : t('info.inviteURLFirstPartGeneral');
320 316
 
321 317
         invite += t('info.inviteURLSecondPart', {
322
-            url: this.props._inviteURL,
323
-            moreInfo
318
+            url: this.props._inviteURL
324 319
         });
325 320
 
326 321
         if (liveStreamViewURL) {
@@ -337,7 +332,8 @@ class InfoDialog extends Component<Props, State> {
337 332
                 conferenceID: this.props.dialIn.conferenceID
338 333
             });
339 334
             const moreNumbers = t('info.invitePhoneAlternatives', {
340
-                url: this._getDialInfoPageURL()
335
+                url: this._getDialInfoPageURL(),
336
+                silentUrl: `${this.props._inviteURL}#config.startSilent=true`
341 337
             });
342 338
 
343 339
             invite = `${invite}\n${dial}\n${moreNumbers}`;

+ 16
- 1
react/features/toolbox/components/AudioMuteButton.js 查看文件

@@ -27,6 +27,11 @@ type Props = AbstractButtonProps & {
27 27
      */
28 28
     _audioMuted: boolean,
29 29
 
30
+    /**
31
+     * Whether the button is disabled.
32
+     */
33
+    _disabled: boolean,
34
+
30 35
     /**
31 36
      * The redux {@code dispatch} function.
32 37
      */
@@ -128,6 +133,15 @@ class AudioMuteButton extends AbstractAudioMuteButton<Props, *> {
128 133
         typeof APP === 'undefined'
129 134
             || APP.UI.emitEvent(UIEvents.AUDIO_MUTED, audioMuted, true);
130 135
     }
136
+
137
+    /**
138
+     * Return a boolean value indicating if this button is disabled or not.
139
+     *
140
+     * @returns {boolean}
141
+     */
142
+    _isDisabled() {
143
+        return this.props._disabled;
144
+    }
131 145
 }
132 146
 
133 147
 /**
@@ -144,7 +158,8 @@ function _mapStateToProps(state): Object {
144 158
     const tracks = state['features/base/tracks'];
145 159
 
146 160
     return {
147
-        _audioMuted: isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO)
161
+        _audioMuted: isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO),
162
+        _disabled: state['features/base/config'].startSilent
148 163
     };
149 164
 }
150 165
 

正在加载...
取消
保存