Skip to content

PanResponder never clears the interaction handle #124

@Yupeng-li

Description

@Yupeng-li

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions