Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Problem with fullscreen/autoturn


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

1 Community Answers

Daniel Berger

JW Player Support Agent  
0 rated :

Hi Alex,

Thank you for the question. I would be glad to assist you. Please implement both forceFullScreenOnLandscape and forceLandscapeOnFullScreen like such:
self.player.forceFullScreenOnLandscape = true
self.player.forceLandscapeOnFullScreen = true

Best,
Daniel

This question has received the maximum number of answers.