Skip to content
Snippets Groups Projects
Commit 1664711f authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix default orientation when a video is played while the device is in portrait mode

Fixes #1489
parent d9df6b2f
No related branches found
No related tags found
No related merge requests found
......@@ -396,7 +396,7 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
val screenOrientationSetting = Integer.valueOf(settings.getString(SCREEN_ORIENTATION, "99" /*SCREEN ORIENTATION SENSOR*/)!!)
orientationMode = when (screenOrientationSetting) {
99 -> PlayerOrientationMode(false)
101 -> PlayerOrientationMode(true, if (windowManager.defaultDisplay.rotation == Surface.ROTATION_90) ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE else ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE)
101 -> PlayerOrientationMode(true, if (windowManager.defaultDisplay.rotation == Surface.ROTATION_270) ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE else ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
102 -> PlayerOrientationMode(true, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
else -> PlayerOrientationMode(true, getOrientationForLock())
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment