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

add listeners for full screen iOS #2379

Closed

Conversation

guy-catapultsports
Copy link

@guy-catapultsports guy-catapultsports commented May 24, 2021

reference PR https://github.com/react-native-video/react-native-video/pull/1669/files
also might help with this issue: #552

This attempts to apply the same fix, specifically when the native controls are active on IOS.

Provide an example of how to test the change

Add these props to the Video component

onFullscreenPlayerDidPresent={() => {
    console.log('Did Present in full  screen');
}}
onFullscreenPlayerWillPresent={() => {
    console.log('Will present in full screen');
}}
onFullscreenPlayerWillDismiss={() => {
    console.log('Will dismiss from full screen');
}}
onFullscreenPlayerDidDismiss={() => {
    console.log('Did dismiss from full screen');
}}

Describe the changes

Added listeners for:

  • onFullscreenPlayerWillPresent
  • onFullscreenPlayerDidPresent
  • onFullscreenPlayerWillDismiss
  • onFullscreenPlayerDidDismiss

@htactive-cuongnm
Copy link

htactive-cuongnm commented Jun 14, 2021

i cant use them :( please fix them all

@nickfujita
Copy link
Collaborator

@guy-catapultsports would you mind testing this PR for the iOS conversion to swift? It does not have the changes you have made here, but I'd be happy to add them in afterwards. I'm looking to have anyone who has contributed to ios test out the converted version. Please be aware that there is a required update to add use_frameworks! :linkage => :static to your project Podfile
#2527

@stale
Copy link

stale bot commented Apr 19, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you are having a similar problem, please open a new issue and reference this one instead of commenting on a stale or closed issue.

@stale stale bot added the stale Closed due to inactivity or lack or resources label Apr 19, 2022
@hueniverse hueniverse removed the stale Closed due to inactivity or lack or resources label Apr 20, 2022
@markholland
Copy link

When going fullscreen all callbacks are called. Only the present callbacks should have been called.
When leaving fullscreen no callbacks are called. The dismiss callbacks should have been called.

@hueniverse
Copy link
Contributor

@markholland what is your comment about? the PR changes or the current state of the code before the PR?

@markholland
Copy link

This PR

@coneforapine
Copy link

Will this be merged in the next version?

@hueniverse
Copy link
Contributor

@coneforapine not until the issues reported by @markholland are resolved.

@hueniverse hueniverse added the stale Closed due to inactivity or lack or resources label Jun 22, 2022
@hueniverse
Copy link
Contributor

Since this PR is both stale and no one has offered any help in 2 months I am going to close it. If someone wants to port this to swift and submit a new PR, that would be greatly appreciated.

@hueniverse hueniverse closed this Jun 22, 2022
@luisfuertes
Copy link

luisfuertes commented Feb 7, 2023

It works for me, now all callbacks are calling fine.

"react-native": "0.64.4",
"react": "17.0.1",
"react-native-video": "5.2.1",
"react-native-video-controls": "^2.8.1",

Edit: sometimes present and dismiss callbacks are called at same time. it doesn't work well

@uguraktas
Copy link
Contributor

I have same issue. I downgraded to 5.2.1 but still same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS stale Closed due to inactivity or lack or resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants