I have a task with JW Player - this player has to become in full screen while rotating device like in youtube. Rotate works good in both directions ( to right and to left) before I set data to player (Video Url). After that first rotating works good to landscape orientation. And easy returned in portrait orientation. But after that my activity rotates not good. It rotates only in the one direction (to left). Direction to right don't call onConfigurationChanged in the fragment and activity.
I use JWPlayerView in my fragment. Activity has this settings in manifest :
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
PlayerFragment
@Override
public void onConfigurationChanged(Configuration newConfig) {
mJWPlayerView.setFullscreen(newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE, true);
super.onConfigurationChanged(newConfig);
When I call this method, rotate become works bad :
PlaylistItem pi = new PlaylistItem.Builder()
.file("https:" + videoModel.getVideoUrl().getHlsUrl())
.build();
mJWPlayerView.load(pi);
Where should I find problem?
I have seen application-example jwPlayer from Google Play. And it has same problem. https://play.google.com/store/apps/details?id=com.jwplayer.opensourcedemo&hl=ru
↧