@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (mVideoWidth > 0 && mVideoHeight > 0) mVideoSurface.adjustSize( getDeviceWidth(this), getDeviceHeight(this), mVideoSurface.getWidth(), mVideoSurface.getHeight()); }
@Override public void onVideoSizeChanged(MediaPlayer mp, int width, int height) { mVideoHeight = mp.getVideoHeight(); mVideoWidth = mp.getVideoWidth(); if (mVideoHeight > 0 && mVideoWidth > 0) mVideoSurface.adjustSize( mContentView.getWidth(), mContentView.getHeight(), mMediaPlayer.getVideoWidth(), mMediaPlayer.getVideoHeight()); }