I’ve found that after calling setRotation() on a VideoView, that VideoView no longer plays. No errors are thrown by the Android runtime, and the VideoView correctly determines its crop dimensions but only shows as a solid black box.
Is this a known limitation? If so is there another way to rotate VideoViews? I’m using API level 16.
Edit: The video plays audio, but no video. Perhaps the underlying SurfaceView isn’t being repositioned?
To answer myself in case it helps somebody later, this is a known limitation of VideoView. Quote from this Android graphics blog post:
The only solution I could find was to replace the VideoView with the newly-introduced TextureView, which is only available in API level 14 and above. From what I read it is not currently available in the compatibility library. This question has an example of how to use a TextureView to play video, it’s pretty easy and all you lose is the convenience of a VideoView wrapping a MediaPlayer for you.