Sfoglia il codice sorgente

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

master
Vlad Piersec 4 anni fa
parent
commit
e278703c58

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

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

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

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

Loading…
Annulla
Salva