mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-02 20:18:29 +01:00
fix(player): keep controls visible while settings popover is open
Re-enabling the auto-hide timeout (previous commit) let it fire while the player settings popover was open, dismissing it mid-interaction — most visibly on iOS, where the popover lives inside the controls and closes when they fade out. Surface the popover's open state up through DropdownView -> HeaderControls -> Controls and pass it as useControlsTimeout's `disabled` flag, so the auto-hide pauses while the menu is open and re-arms once it closes. iOS reports open/close via the SwiftUI Popover binding; Android's menu is a separate global bottom-sheet modal and is unaffected by controls hiding.
This commit is contained in:
@@ -20,6 +20,8 @@ interface DropdownViewProps {
|
||||
setPlaybackSpeed?: (speed: number, scope: PlaybackSpeedScope) => void;
|
||||
showTechnicalInfo?: boolean;
|
||||
onToggleTechnicalInfo?: () => void;
|
||||
/** Forwarded to the popover so the player can pause auto-hide while it's open. */
|
||||
onOpenChange?: (open: boolean) => void;
|
||||
}
|
||||
|
||||
const DropdownView = ({
|
||||
@@ -27,6 +29,7 @@ const DropdownView = ({
|
||||
setPlaybackSpeed,
|
||||
showTechnicalInfo = false,
|
||||
onToggleTechnicalInfo,
|
||||
onOpenChange,
|
||||
}: DropdownViewProps) => {
|
||||
const { subtitleTracks, audioTracks } = useVideoContext();
|
||||
const { item, mediaSource } = usePlayerContext();
|
||||
@@ -223,6 +226,7 @@ const DropdownView = ({
|
||||
groups={optionGroups}
|
||||
trigger={trigger}
|
||||
expoUIConfig={{}}
|
||||
onOpenChange={onOpenChange}
|
||||
bottomSheetConfig={{
|
||||
enablePanDownToClose: true,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user