Browse Source

fix(context-menus) Don't show volume slider on iOS web

master
Vlad Piersec 4 years ago
parent
commit
e278703c58

+ 7
- 1
react/features/participants-pane/components/web/MeetingParticipantContextMenu.js View File

5
 import { Avatar } from '../../../base/avatar';
5
 import { Avatar } from '../../../base/avatar';
6
 import { isToolbarButtonEnabled } from '../../../base/config/functions.web';
6
 import { isToolbarButtonEnabled } from '../../../base/config/functions.web';
7
 import { openDialog } from '../../../base/dialog';
7
 import { openDialog } from '../../../base/dialog';
8
+import { isIosMobileBrowser } from '../../../base/environment/utils';
8
 import { translate } from '../../../base/i18n';
9
 import { translate } from '../../../base/i18n';
9
 import {
10
 import {
10
     IconCloseCircle,
11
     IconCloseCircle,
395
             return null;
396
             return null;
396
         }
397
         }
397
 
398
 
399
+        const showVolumeSlider = !isIosMobileBrowser()
400
+              && overflowDrawer
401
+              && typeof _volume === 'number'
402
+              && !isNaN(_volume);
403
+
398
         const actions
404
         const actions
399
             = _participant?.isFakeParticipant ? (
405
             = _participant?.isFakeParticipant ? (
400
                 <>
406
                 <>
463
                             )
469
                             )
464
                         }
470
                         }
465
                     </ContextMenuItemGroup>
471
                     </ContextMenuItemGroup>
466
-                    { overflowDrawer && typeof _volume === 'number' && !isNaN(_volume)
472
+                    { showVolumeSlider
467
                         && <ContextMenuItemGroup>
473
                         && <ContextMenuItemGroup>
468
                             <VolumeSlider
474
                             <VolumeSlider
469
                                 initialValue = { _volume }
475
                                 initialValue = { _volume }

+ 6
- 2
react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js View File

5
 
5
 
6
 import ConnectionIndicatorContent from
6
 import ConnectionIndicatorContent from
7
     '../../../../features/connection-indicator/components/web/ConnectionIndicatorContent';
7
     '../../../../features/connection-indicator/components/web/ConnectionIndicatorContent';
8
-import { isMobileBrowser } from '../../../base/environment/utils';
8
+import { isIosMobileBrowser, isMobileBrowser } from '../../../base/environment/utils';
9
 import { translate } from '../../../base/i18n';
9
 import { translate } from '../../../base/i18n';
10
 import { Icon, IconMenuThumb } from '../../../base/icons';
10
 import { Icon, IconMenuThumb } from '../../../base/icons';
11
 import { getLocalParticipant, getParticipantById, PARTICIPANT_ROLE } from '../../../base/participants';
11
 import { getLocalParticipant, getParticipantById, PARTICIPANT_ROLE } from '../../../base/participants';
274
         } = this.props;
274
         } = this.props;
275
 
275
 
276
         const buttons = [];
276
         const buttons = [];
277
+        const showVolumeSlider = !isIosMobileBrowser()
278
+              && onVolumeChange
279
+              && typeof initialVolumeValue === 'number'
280
+              && !isNaN(initialVolumeValue);
277
 
281
 
278
         if (_isModerator) {
282
         if (_isModerator) {
279
             if (!_disableRemoteMute) {
283
             if (!_disableRemoteMute) {
348
             );
352
             );
349
         }
353
         }
350
 
354
 
351
-        if (onVolumeChange && typeof initialVolumeValue === 'number' && !isNaN(initialVolumeValue)) {
355
+        if (showVolumeSlider) {
352
             buttons.push(
356
             buttons.push(
353
                 <VolumeSlider
357
                 <VolumeSlider
354
                     initialValue = { initialVolumeValue }
358
                     initialValue = { initialVolumeValue }

Loading…
Cancel
Save