android-youtube-player icon indicating copy to clipboard operation
android-youtube-player copied to clipboard

Question : Is it possible to mimic Youtube android app fullscreen feature for square and vertical video?

Open johnconnorskynet opened this issue 5 years ago • 1 comments

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.

johnconnorskynet avatar Jun 21 '20 13:06 johnconnorskynet

Yes.

youTubeView.getLayoutParams().height = youTubeView.getLayoutParams().width;
youTubeView.requestLayout();

in onReady of the initialize callback.

crearo avatar Sep 20 '20 22:09 crearo