-
Notifications
You must be signed in to change notification settings - Fork 145
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
After exiting fullscreen, the video remains in the "expanded" size #32
Comments
Hi @bpark93 Sorry for the slow response. I tried it with this env, and am not able to reproduce it :(
I also tried it on ios. Are you using the player on a modal or any sort of overlay component? Can you try just a plain webview like and see what happens on fullscreen? The results should be identical for sanity's sake
|
Here's another issue that might help you can you try the orientation fix that is mentioned? |
I have a similar issue. After switching fullscreen on and off the icons size remains the same as it was when fullscreen was on. But after some tests, it looks like this issue might be connected with the 16:9 aspect ratio of YoutubePlayer width and height. For example, when width is 320 and height is 180 or width is 480 and height is 270 the bug with strange icons size occurs but when width is 325 and height is 180 the error is gone. So maybe this is the thing that we need to pay attention to |
This fixes the video size issue for me too, but the app still freezes and the warning still pops up. Hi @LonelyCpp , the video isn't on any overlay component. I'll try the other solution you posted. |
So this is definitely some sort of screen orientation issue. I can reproduce thr exact same error using the expo video component. I'm really curious as to how you can't reproduce the error at all on your end. Does your demo app have |
Yes
But all this is on an android 10 device. What android OS are you using? |
@Foukz I can reproduce your bug with the specific width and height numbers. I am honestly perplexed, I'll see what I can find |
Im experimenting the same bug |
This issue has been fixed for me after a combination of @Razorholt 's fix in @LonelyCpp's second comment, using the onFullScreenChange prop from the fs-callback branch, and updating expo to 38. No more freezing, no more wacky video dimensions. Use the onFullScreenChange prop to call a function that locks orientation and adjust video dimensions accordingly whenever entering/exiting fullscreen. |
Keep a watch on fullscreen status, update
works great |
Describe the bug
After I exit out of fullscreen in landscape mode, the youtube video retains the "landscape fullscreen" size. The app also freezes, and all parts of the app except the video becomes untouchable. Even in portrait mode, after exiting fullscreen, the play/pause button is no longer there, and other UI buttons can be seen to be increased in size.
To Reproduce
Exit out of fullscreen in both portrait mode and landscape mode.
Expected behavior
The video should revert back to its original size when exiting fullscreen.
Screenshots
https://streamable.com/y9238r
https://streamable.com/xmxjev
Smartphone (please complete the following information):
react-native-youtube-iframe
version : "^1.2.4"react-native-webview
version: "8.1.1"Expo
verison [if using expo]: "~37.0.3"Additional context
When reproducing the bug on landscape mode, I get a Warning message from expo: "State updates from the useState() and useReducer() Hooks don't support the second callback...". I can't even expand the warning as it also becomes unresponsive to touch.
Code
The text was updated successfully, but these errors were encountered: