diff --git a/components/video-player/controls/BrightnessSlider.tsx b/components/video-player/controls/BrightnessSlider.tsx index 33fe0e0f..3cbbd460 100644 --- a/components/video-player/controls/BrightnessSlider.tsx +++ b/components/video-player/controls/BrightnessSlider.tsx @@ -14,10 +14,11 @@ const BrightnessSlider = () => { useEffect(() => { const fetchInitialBrightness = async () => { const initialBrightness = await Brightness.getBrightnessAsync(); + console.log("initialBrightness", initialBrightness); brightness.value = initialBrightness * 100; }; fetchInitialBrightness(); - }, [brightness]); + }, []); const handleValueChange = async (value: number) => { brightness.value = value; diff --git a/components/video-player/controls/Controls.tsx b/components/video-player/controls/Controls.tsx index 0e8c5451..d814e3c5 100644 --- a/components/video-player/controls/Controls.tsx +++ b/components/video-player/controls/Controls.tsx @@ -51,6 +51,7 @@ import * as Haptics from "expo-haptics"; import DropdownViewDirect from "./dropdown/DropdownViewDirect"; import DropdownViewTranscoding from "./dropdown/DropdownViewTranscoding"; import BrightnessSlider from "./BrightnessSlider"; +import SkipButton from "./SkipButton"; interface Props { item: BaseItemDto; @@ -339,59 +340,6 @@ export const Controls: React.FC = ({ )} - - - Skip Intro - - - - - - Skip Credits - - - { toggleControls(); @@ -561,23 +509,54 @@ export const Controls: React.FC = ({ opacity: showControls ? 1 : 0, }, ]} - pointerEvents={showControls ? "auto" : "none"} + pointerEvents={showControls ? "box-none" : "none"} className={`flex flex-col p-4`} > - - {item?.Name} - {item?.Type === "Episode" && ( - {item.SeriesName} - )} - {item?.Type === "Movie" && ( - {item?.ProductionYear} - )} - {item?.Type === "Audio" && ( - {item?.Album} - )} + + + {item?.Name} + {item?.Type === "Episode" && ( + {item.SeriesName} + )} + {item?.Type === "Movie" && ( + {item?.ProductionYear} + )} + {item?.Type === "Audio" && ( + {item?.Album} + )} + + + + + void; + showButton: boolean; + buttonText: string; +} + +const SkipButton: React.FC = ({ + onPress, + showButton, + buttonText, +}) => { + return ( + + + {buttonText} + + + ); +}; + +const styles = StyleSheet.create({ + button: { + backgroundColor: "rgba(0, 0, 0, 0.75)", + borderRadius: 5, + paddingHorizontal: 10, + paddingVertical: 15, + borderWidth: 2, + borderColor: "#5A5454", + }, + text: { + color: "white", + fontWeight: "bold", + }, +}); + +export default SkipButton;