Types

Gestures Types

Types related to player gestures including double-tap, pan gestures, and gesture handler interfaces.

UseDoubleTapGestureProps

The UseDoubleTapGestureProps interface defines the props for the useDoubleTapGesture hook.

PropertyTypeRequiredDefaultDescription
videoRefReact.RefObject<any>YesnullA ref to the video player component.
doubleTapSeekIntervalnumberNo10The number of seconds to seek forward or backward on double-tap.
onDoubleTapSeekStart() => voidNoundefinedA callback function that is called when a double-tap seek starts.
onDoubleTapSeekEnd() => voidNoundefinedA callback function that is called when a double-tap seek ends.

UsePanGestureProps

The UsePanGestureProps interface defines the props for the usePanGesture hook.

PropertyTypeRequiredDefaultDescription
onLeftVerticalPan(e: GestureUpdateEvent<PanGestureHandlerEventPayload>) => voidNoundefinedA callback function that is called when a vertical pan gesture is detected on the left side of the screen.
onRightVerticalPan(e: GestureUpdateEvent<PanGestureHandlerEventPayload>) => voidNoundefinedA callback function that is called when a vertical pan gesture is detected on the right side of the screen.
onGlobalVerticalPan(e: GestureUpdateEvent<PanGestureHandlerEventPayload>) => voidNoundefinedA callback function that is called when a vertical pan gesture is detected anywhere on the screen.

If you use the onGlobalVerticalPan prop, it will override the onLeftVerticalPan and onRightVerticalPan props. You should use either the global pan handler or the side-specific pan handlers, but not both.

GestureHandlerProps

The GestureHandlerProps interface defines the props for the GestureHandler component. It extends UseDoubleTapGestureProps and UsePanGestureProps.

PropertyTypeRequiredDefaultDescription
childrenReact.ReactNodeYesThe children of the component.