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

[Android] Video is played with wrong aspect ratio in some cases #334

Closed
webdevbyjoss opened this issue Nov 28, 2018 · 4 comments
Closed

Comments

@webdevbyjoss
Copy link

webdevbyjoss commented Nov 28, 2018

Platform: Android only
Versions:

  • react-native v55
  • react-navigation v2.12.1
  • react-native-youtube v1.1.0

Example of vertical video: https://www.youtube.com/watch?v=qr64OXFDD7A

I'm building a catalog of handpicked videos, and the whole app is basically 2 screens: a list and details (player) view.

Reproducing steps:

  1. Play random 9x16 video
  2. Navigate to list and open next video (which is vertical)

Actual: Video is stretched
screenshot 2018-11-28 13 58 24

Expected: Video played with proper aspect ratio
screenshot 2018-11-28 14 01 26

The workaround: navigate away from the screen (player control is unmounted) and return back to the exact same video (player control is mounted again) - now the video is refreshed and plays with proper aspect ratio as expected.

I may be wrong, but It feels like video player on Android (which is singleton?) doesn't refresh video metadata in this particular case, and does that when the video is played for the second time.

  • Is there a way to reset player instance?
  • Or maybe the way to force reloading the video metadata?
  • Any other hacks and tricks to force a player to stretch the video properly
@webdevbyjoss webdevbyjoss changed the title [Android] Video is played with wrong aspect ratio [Android] Video is played with wrong aspect ratio in some cases Nov 28, 2018
@Kisepro
Copy link

Kisepro commented Dec 3, 2018

Same problem

@webdevbyjoss
Copy link
Author

webdevbyjoss commented Dec 26, 2018

A somehow similar outcome is observed when entering fullscreen mode and returning back: #345
Still didn't managed to fix the issue.

@Delwalt
Copy link

Delwalt commented Jan 7, 2019

Did anyone find the solution for this issue? I am also having same problem.

@davidohayon669
Copy link
Owner

you can check if c9a0c38 does the trick for you

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

4 participants