How to rotate video viewing in Android?

I want to display the video in landscape or portrait mode when the user clicks the custom rotation button. I am using the following code.

The video preview rotates but the video is not displayed.

Example: https://play.google.com/store/apps/details?id=com.mycall.videorotate

java code:

     videoView.setRotation(90f);
     videoView.setVideoURI(videoUri);
     videoView.start();

I read so many tutorials that you read on Google and read the stack downstream, but didn't get any answers.

Please, help.

+4
source share

Source: https://habr.com/ru/post/1534362/


All Articles