Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PanResponder never clears the interaction handle #124

Open
Yupeng-li opened this issue Oct 18, 2024 · 0 comments
Open

PanResponder never clears the interaction handle #124

Yupeng-li opened this issue Oct 18, 2024 · 0 comments

Comments

@Yupeng-li
Copy link

Yupeng-li commented Oct 18, 2024

I noticed two issues in usePanResponders.tsx

  1. volumePanResponder and seekPanResponder never clear the interaction handle created when responder was granted. Any code in InteractionManager.runAfterInteractions is blocked after changing volume or seek bar.
  2. PanResponder.create was called repeatedly(hundreds and hundreds times) while video was playing or when changing volume.

The main reason is that the PanResponder.create is not wrapped in useMemo, so they are re-created every time when the VideoPlayer is refreshed.

I created a patch file to resolve this for now. https://gist.github.com/Yupeng-li/78d04099f0ee20bbf164c6d7e99eb2df

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant