mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
fix
This commit is contained in:
parent
81dab0e82d
commit
adafa5cc36
3 changed files with 38 additions and 8 deletions
|
|
@ -2321,9 +2321,24 @@ const AndroidVideoPlayer: React.FC = () => {
|
|||
</TapGestureHandler>
|
||||
</PanGestureHandler>
|
||||
|
||||
{/* Center area tap handler */}
|
||||
{/* Center area tap handler - handles both show and hide */}
|
||||
<TapGestureHandler
|
||||
onActivated={toggleControls}
|
||||
onActivated={() => {
|
||||
if (showControls) {
|
||||
// If controls are visible, hide them
|
||||
const timeoutId = setTimeout(() => {
|
||||
hideControls();
|
||||
}, 0);
|
||||
// Clear any existing timeout
|
||||
if (controlsTimeout.current) {
|
||||
clearTimeout(controlsTimeout.current);
|
||||
}
|
||||
controlsTimeout.current = timeoutId;
|
||||
} else {
|
||||
// If controls are hidden, show them
|
||||
toggleControls();
|
||||
}
|
||||
}}
|
||||
shouldCancelWhenOutside={false}
|
||||
simultaneousHandlers={[]}
|
||||
>
|
||||
|
|
@ -2333,7 +2348,7 @@ const AndroidVideoPlayer: React.FC = () => {
|
|||
left: screenDimensions.width * 0.4, // Start after left gesture area
|
||||
width: screenDimensions.width * 0.2, // Center area (20% of screen)
|
||||
height: screenDimensions.height * 0.7,
|
||||
zIndex: 10,
|
||||
zIndex: 5, // Lower z-index, controls use box-none to allow touches through
|
||||
}} />
|
||||
</TapGestureHandler>
|
||||
|
||||
|
|
|
|||
|
|
@ -2133,9 +2133,24 @@ const VideoPlayer: React.FC = () => {
|
|||
</TapGestureHandler>
|
||||
</PanGestureHandler>
|
||||
|
||||
{/* Center area tap handler */}
|
||||
{/* Center area tap handler - handles both show and hide */}
|
||||
<TapGestureHandler
|
||||
onActivated={toggleControls}
|
||||
onActivated={() => {
|
||||
if (showControls) {
|
||||
// If controls are visible, hide them
|
||||
const timeoutId = setTimeout(() => {
|
||||
hideControls();
|
||||
}, 0);
|
||||
// Clear any existing timeout
|
||||
if (controlsTimeout.current) {
|
||||
clearTimeout(controlsTimeout.current);
|
||||
}
|
||||
controlsTimeout.current = timeoutId;
|
||||
} else {
|
||||
// If controls are hidden, show them
|
||||
toggleControls();
|
||||
}
|
||||
}}
|
||||
shouldCancelWhenOutside={false}
|
||||
simultaneousHandlers={[]}
|
||||
>
|
||||
|
|
@ -2145,7 +2160,7 @@ const VideoPlayer: React.FC = () => {
|
|||
left: screenDimensions.width * 0.4, // Start after left gesture area
|
||||
width: screenDimensions.width * 0.2, // Center area (20% of screen)
|
||||
height: screenDimensions.height * 0.7,
|
||||
zIndex: 10,
|
||||
zIndex: 5, // Lower z-index, controls use box-none to allow touches through
|
||||
}} />
|
||||
</TapGestureHandler>
|
||||
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ export const PlayerControls: React.FC<PlayerControlsProps> = ({
|
|||
const { currentTheme } = useTheme();
|
||||
return (
|
||||
<Animated.View
|
||||
style={[StyleSheet.absoluteFill, { opacity: fadeAnim }]}
|
||||
pointerEvents={showControls ? 'auto' : 'none'}
|
||||
style={[StyleSheet.absoluteFill, { opacity: fadeAnim, zIndex: 20 }]}
|
||||
pointerEvents={showControls ? 'box-none' : 'none'}
|
||||
>
|
||||
{/* Progress slider with native iOS slider */}
|
||||
<View style={styles.sliderContainer}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue