Quantcast
Channel: support.jwplayer.com :: Streaming
Viewing all articles
Browse latest Browse all 2800

Android VR JW Player - How to set fullscreen automatically when the device is rotated to landscape

$
0
0
Follow the question here: https://support.jwplayer.com/customer/en/portal/questions/16833741-vr-jw-player-how-to-set-fullscreen-when-the-device-is-rotated-to-landscape?new=16833741 As it reaches the maximum number of answers so I start a new thread. I am implementing JW VR Player. My question is how to set fullscreen when the device is rotated to landscape Here is my code: @Override public void onConfigurationChanged(Configuration newConfig) { // Set fullscreen when the device is rotated to landscape if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE & !mVrVideoView.isFullscreen()) { mVrVideoView.toggleFullscreen(true); } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT & mVrVideoView.isFullscreen()) { mVrVideoView.toggleFullscreen(false); } super.onConfigurationChanged(newConfig); } @Override public void onFullscreenToggled() { mCoordinatorLayout.setFitsSystemWindows(!mCoordinatorLayout.getFitsSystemWindows()); } Current result: When rotating device to landscape, it shows cardboard instruction, when click on back button, video view displays in landscape but not full screen, have padding on top and bottom. Expected result: similar to clicking on full screen button, video view displays in landscape with fullscreen, no padding. I asked for Android solution, but Daniel provided link to iOS sample code.

Viewing all articles
Browse latest Browse all 2800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>