android-youtube-player
android-youtube-player copied to clipboard
Question : Is it possible to mimic Youtube android app fullscreen feature for square and vertical video?
Hi,
The Youtube android application has a cool feature when the video aspect ratio is lower than 1 i.e being square (1/1 aspect ratio) or vertical (9/16 aspect ratio) for example, the orientation of the screen stays vertical when going fullscreen avoiding the user to rotate his phone. I would like to know if it is possible with the library to achieve such feature?
Thanks.
Yes.
youTubeView.getLayoutParams().height = youTubeView.getLayoutParams().width;
youTubeView.requestLayout();
in onReady of the initialize callback.