I am using jiaozi video player library for playing video in my android app. Everything is working fine. Now i am facing an issue, on screen orientation change from portrait to landscape the video should be fullscreen, has anyone done this, if yes then pls share me the code or snippet so that i can implement the same.
Asked
Active
Viewed 300 times
1 Answers
0
Examplifying the code I got from here: https://stackoverflow.com/a/5726776/2232127
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
// Checks the orientation of the screen
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
yourVideoPlayer.setFullscreen(true);
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
yourVideoPlayer.setFullscreen(false);
}
}
I don't actually know your video player library, so the setFullscreen method probably doesn't exist. Try to find the equivalent for that.

JensV
- 3,997
- 2
- 19
- 43