Closed brianwernick closed 2 years ago
When trying the same setup with app:useTextureViewBacking="true"
the picture is correctly rotated
It's been a while since we initially implemented the functionality to rotate so I need to do some research to refresh my memory. Unfortunately the SurfaceView
handling of rotation only rotates the cutout and doesn't actually rotate the content, this is due to how the SurfaceView
works. This is the same reason that the ExoPlayer itself doesn't handle video rotation for the SurfaceView
(see Issue #3385).
However, the TextureView
does rotate both the frame and the media so if you need to specify the media rotation manually you will need to use the TextureView
backing instead (by adding app:useTextureViewBacking="true"
to you VideoView definition in XML).
I will update the documentation for the setVideoRotation
function to include this information to help those in the future.
Include the following:
master
11
Google
Pixel 2 XL
Reproduction Steps
VideoPlayerActivity
to set the video rotation to135
in theinit
Expected
The video plays with the picture rotated by 135 degrees
Actual
The video plays with the picture clipped by a rectangle rotated by 135 degrees