Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

Vlad Piersece278703c58bc
diff --git a/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js b/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js
index 77df53725b..0606bd0c20 100644
--- a/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js
+++ b/react/features/participants-pane/components/web/MeetingParticipantContextMenu.js
@@ -5,6 +5,7 @@ import React, { Component } from 'react';
import { Avatar } from '../../../base/avatar';
import { isToolbarButtonEnabled } from '../../../base/config/functions.web';
import { openDialog } from '../../../base/dialog';
+import { isIosMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n';
import {
IconCloseCircle,
@@ -395,6 +396,11 @@ class MeetingParticipantContextMenu extends Component<Props, State> {
return null;
}
+ const showVolumeSlider = !isIosMobileBrowser()
+ && overflowDrawer
+ && typeof _volume === 'number'
+ && !isNaN(_volume);
+
const actions
= _participant?.isFakeParticipant ? (
<>
@@ -463,7 +469,7 @@ class MeetingParticipantContextMenu extends Component<Props, State> {
)
}
</ContextMenuItemGroup>
- { overflowDrawer && typeof _volume === 'number' && !isNaN(_volume)
+ { showVolumeSlider
&& <ContextMenuItemGroup>
<VolumeSlider
initialValue = { _volume }
diff --git a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js
index bc7b646e15..3d9231c40e 100644
--- a/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js
+++ b/react/features/video-menu/components/web/RemoteVideoMenuTriggerButton.js
@@ -5,7 +5,7 @@ import { batch } from 'react-redux';
import ConnectionIndicatorContent from
'../../../../features/connection-indicator/components/web/ConnectionIndicatorContent';
-import { isMobileBrowser } from '../../../base/environment/utils';
+import { isIosMobileBrowser, isMobileBrowser } from '../../../base/environment/utils';
import { translate } from '../../../base/i18n';
import { Icon, IconMenuThumb } from '../../../base/icons';
import { getLocalParticipant, getParticipantById, PARTICIPANT_ROLE } from '../../../base/participants';
@@ -274,6 +274,10 @@ class RemoteVideoMenuTriggerButton extends Component<Props> {
} = this.props;
const buttons = [];
+ const showVolumeSlider = !isIosMobileBrowser()
+ && onVolumeChange
+ && typeof initialVolumeValue === 'number'
+ && !isNaN(initialVolumeValue);
if (_isModerator) {
if (!_disableRemoteMute) {
@@ -348,7 +352,7 @@ class RemoteVideoMenuTriggerButton extends Component<Props> {
);
}
- if (onVolumeChange && typeof initialVolumeValue === 'number' && !isNaN(initialVolumeValue)) {
+ if (showVolumeSlider) {
buttons.push(
<VolumeSlider
initialValue = { initialVolumeValue }