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

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

$
0
0
Hi, 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.

Viewing all articles
Browse latest Browse all 2800

Trending Articles



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