From 039bf9729ac991829026c551526acda69d58df3d Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Sat, 3 Jan 2026 19:34:45 +0100 Subject: [PATCH] feat: hide volume or/and brightness in controls setting --- components/settings/GestureControls.tsx | 36 ++++++++++++- .../video-player/controls/CenterControls.tsx | 50 ++++++++++--------- translations/en.json | 6 ++- utils/atoms/settings.ts | 4 ++ 4 files changed, 71 insertions(+), 25 deletions(-) diff --git a/components/settings/GestureControls.tsx b/components/settings/GestureControls.tsx index 55aadaa1..b9c39ef4 100644 --- a/components/settings/GestureControls.tsx +++ b/components/settings/GestureControls.tsx @@ -19,7 +19,9 @@ export const GestureControls: React.FC = ({ ...props }) => { () => pluginSettings?.enableHorizontalSwipeSkip?.locked === true && pluginSettings?.enableLeftSideBrightnessSwipe?.locked === true && - pluginSettings?.enableRightSideVolumeSwipe?.locked === true, + pluginSettings?.enableRightSideVolumeSwipe?.locked === true && + pluginSettings?.hideVolumeSlider?.locked === true && + pluginSettings?.hideBrightnessSlider?.locked === true, [pluginSettings], ); @@ -77,6 +79,38 @@ export const GestureControls: React.FC = ({ ...props }) => { } /> + + + + updateSettings({ hideVolumeSlider }) + } + /> + + + + + updateSettings({ hideBrightnessSlider }) + } + /> + ); diff --git a/components/video-player/controls/CenterControls.tsx b/components/video-player/controls/CenterControls.tsx index 47659746..c1b384a5 100644 --- a/components/video-player/controls/CenterControls.tsx +++ b/components/video-player/controls/CenterControls.tsx @@ -48,17 +48,19 @@ export const CenterControls: FC = ({ }} pointerEvents={showControls ? "box-none" : "none"} > - - - + {!settings?.hideBrightnessSlider && ( + + + + )} {!Platform.isTV && ( @@ -135,18 +137,20 @@ export const CenterControls: FC = ({ )} - - - + {!settings?.hideVolumeSlider && ( + + + + )} ); }; diff --git a/translations/en.json b/translations/en.json index 06117b71..6aa25df9 100644 --- a/translations/en.json +++ b/translations/en.json @@ -114,7 +114,11 @@ "left_side_brightness": "Left Side Brightness Control", "left_side_brightness_description": "Swipe up/down on left side to adjust brightness", "right_side_volume": "Right Side Volume Control", - "right_side_volume_description": "Swipe up/down on right side to adjust volume" + "right_side_volume_description": "Swipe up/down on right side to adjust volume", + "hide_volume_slider": "Hide Volume Slider", + "hide_volume_slider_description": "Hide the volume slider in the video player", + "hide_brightness_slider": "Hide Brightness Slider", + "hide_brightness_slider_description": "Hide the brightness slider in the video player" }, "audio": { "audio_title": "Audio", diff --git a/utils/atoms/settings.ts b/utils/atoms/settings.ts index 022d81a8..6a7f58f7 100644 --- a/utils/atoms/settings.ts +++ b/utils/atoms/settings.ts @@ -193,6 +193,8 @@ export type Settings = { enableHorizontalSwipeSkip: boolean; enableLeftSideBrightnessSwipe: boolean; enableRightSideVolumeSwipe: boolean; + hideVolumeSlider: boolean; + hideBrightnessSlider: boolean; usePopularPlugin: boolean; showLargeHomeCarousel: boolean; mergeNextUpAndContinueWatching: boolean; @@ -273,6 +275,8 @@ export const defaultValues: Settings = { enableHorizontalSwipeSkip: true, enableLeftSideBrightnessSwipe: true, enableRightSideVolumeSwipe: true, + hideVolumeSlider: false, + hideBrightnessSlider: false, usePopularPlugin: true, showLargeHomeCarousel: false, mergeNextUpAndContinueWatching: false,