Skip to content

Reference original parent, layout params for PiP#1

Merged
Jadeon-FPM merged 1 commit intodevelopfrom
fix/exit-pip-layout
May 19, 2025
Merged

Reference original parent, layout params for PiP#1
Jadeon-FPM merged 1 commit intodevelopfrom
fix/exit-pip-layout

Conversation

@blwinters
Copy link

@blwinters blwinters commented May 10, 2025

This addresses the issue where the video retains the PiP dimensions after exiting PiP on Android, as discussed in this issue. The bug was introduced in react-native-video 6.9.0 by this commit, specifically the setIsInPictureInPicture() function.

The main part of the fix is holding a reference to the original parent and layout params so that we can reuse those for correct layout/dimensions when the exit-PiP transition is active.

Testing

After merging this PR to use this fork as the package source, change the branch name to fix/exit-pip-layout, then run yarn nuke, (or delete node_modules and the Android build directories), then reinstall packages and run the app on Android.

Before the fix, I consistently reproduced the issue, and now it works consistently for me in the emulator.

@blwinters blwinters force-pushed the fix/exit-pip-layout branch from ba08ef1 to a4da299 Compare May 10, 2025 14:52
@blwinters blwinters requested a review from Jadeon-FPM May 10, 2025 15:16
@Jadeon-FPM
Copy link
Collaborator

Works well for me!

@Jadeon-FPM Jadeon-FPM merged commit 05e7f2b into develop May 19, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants