@@ -8,7 +8,7 @@ import type { THEOplayerTheme } from '../../THEOplayerTheme';
88import type { MenuConstructor , UiControls } from './UiControls' ;
99import { ErrorDisplay } from '../message/ErrorDisplay' ;
1010import { type Locale , defaultLocale } from '../util/Locale' ;
11- import { usePointerMove } from '../../hooks/usePointerMove ' ;
11+ import { useWebMouseEvents } from '../../hooks/useWebMouseEvents ' ;
1212import { useThrottledCallback } from '../../hooks/useThrottledCallback' ;
1313
1414export interface UiContainerProps {
@@ -398,7 +398,7 @@ export const UiContainer = forwardRef<UiContainerRef, UiContainerProps>((props,
398398 * If an ad is playing, the UI should pass through all pointer events ("box-none") in order for ad clickThrough to work.
399399 * Throttle the callback avoids hammering the fade-in animation.
400400 */
401- usePointerMove ( '#theoplayer-root-container' , useThrottledCallback ( onUserAction_ , WEB_POINTER_MOVE_THROTTLE ) , doFadeOut_ ) ;
401+ useWebMouseEvents ( '#theoplayer-root-container' , useThrottledCallback ( onUserAction_ , WEB_POINTER_MOVE_THROTTLE ) , doFadeOut_ ) ;
402402
403403 const combinedUiContainerStyle = [ UI_CONTAINER_STYLE , props . style ] ;
404404
@@ -436,8 +436,7 @@ export const UiContainer = forwardRef<UiContainerRef, UiContainerProps>((props,
436436 < Animated . View
437437 style = { [ combinedUiContainerStyle , { opacity : fadeAnimation } ] }
438438 onTouchMove = { onUserAction_ }
439- onStartShouldSetResponder = { ( ) => true }
440- onResponderRelease = { onUserAction_ }
439+ onTouchEnd = { onUserAction_ }
441440 pointerEvents = { adInProgress ? 'box-none' : uiVisible_ ? 'auto' : 'box-only' } >
442441 { uiVisible_ && (
443442 < >
0 commit comments