feat: hide volume or/and brightness in controls setting

This commit is contained in:
Fredrik Burmester
2026-01-03 19:34:45 +01:00
parent 3ff7c47b7f
commit 039bf9729a
4 changed files with 71 additions and 25 deletions

View File

@@ -19,7 +19,9 @@ export const GestureControls: React.FC<Props> = ({ ...props }) => {
() => () =>
pluginSettings?.enableHorizontalSwipeSkip?.locked === true && pluginSettings?.enableHorizontalSwipeSkip?.locked === true &&
pluginSettings?.enableLeftSideBrightnessSwipe?.locked === true && pluginSettings?.enableLeftSideBrightnessSwipe?.locked === true &&
pluginSettings?.enableRightSideVolumeSwipe?.locked === true, pluginSettings?.enableRightSideVolumeSwipe?.locked === true &&
pluginSettings?.hideVolumeSlider?.locked === true &&
pluginSettings?.hideBrightnessSlider?.locked === true,
[pluginSettings], [pluginSettings],
); );
@@ -77,6 +79,38 @@ export const GestureControls: React.FC<Props> = ({ ...props }) => {
} }
/> />
</ListItem> </ListItem>
<ListItem
title={t("home.settings.gesture_controls.hide_volume_slider")}
subtitle={t(
"home.settings.gesture_controls.hide_volume_slider_description",
)}
disabled={pluginSettings?.hideVolumeSlider?.locked}
>
<Switch
value={settings.hideVolumeSlider}
disabled={pluginSettings?.hideVolumeSlider?.locked}
onValueChange={(hideVolumeSlider) =>
updateSettings({ hideVolumeSlider })
}
/>
</ListItem>
<ListItem
title={t("home.settings.gesture_controls.hide_brightness_slider")}
subtitle={t(
"home.settings.gesture_controls.hide_brightness_slider_description",
)}
disabled={pluginSettings?.hideBrightnessSlider?.locked}
>
<Switch
value={settings.hideBrightnessSlider}
disabled={pluginSettings?.hideBrightnessSlider?.locked}
onValueChange={(hideBrightnessSlider) =>
updateSettings({ hideBrightnessSlider })
}
/>
</ListItem>
</ListGroup> </ListGroup>
</DisabledSetting> </DisabledSetting>
); );

View File

@@ -48,17 +48,19 @@ export const CenterControls: FC<CenterControlsProps> = ({
}} }}
pointerEvents={showControls ? "box-none" : "none"} pointerEvents={showControls ? "box-none" : "none"}
> >
<View {!settings?.hideBrightnessSlider && (
style={{ <View
position: "absolute", style={{
alignItems: "center", position: "absolute",
transform: [{ rotate: "270deg" }], alignItems: "center",
left: 0, transform: [{ rotate: "270deg" }],
bottom: 30, left: 0,
}} bottom: 30,
> }}
<BrightnessSlider /> >
</View> <BrightnessSlider />
</View>
)}
{!Platform.isTV && ( {!Platform.isTV && (
<TouchableOpacity onPress={handleSkipBackward}> <TouchableOpacity onPress={handleSkipBackward}>
@@ -135,18 +137,20 @@ export const CenterControls: FC<CenterControlsProps> = ({
</TouchableOpacity> </TouchableOpacity>
)} )}
<View {!settings?.hideVolumeSlider && (
style={{ <View
position: "absolute", style={{
alignItems: "center", position: "absolute",
transform: [{ rotate: "270deg" }], alignItems: "center",
bottom: 30, transform: [{ rotate: "270deg" }],
right: 0, bottom: 30,
opacity: showAudioSlider || showControls ? 1 : 0, right: 0,
}} opacity: showAudioSlider || showControls ? 1 : 0,
> }}
<AudioSlider setVisibility={setShowAudioSlider} /> >
</View> <AudioSlider setVisibility={setShowAudioSlider} />
</View>
)}
</View> </View>
); );
}; };

View File

@@ -114,7 +114,11 @@
"left_side_brightness": "Left Side Brightness Control", "left_side_brightness": "Left Side Brightness Control",
"left_side_brightness_description": "Swipe up/down on left side to adjust brightness", "left_side_brightness_description": "Swipe up/down on left side to adjust brightness",
"right_side_volume": "Right Side Volume Control", "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": {
"audio_title": "Audio", "audio_title": "Audio",

View File

@@ -193,6 +193,8 @@ export type Settings = {
enableHorizontalSwipeSkip: boolean; enableHorizontalSwipeSkip: boolean;
enableLeftSideBrightnessSwipe: boolean; enableLeftSideBrightnessSwipe: boolean;
enableRightSideVolumeSwipe: boolean; enableRightSideVolumeSwipe: boolean;
hideVolumeSlider: boolean;
hideBrightnessSlider: boolean;
usePopularPlugin: boolean; usePopularPlugin: boolean;
showLargeHomeCarousel: boolean; showLargeHomeCarousel: boolean;
mergeNextUpAndContinueWatching: boolean; mergeNextUpAndContinueWatching: boolean;
@@ -273,6 +275,8 @@ export const defaultValues: Settings = {
enableHorizontalSwipeSkip: true, enableHorizontalSwipeSkip: true,
enableLeftSideBrightnessSwipe: true, enableLeftSideBrightnessSwipe: true,
enableRightSideVolumeSwipe: true, enableRightSideVolumeSwipe: true,
hideVolumeSlider: false,
hideBrightnessSlider: false,
usePopularPlugin: true, usePopularPlugin: true,
showLargeHomeCarousel: false, showLargeHomeCarousel: false,
mergeNextUpAndContinueWatching: false, mergeNextUpAndContinueWatching: false,