@@ -187,7 +187,7 @@ export const UiContainer = (props: UiContainerProps) => {
187187 const _currentFadeOutTimeout = useRef < number | undefined > ( undefined ) ;
188188 const fadeAnimation = useRef ( new Animated . Value ( 1 ) ) . current ;
189189 const [ currentMenu , setCurrentMenu ] = useState < React . ReactNode | undefined > ( undefined ) ;
190- const [ showing , setShowing ] = useState ( true ) ;
190+ const [ isPassingPointerEvents , setIsPassingPointerEvents ] = useState ( true ) ;
191191 const [ buttonsEnabled_ , setButtonsEnabled ] = useState ( true ) ;
192192 const [ error , setError ] = useState < PlayerError | undefined > ( undefined ) ;
193193 const [ firstPlay , setFirstPlay ] = useState ( false ) ;
@@ -331,15 +331,15 @@ export const UiContainer = (props: UiContainerProps) => {
331331 toValue : 0 ,
332332 duration : 0 ,
333333 } ) . start ( ( ) => {
334- setShowing ( false ) ;
334+ setIsPassingPointerEvents ( false ) ;
335335 player . presentationMode = PresentationMode . pip ;
336336 } ) ;
337337 } ;
338338
339339 const stopAnimationsAndShowUi_ = ( ) => {
340340 clearTimeout ( _currentFadeOutTimeout . current ) ;
341341 _currentFadeOutTimeout . current = undefined ;
342- if ( ! showing ) {
342+ if ( ! isPassingPointerEvents ) {
343343 doFadeIn_ ( ) ;
344344 }
345345 } ;
@@ -358,7 +358,7 @@ export const UiContainer = (props: UiContainerProps) => {
358358 } ;
359359
360360 const doFadeIn_ = ( ) => {
361- setShowing ( true ) ;
361+ setIsPassingPointerEvents ( true ) ;
362362 Animated . timing ( fadeAnimation , {
363363 useNativeDriver : true ,
364364 toValue : 1 ,
@@ -379,7 +379,7 @@ export const UiContainer = (props: UiContainerProps) => {
379379 toValue : 0 ,
380380 duration : 200 ,
381381 } ) . start ( ( ) => {
382- setShowing ( false ) ;
382+ setIsPassingPointerEvents ( false ) ;
383383 } ) ;
384384 } ;
385385
@@ -425,7 +425,7 @@ export const UiContainer = (props: UiContainerProps) => {
425425 < Animated . View
426426 style = { [ combinedUiContainerStyle , { opacity : fadeAnimation } ] }
427427 onTouchStart = { onUserAction_ }
428- pointerEvents = { showing ? 'auto' : 'box-only' }
428+ pointerEvents = { isPassingPointerEvents ? 'auto' : 'box-only' }
429429 { ...( Platform . OS === 'web' ? { onMouseMove : onUserAction_ , onMouseLeave : doFadeOut_ } : { } ) } >
430430 < >
431431 { /* The UI background */ }
0 commit comments