When registering your activity in the manifest file, you can use the flags below
android:configChanges="orientation|screenSize|keyboardHidden"
and then in your activty class, just override the onConfigurationsChanged () method so that your activity does not restart when the orientation changes.
One thing you can try is to save the current position of the video in "onConfigurationChanged ()" so that after rotation, when the VideoView has reinitialized itself, you can continue to play the video from that position.
source share